How to reset the player?
Mike Doub
Mike at Doub.com
Sun Oct 30 11:19:56 EDT 2011
I am trying to get several call backs to fire during playback of a looping
mp3. I am controlling lights from within the call backs. However, I am
running into several issues that I do not understand.
1) I am not able to reset the player to the beginning
2) The callbacks are only called on the first playing and not of the
repeated playings
Does anyone see issues with the following code or could provide some
incites?
put the timescale of player "Spooky" into persec
put empty into callbackList
put (1 * persec) & comma & "c1" & return after callbackList
put (44 * persec) & comma & "c2" & return after callbackList
set the callbacks of player "Spooky" to callbackList
set the looping of player "Spooky" to true
set the playSelection of player "Spooky" to true
set the startTime of player "Spooky" to zero
set the endTime of player "Spooky" to the duration of player "Spooky"
start player "Spooky"
I would have expected this to start at the beginning each time the code was
executed, yet the player is never reset.
Thanks
Mike
More information about the use-livecode
mailing list