mojoNYC
March 23rd, 2003, 02:13 PM
hi all-
i'm using .position with an mp3 sound object to create a timer which i'm using to trigger actions in my main movie:
_level0.theTime =Math.floor(soundTrack.position/1000);
//on enterframe event
if (theTime==10){
objectMC.dosomething();
}
my problem is that the timer code sends multiple instances of the same value, ie. "1,1,1,2,2,2,3,3,3..." etc., which is causing troubles with loading events being triggered more than once--is there a good method for checking or otherwise causing the count to register only once? thanks in advance...
-mojo
i'm using .position with an mp3 sound object to create a timer which i'm using to trigger actions in my main movie:
_level0.theTime =Math.floor(soundTrack.position/1000);
//on enterframe event
if (theTime==10){
objectMC.dosomething();
}
my problem is that the timer code sends multiple instances of the same value, ie. "1,1,1,2,2,2,3,3,3..." etc., which is causing troubles with loading events being triggered more than once--is there a good method for checking or otherwise causing the count to register only once? thanks in advance...
-mojo