How to reset the player?

mike at doub.com mike at doub.com
Sun Oct 30 21:04:57 EDT 2011


The field test went fine.  All set for tomorrow night!
 
Sent from my BlackBerry device on the Rogers Wireless Network

-----Original Message-----
From: mike at doub.com
Sender: use-livecode-bounces at lists.runrev.com
Date: Sun, 30 Oct 2011 21:10:37 
To: How To use LiveCode<use-livecode at lists.runrev.com>
Reply-To: How to use LiveCode <use-livecode at lists.runrev.com>
Subject: Re: How to reset the player?

I found the currentTime property which does the reset. I also got it to repeat as I needed by catching playstopped and re-initializing everything thus faking a loop

Got everything working just in time for a night time test before Halloween. :-) 

Got to admit the simulated lightening is pretty cool when synced with a thunder clap

  -= Mike
 
Sent from my BlackBerry device on the Rogers Wireless Network

-----Original Message-----
From: stephen barncard <stephenREVOLUTION2 at barncard.com>
Sender: use-livecode-bounces at lists.runrev.com
Date: Sun, 30 Oct 2011 11:30:23 
To: How to use LiveCode<use-livecode at lists.runrev.com>
Reply-To: How to use LiveCode <use-livecode at lists.runrev.com>
Subject: Re: How to reset the player?

did you try

'set the filename of player 1 to xx'  for each reset?
or

set the filename player 1 to empty
set the filename player 1 to xx'

On 30 October 2011 08:19, Mike Doub <Mike at doub.com> wrote:

> 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
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


More information about the use-livecode mailing list