Jump to content
GreenSock

zeroskillz

Any way to track the position as it's Tweening? [SOLVED]

Recommended Posts

Is there a way to track the position of an object as it tweens?

As example, track the x position of an object as it moves across the stage?

It seems I only have access to that property at the beginning and end of the tween.

I'm sure I'm missing something...

 

 

Thanks in advance1

-Ted

Link to comment
Share on other sites

Sure. Use the onUpdate special property.

 

TweenLite.to(mc, 5, {x:400, onUpdate:trackMovement});
function trackMovement():void {
   trace("mc.x = " + mc.x + ", mc.y = " + mc.y);
}

Link to comment
Share on other sites

baaahaaa! I knew it must be something simple. Thanks a bunch!

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