RockyW
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by RockyW
-
-
Hi All,
I'm trying to follow http://www.snorkl.tv/2010/09/how-to-tween-a-variable-with-flash-and-tweenlite/ to build simple number animation.
Below is the sample codes:
import com.greensock.*; import com.greensock.easing.*; var score:Number = 0; var targetScore:Number = 0; function showScore(){ trace(score); score_mc.score_txt.text = score; } targetScore=10; score_mc.score_txt.text = int(score); TweenLite.to(this, 4, {score:targetScore, onUpdate:showScore, ease:Linear.easeNone});
It works fine in the main timeline, however, when I run the same code in .as file it doesn't work.
By doing some troubleshooting, I noticed in
TweenLite.to(this, 4, {score:targetScore, onUpdate:showScore, ease:Linear.easeNone});
value cannot be passed to score (trace results shows 0 all the time).
Can anyone please help?
-
Hi All,
I'm new to AS and flash and trying to create a "Jackpot meter" looking signage which will display some dollar value. When value changes the number will be rolling towards to the new value.
Can anyone suggest any way to do this?
Thanks
Rolling number effect
in GSAP
Posted
Thanks mate, that was what I'm looking for!
I've tried to put the code into my project but seems like I can only get the animation done once, see below example code:
There is some other process to call this function every x seconds and I can see the value is keep changing but the animation, did I do anything wrong?