A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Get Momentum of a Tween

  1. #1
    Junior Member
    Join Date
    Aug 2004
    Posts
    12

    Get Momentum of a Tween

    Hi there

    I'm wanting to create a variable that changes with the speed of a tween. The faster the tween the higher the variable, the slower the tween the lower the variable. for example: The below tween has an easeInOut so the start of the tween would be the slowest and the variable would = 0. At the middle point of the tween would be the fastest and the variable would = 10. Then as the tween winds back down the variable would reduce back to 0.

    PHP Code:
    var HeroTween:Tween = new Tween(Hero"_y"Regular.easeInOut923962true);
        
    HeroTween.onMotionChanged = function() {        
        
    //here is where I want to trace the momentum/speed of the tween
    }; 
    Any help would be appreciated

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    Check out this link, towards the bottom of the page, it gives most, if not all of the tween properties and methods, maybe one of them can help you along.

    http://www.republicofcode.com/tutori...enclasseasing/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center