Categories
Featured jobs
» More ActionScript, Flash and Flex jobs.
» Advertise a job for free
Our network
Advertisement

 »  Home  »  Tutorials  »  Flash  »  Beginner  »  Controlling Different Timelines

Controlling Different Timelines

By Evgueni Strok | Published 09/9/2005 | Beginner | Rating:
Evgueni Strok
This user is yet to take control of their account and provide a biography. If you are the author of this article, please contact us via support AT actionscript DOT org. 

View all articles by Evgueni Strok
Page 1 of 1
Written By: Evgueni Strok
Difficulty Level: Beginning
Requirements: Flash 5 Download FLA



One question we see on the forums very often is: "I have a Movie Clip and I want to control it from the main TimeLine, or another movieclip. How can I do it?" The solution is to use the appropriate Path (see the tutorial) to the movieclip. This tutorial provides a step by step example.

Create an MC and 3 buttons and put all of them on main TimeLine

Button1 -- "frame 25"
Button2 -- "label Hi"
Button3 -- "play"

MC -- "MC main" -- (instance name=MCtest)

Take a look inside MC main:



And remember to add instance name (MCtest) to MC



How it works

Using 3 different buttons we'll tell MC to go to different frames of MC TimeLine by number of frame , label of frame and play MC after MC has been stopped.

Button1 -- "frame 25"

on (release) {
 _root.MCtest.gotoAndStop(25);
}

Button2 -- "label Hi"

on (release) {
 _root.MCtest.gotoAndStop("Hi");
}

Button3 -- "play"

on (release) {
 _root.MCtest.play();
}

The main Timeline always has the name _root. Target paths are hierarchical addresses of movie clip instance names (MCtest --- in our case), variables, and objects in a movie. You can name a movie clip instance in the Instance panel.
How would you rate the quality of this article?
1 2 3 4 5
Poor Excellent

Verification:
Enter the security code shown below:
img


Add comment

Spread The Word / Bookmark this content

Clesto Digg it! Reddit Furl del.icio.us Spurl Yahoo!


Search Entire Site
Add to Google
Advertisements
Article Options
Latest New Articles
Set up a simple IIS Server for Flash
by Peter McBride

Day 1 at FITC Toronto 2008
by Anthony Pace

Simple reflection effect with AS2
by Jean André Mas

ActionScript.org Meets Josh Tynjala (aka dr_zeus)
by ActionScript.org Staff

Rapidly Create Online Flash Movies to Help Users Market, Sell and Support Software and Hardware
by Sabrina F

mailing list
Enter your email address:
mailing list
Subscribe Unsubscribe
© 2000-2007 actionscript.org! All Rights Reserved.
Read our Privacy Statement and Terms of Use...
Our dedicated server is hosted and managed by WebScorpion Webhosting.