The "addChild" method places the object on the stage. The var AS3 code makes a copy of the "object_One" library symbol and names it "object_to_move." Attaching the x and y property to "object_to_move" in the second and third lines of code positions the symbol. Var object_to_move:object_One = new object_One() object_to_move.x = 400 object_to_move.y = 400 addChild(object_to_move) Click your mouse button, and type in the code below to place a copy of the "object_One" graphic on the stage and position it at the flash stage coordinates of (400,400): Position your mouse cursor on the first line of the ActionScript 3 editor. Select "Actions" from the "Window" menu on the main Flash menu bar to open the ActionScript 3 editor. Click the "Export for ActionScript" check-box, then "OK" to assign a class name of "object_One" for the graphic symbol. Type the name "object_one" for the symbol in the "name" text box in the "Convert to Symbol" dialog box. Select the graphic that you imported and click "Convert to Symbol" in the "Modify" menu to convert the graphic to a movie clip object (so the graphic can be animated). Click the "Import to Library" option in the "File" menu. Import the graphics object you want to move with the arrows. Click "Flash File(ActionScript 3.0)" from the splash window to create a new file for the AS3 Flash multiple-drop target project.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |