|
Flash CS4 Resources |
Loading device-specific sound and image formatsIn Flash Lite 2.0, you can load any image or sound file that’s in a format supported by the device. To load external images, you use the loadMovie() global function, or the MovieClip.loadMovie() method. For example, if the device supports the PNG file format, then you could use the following code to load a PNG file from a web server into the movie clip instance image_mc: image_mc.loadMovie("http://www.adobe.com/images/mobile.png");
To load external sounds, you use the Sound.loadSound() method. In Flash Lite 2.0, you can use this method to load any sound format that the device supports (for example, MIDI or SMAF). External device sounds must fully load into memory before they can play. As in Flash Lite 1.x, in Flash Lite 2.0 you can also play device sound that’s bundled in the SWF file. For more information, see Using bundled device sound. For more information about loading external images and sounds, see the following topic: |