Note that there are some explanatory texts on larger screens.

plurals
  1. POacceleration ramp "increments" for Counter AS3
    primarykey
    data
    text
    <p>My counter goes to 100 at a constant speed. Is there a way to ramp the speed of a counter?</p> <p>Flash can use trigonometry values to effect speed, but I don't know if that can change the timer class on-the-fly.</p> <p><strong>There's a couple parts to it.</strong> <br> (a.) ramp the speed of a counter?<br></p> <p>(b.) ramp in certain parts?<br> - have a range<br> - 90-100 starts ramping<br></p> <p><strong>either example of trigonometry of increments would be helpful</strong></p> <p><a href="http://www.ashcraftband.com/myspace/videodnd/icon10.jpg" rel="nofollow noreferrer">alt text http://www.ashcraftband.com/myspace/videodnd/icon10.jpg</a></p> <p><strong>TRIG EXAMPLE I WANT TO APPLY</strong><br></p> <pre><code>var xVel:Number = Math.cos(radians) * speed; var yVel:Number = Math.sin(radians) * speed; //-------------------------------------------// return deg * (Math.PI/180); </code></pre> <p><strong>ACCELLERATING COUNTER</strong> "all good examples"<br></p> <pre><code>//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; </code></pre> <p>"thanks for spending the time to help"</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload