Tweening number with Tweener


/ Published in: ActionScript 3
Save to your folder(s)

Sometimes you need to tween a number (for example from 1-100) and to get the number


Copy this code and paste it in your HTML
  1. import caurina.transitions.Tweener;
  2.  
  3. var someObject = {}
  4. someObject.someValue = 0
  5.  
  6. var valueYouNeed:Number
  7.  
  8. Tweener.addTween(someObject, {someValue:100, time:5, onUpdate:funk})
  9.  
  10. function funk(e:Event = null):void{
  11. valueYouNeed:Number = someObject.someValue;
  12. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.