6.
Select Frame 1 on the Timeline, and type the following code in the Actions panel:
import flash.display.BitmapData;
// Create imageBmp and attach the bitmap from the library.
var imageBmp:BitmapData = BitmapData.loadBitmap("myImage");
// create movie clip and attach imageBmp
this.createEmptyMovieClip("imageClip", 10);
imageClip.attachBitmap(imageBmp, 2);
// make the clip draggable
imageClip.onPress = function() {
this.startDrag();
};
imageClip.onRelease = function() {
this.stopDrag();
}
7.
Select Control > Test Movie to test the document.
The bitmap in the library appears on the Stage, and the image is draggable.
About using FLV video
The FLV file format contains encoded audio and video data for delivery by using Flash Player.
For example, if you have a QuickTime or Windows Media video file, you use an encoder
(such as Flash 8 Video Encoder, or Sorensen Squeeze) to convert that file to an FLV file.
Flash Player 7 supports FLV files that are encoded with the Sorenson Spark video codec. Flash
Player 8 supports FLV files encoded with Sorenson Spark or On2 VP6 encoder in Flash
Professional 8. The On2 VP6 video codec supports an alpha channel. Different Flash Player
versions support FLV in different ways. For more information, see the following table:
Codec
Sorenson Spark
On2 VP6
*
If your SWF file loads an FLV file, you can use the On2 VP6 video with having to republish
your SWF file for Flash Player 8, as long as users use Flash Player 8 to view your SWF file.
Only Flash Player 8 supports publish and playback of On2 VP6 video.
SWF file version (publish
version)
6
7
6
7
8
Flash Player version
required for playback
6, 7, or 8
7, 8
8*
8
8
About using FLV video
603
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?