Jump to content
Search Community

Naming a Tween

Miroku_87 test
Moderator Tag

Recommended Posts

Hi everyone,

is it possible to name a Tween so that is retrivable later with something like

 

var tweens:Array = TweenMax.getTweensOf(obj); 

for(var t:String in tweens)
{
if(tweens[t].name == "myTween")
	//do something to tweens[t]
}

 

??????

Link to comment
Share on other sites

Hi Miroku_87,

Not sure if this is exactly what you're after, but the following all produce the same result:

var myTween:TweenLite = new TweenLite(mc, 1, {x:100});

TweenLite.to(mc, 1, {x:100});

var myTween:TweenLite = TweenLite.to(mc, 1, {x:100});

 

So you can use:

var myTween:TweenLite = TweenLite.to(mc, 1, {x:100, paused:true});

to create a tween and access it later e.g.

myTween.play();

Not sure if this directly answers the question, but I hope this helps.

X10

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...