Axelology
Posted At : November 9, 2006 4:21 PM | Posted By : Axel Jensen

working with sound.position in flash 8 actionscript 2

there is a known bug in the counter on the quiz app

Site:
http://www.sonburst.com/nng/

Explanation of Problem:

the timer randomly skips seconds

Fix:
Currently Unknown but working on

More InDepth:
/*
do this to get acutal seconds out of the output which are millisecons
*/

var pos = Math.round(sound.position/1000);


When you output this the seconds roll along every second in the output panel and look much like this...
====================
0.334
1.454
2.556
3.662
4.692
====================


and by using the Math.round function, it will sometimes end up on a second that is later much like this
====================
0
1
2
3
4
5
7
====================

where you obviously can see 7 should be a 6, but because of the rounding, it rounds up.... I'm working on the fix. and heading to the forums.

Related Blog Entries

Comments
How about Math.floor()? ;-)
# Posted By steffen | 6/21/07 8:03 AM



Blog provided and hosted by CF Webtools. Blog Sofware by Ray Camden.