Flash Lite 2 |
|||
| Developing Flash Lite 2.x Applications > Working with Sound, Video, and Images > Using device video > Using bundled device video > Bundled device video example | |||
This section shows you how to create an application that plays a bundled device video file. To do this, you'll first import a device video into your Flash document (see Importing device video), create an instance of the video on the Stage, and finally add ActionScript to play and stop the video.
You can also play video directly from the library. For more information, see Playing a bundled video directly from the library.
For more information about importing a device video, see Importing device video.
A new video symbol appears in the Library panel.
This is the name you will use to refer to the video object in ActionScript code.
These dimensions match those of the source video. Depending on the device, a device video in Flash Lite does not always scale to fit the size of the video object's bounding box. For more information, see Limitations of device video.
on(press) {
myVideo.play();
}
on(press) {
myVideo.stop();
}
|
NOTE |
|
You must test a device video on the actual device; you can't preview it in the emulator. |