Home Layer:
- Create a new layer below the previous and name it "Home".
- Place a Blank Keyframe (F7) in Frames 15 and 17.
- Select the Blank Keyframe in Frame 15 and place the Button symbol "Center" in that Keyframe. Center it by using the center point option in the Info panel.
- Open the Instance panel as before and ensure that the Behavior is set to "Button" and Options is set to "Track as Button". These should be the default settings for a Button symbol instance.
- Assign the following to the selected instance. Be sure the actions window
is labeled "Object Actions" and not "Frame Actions". If
it say's "Frame Actions" select the object on stage directly and
not via the timeline.
on (release) { playClip(_level0.navigation); _level0.gotoAndPlay("Home"); }playClip(_level0.navitation0); references the custom function we set up in frame one of the layer "Frame Actions & Labels". By placing the function in frame one we can access that function from anywhere in this timeline or by referencing this timeline from others within a project. The argument (stuff in parenthesis) tells Flash which timeline to play. In this case that timeline is "Navigation". Remember, we stopped playing this timeline at Frame 16 when the Stop action was issued from the "Frame Actions & Labels" layer.
_level0.gotoAndPlay("Home"); tells the referenced timeline (in this case the top level timeline "_level0") to jump to a specified label. This one line replaces a somewhat cumbersome and wordy syntax from Flash 4 where you had to identify the timeline and then issue a command.
| » Level Intermediate |
|
Added: 2001-01-16 Rating: 8 Votes: 129 |
| » Author |
| Jason Lampitt is an Interactive Developer for a major media development firm in Englewood, Colorado. He has a background in fine art as well as graphic design and has been developing multimedia titles for the past 6 years. Jason has a passion for bringing design to life through multimedia and helping others to understand the sometimes complex and confusing world of interactive development. In his spare time Jason is an active outdoorsman, mountain biker and family man. |
| » Download |
| Download the files used in this tutorial. |
| Download (42 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!