My counter goes to 100 at a constant speed. Is there a way to ramp the speed of a counter?
Flash can use trigonometry values to effect speed, but I don't know if that can change the timer class on-the-fly.
There's a couple parts to it.
(a.) ramp the speed of a counter?
(b.) ramp in certain parts?
- have a range
- 90-100 starts ramping
either example of trigonometry of increments would be helpful
TRIG EXAMPLE I WANT TO APPLY
var xVel:Number = Math.cos(radians) * speed;
var yVel:Number = Math.sin(radians) * speed;
//-------------------------------------------//
return deg * (Math.PI/180);
ACCELLERATING COUNTER "all good examples"
//EVERYONE HELPED "decimals corrected"
var timer:Timer = new Timer(10);
var count:int = 0; //start at -1 if you want the first decimal to be 0
var fcount:int = 0;
timer.addEventListener(TimerEvent.TIMER, incrementCounter);
timer.start();
function incrementCounter(event:TimerEvent) {
count++;
//
fcount=int(count*count/10000);//starts out slow... then speeds up
//
var whole_value:int = int(fcount / 100); //change value
var tenths:int = int(fcount / 10) % 10;
var hundredths:int = int(fcount) % 10;
"thanks for spending the time to help"