Jump to content
Search Community

Any suggestion on ...

Cadfael test
Moderator Tag

Recommended Posts

I have a tween I cant quite figure out how to do. Maybe some one has a suggestion.

 

I am showing a map of sorts, and making videos "fly out" from various locations. As they fly out they tween to a new location and enlarge at the same time. What I am trying to do is draw a triangular shape from the Fly out to where it came from to show what point on the map the video came from. I can drawn the triangle, but it is drawn before the Video gets to it's destination.

 

What I need is to be able to constantly redraw the triangle so that it matches the movement of the video, and I am not sure how to do that.

 

Any ideas?

 

Cad

Link to comment
Share on other sites

i don't know how you are drawing your triangle, but you can add an onUpdate callback to your tween which will run a function every time the tween progresses

 

TweenLite.to(video, 5, {x:500, onUpdate:doStuff});

function doStuff(){
    trace("updating " video.x);
}

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