RE:
----------
>From: Irv Kalb <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: <lingo-l> Sound object playlist and notification
>Date: Thu, Apr 19, 2001, 12:32 PM

>I am attempting to use a sound object in D8 for the first time.  So 
>far, what I've done seems to work great.  I can build up a playlist 
>of sounds and they playback beautifully.  However, I have a 
>requirement to change something on the screen whenever a sound 
>changes.  My question is, how can I know when a sound changes?
>
>As a simple example, let's say I build up a play list of sounds "A", 
>"B", and "C" like this:
>
>   sound(1).setPlayList([#member:member("A"), #member:member("B"), 
>#member:member("C")])
>
>Then to start playing, I issue a:
>
>   sound(1).play()
>
>Is there any way for me to know (e.g., get a callback or even 
>"monitor" the current sound someway) to let me know when "A" has 
>ended and "B" has started, and then when "B" has ended and "C" has 
>started?
---------------

One idea is to try using:

sound(1).duration

So that (heavily paraphrased): 

if sound(1).currentTime < sound(1).duration
then "do something (or nothing?)"
else
"do something different"

That way, Lingo can get the duration and currentTime off whatever sound
happens to be there at the time, and you can make something happen at
the end of the sound's duration and/or change what was happening during
it. Not knowing the srtucture of your movie though, I don't know where
it would be appropriate to toss this in. You'd only want it checking
when a sound was actually called and playing.



Steve Bennett
www.ifmp.net























[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to