Developing Webs logo
Google
Web DW-Main DW-Photoshop
Visit the message board for solutions or post a question Check out the Classes offered for free at Developing Webs Voice Chat submit a tutorial, resources, article, font for publication consideration and earn a one way link back to your site Get more specifics about the Developing Webs Voice chat room and its room members View the current news at Developing Webs alternative sites which are resources for your d3evelopment needs Join Developing Webs Chat Link to us on your web page to help support this resource! Check out Developing Webs At yahoo groups! Developing Webs Home Adobe Photoshop Tutorials Macromedia Flash Tutorials Jasc Paint Shop Pro Tutorials Adobe Illustrator Animation basics Some Basic PHP tutorials Perl Tutorials HTML Tutorials Cascading Style Sheets javascript Front Page Tutorials Macromedia Dream Weaver Tutorials dreamweaver Publishing your site, FTP, ChMod, Promotions Tools to help you create your site Free and shareware fonts to download Photographs to use in your projects Shop for your site needs Free Online classes REcommend this site to others Log in or edit your information when logged in Developingwebs Log Out Change My Account details and preferences
RSS Newsfeed
for your site
DW News
Calendar
DW Forum
Right click on button and copy shortcut

Add to My Yahoo!

Reminder
Remember to book mark this site!



Request a Tutorial

Controlling The Timeline With Scripts

  • You will need this movie to complete this scripting project

1. Open your stopgo.fla movie in Flash MX. Test the movie by clicking Control=> test Movie. Notice that the movie starts and continues forever.

2. Highlight the top layer, button labels, and click the insert new layer button on the bottom of the layers palette. Rename this layer Actions.

 

3. Click in frame 1 of your actions layer. Open your actions panel. The jump menu will say "actions for Frame 1 of Layer Name Actions.

4. The action panel should be split into two columns. The left column may collapse by clicking the button on the center of the vertical bar. It can open there too. The left column has a list of default actions we will use for this tutorial.


5. Click Actions on the left so that it drops down some basic action categories. Click Movie Control to display the movie control actions. Double click the Stop action.

Notice that the jump menu still displays "actions for Frame 1 of Layer Name Actions". Underneath in the gray area is a description of the stop action. In the white area below is the action:

stop();

When this action is played the movie will stop on that frame, hence the ability to control when a movie starts. Click Control=> test movie. The movie will not play. Right click on the movie as it is in the preview window and select play. It will play one loop until it gets back to frame 1 and stops again.

6. Click in frame 22 of the Actions layer. Hit your F6 key to insert a key frame. Making sure this key frame is highlighted, Double click the "goto" action on the left of the Actions panel. Set the frame number in the parameters to frame 2.

This will automatically cycle the movie to frame two when it gets to the end, thereby missing the stop. Click control=> test movie. Right click on the movie to select play so the movie will play. Notice it will continue to play over and over after you start it.

7. It is easier for viewers to use buttons to control a movie as it plays instead of right clicking. We have two buttons ready to be scripted. the first one is a stop || button, and the second  is a play > button. Button scripts do not get put in the timeline in frames like the scripts we just did. They get assigned to a button instance.

Click on the Stop button. Open the actions panel and select actions=> movie control=> stop from the left list of actions. Make sure you double click stop to transfer it to the actions panel.

8. Click on play button to highlight it. Double click play on the actions panel on the left so that it transfers the action to the white area.

Test your movie. It should be fully functional. now!

 



"Building The Web Into a Nicer Place -- One Site At A Time"
Developing Webs Group Copyright © 2001-2008 All Rights Reserved
Privacy and Legal