looping media

Scott Rossi scott at tactilemedia.com
Tue Oct 10 00:01:19 EDT 2006

Recently, Nicholas Thieberger wrote:

> If I loop, it starts from the correct timecode for the first
> iteration, but then reverts to the previously called start timecode
> for the second and subsequent loops, even though the 'start' field
> on mouseup
>    set the looping of player "audplayer" to true
>    set the currenttime of player "audplayer" to 0
>    global samplerate
>    put fld "audioname" into TempAud
>    set the filename of player "audplayer" to TempAud
>    put the timeScale of player "audplayer" into samplerate
>    set the playSelection of player "audplayer" to true
>    put fld "start" into startFN
>    put fld "end" into endFN
>    set the currenttime of player "audplayer" to round(samplerate*startFN)
>    set the endtime of player "audplayer" to round(samplerate*endFN)
>    start player "audplayer"
> end mouseup
> Any suggestions on how I can get it to loop always from the proper start time?

If this is all your code, it looks like you might be missing the startTime

  set the startTime of player "audplayer" to round(samplerate*startFN)


Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
E: scott at tactilemedia.com
W: http://www.tactilemedia.com

More information about the Use-livecode mailing list