Jump to content
Search Community

DynamicProps

mrEmpty test
Moderator Tag

Recommended Posts

Sure, you can do that but it wouldn't be with dynamicProps because that feature is designed to allow your tween's duration to remain fixed and the end value(s) will change to make it look smooth on-the-fly. So if you say you want to tween to the mouse's position and you set your tween's duration to 2 seconds, that tween will end in 2 seconds. Therefore it won't keep moving towards the mouse after that.

 

You could, however, use a MOUSE_MOVE listener or even an ENTER_FRAME listener to keep re-creating a new tween that moves to wherever the mouse is at that point.

 

function mouseMoveHandler(event:MouseEvent):void {
   TweenLite.to(mc, 1, {x:mouseX, y:mouseY});
}

 

Does that help?

Link to comment
Share on other sites

Hello.

 

I don't know why I asked the question! :) I know I can use a standard tween to trace the mouse, but last night after not mooch sleep for a few days I had a moment of clarity about an idea to do with DynamicProps and it following the mouse! But I cannot for the life of me remember what it was. :D

 

However, thank you for answering.

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