Jump to content
Search Community

TimelineLite GotoAndStop(2) ?

soupking test
Moderator Tag

Recommended Posts

Hi everybody, I know...dumbest question ever.

 

But there's no example of this anywhere that I can find.

 

I've got this:

 

public function gotoAndStop(timeOrLabel:*, suppressEvents:Boolean = true):void

 

and this:

 

myTimeline.gotoAndStop(2)

 

I've gone through documentation and examples and I can't figure out how to attach it to movieclips and what the basic syntax is.

function switchMenu(m1:Number, m2:Number, m3:Number, m4:Number)
{		
menu_mc.feature1_mc.gotoAndStop(m1);
menu_mc.feature2_mc.gotoAndStop(m2);
menu_mc.feature3_mc.gotoAndStop(m3);
menu_mc.feature4_mc.gotoAndStop(m4);
}

 

I can't use a variable for a frame value so I was hoping TimelineLite could help. Am I right in asking?

 

As always, thanks for reading. You guys (and you know who you are) have been very helpful.

Link to comment
Share on other sites

just to clear things up, gotoAndStop is a valid method of TimelineLite and MovieClip.

Although it wasn't clear in the initial post, it is not soupking's custom function. http://www.greensock.com/as/docs/tween/ ... toAndStop()

 

SoupKing,

 

I'm sorry but I don't really understand the question as I don't see any code pertaining to an actual TimelineLite instance.

 

if menu_mc.feature1_mc is a MovieClip and lets say m1 = 5.

 

if feature1_mc has a frame 5, then

 

menu_mc.feature1_mc.gotoAndStop(m1) should work fine.

 

I don't see how this relates to a TimelineLite/Max though.

 

Carl

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...