Hi,
If you import a wav or mp3 file into your scene and play it in a loop... there's no way you can tell how many times it was looped...
If you check the position of the loop eveyframe you'll get some incrementing number... (Not really the position) so I guess that this is a position in a loooong looped sound, so I try to figure out the loop counter by dividing by the loop length... nop, not good... you'll get worng numbers, near but wrong...
Here's an example:
Can anyone help with this??Code:var Loop:LoopClassLink = new LoopClassLink(); var sc:SoundChannel; sc = Loop.play(0, 1000); // onEnterFrame addEventListener(Event.ENTER_FRAME, onFrameEnter); function onFrameEnter(e:Event) : void { trace(sc.position/beat.length); }
Thanks
Gil.


Reply With Quote