It will be necessary that you import an image to library.
Flash 8 Tutorial. Move objects. Now you will learn how to use a small code Action Script, and with this code you will be able to move objects in a movie. It will be necessary that you import an image to library (this step will be explained later).
1. Create a new document (Ctrl. + J) 250 * 200 pixels.
1.1 Select #FFFFFF as background.
2. Import an image to LibraryFile > Import > Import to Library. Note: you could also import directly the image to the scene of the symbol, this is to avoid drag it the image from library (Ctrl. + R) or File > Import > Import to Stage.
3. Create a new symbol (Ctrl. + F8).
3.1 Name it Symbol and select the option TypeMovie clip.
4. Click on the symbol (image) in the Library window, and drag it onto the Symbol.
4.1 Place the image in coordinatesX = 0.0 y Y = 0.0.
5. Now return to the Scene.
5.1 Click on the symbol (Symbol 1) in the Library window, and drag it onto the Scene.
6. Select the Symbol of the scene and then open the Actions panel Actions – Movie Clip and write this code.
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
With this step the tutorial is done, congratulation.
The end.
Press Ctrl. + Enter and see the final animation. :)See you soon:)