Change sfx's playback position?


(Mike Evmm) #1

Hello,
I wanted to “jump” inside an sfx. but the position property is read-only. Is there any way I can play a sound from a specific position?
Thanks in advance!


(Jacob Albano) #2

This has been discussed before:

The uptake was that you’ll need to modify the class yourself for now.


(Jonathan Stoler) #3

You can also use Adobe’s Sound class instead: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Sound.html

Its play() method takes a starting position as the first argument.

(The FlashPunk Sfx class uses the Sound class, but sets the start position to 0 internally, with no option to change it.)


(Mike Evmm) #4

Then just assigning a public variable to the starting position should work, I assume. Thank you!
(and thank you @jacobalbano for pointing that out. I googled, but didn’t find that.)