O'Reilly logo

Flash Development for Android Cookbook by Joseph Labrecque

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Playing video files from the local filesystem or over HTTP

As we have the full Flash Player (and Adobe AIR) on Android devices, playback of video files is as simple as it normally is on the desktop. The main consideration is whether the video is optimized for playback on mobile, or not.

Getting ready…

This recipe involves the playback of a video file that has been packaged along with our application. We could just as easily reference an HTTP address or even local storage on the Android device, so long as it is a file format and codec, which can be played back through Flash Platform runtimes. You will want to prepare this file ahead of time.

How to do it…

We will create a Video object, add it to the Stage, and stream a file in through a basic NetConnection ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required