Assignment 10 Interactive-map examples. To be able to ALWAYS have the content showing up on a certain area of the Stage, you can draw a simple rectangle on a layer in the MAIN TIMELINE. If you want, you can delete the extra layer on the Main Timeline containing the rectangle, or you can leave it as part of the project design, like in those 2 cases. NOTICE that those 2 assignments are using the "box trick" for the content that you see AFTER pressing the button (in the content layer under the framelabel). |
||
You can organize that animation on the main timeline, then the action should be "gotoAndPlay",instead of "gotoAndStop". When you reach the end of the animation, you need to have a Stop action on the main Timeline, and at that same point in the timeline also have a "back button" (on a separate layer) that will take you back to frame 1 when you press it.
You can also place all that animation AND the back button inside a movieclip. The back button then needs to Tell the "main Timeline to play form the start' (not the movieclip's frame one, that will not solve anything). The main timeline is called root. In AS2, we write it as _root, so the action part of the script for the back button would be: _root.gotoAndStop("start")
In AS3, we write it simply as root, so the action part of the script for the back button (the line contained in the function) would be: root.gotoAndStop("start")
Down here the examples in action: |
||