At 6:58 PM +0200 6/12/01, Michael Nadel wrote:
>  >  Or at
>>least, is there a way where I can get Director to execute a some handler or
>>command each time it starts a new sound from the list of 32 sounds that
>were
>>queued? (Like every time a new sound from the list is played, something
>>should light up, or whatever). I'm desperate!
>
>here's a trick (based on am undocumented feature)
>
>Properties accepted by the sound queue() can be anything.
>
>So add a made-up property (such as #which) & assign unique values for
>each element in the queue, and then monitor sound(n).which to see
>when it has changed  &/or for what it's current value is.
>
>
>That sounds like a really cool idea, but I don't know how to get it to work.
>Could you help me out please? Here's the code...
>
>on playSound
>   repeat with count = 1 to 30
>      sound(4).queue([#member: member(count, "sound"), #which: count ])
>   end repeat
>   sound(4).play()
>end
>
>Let's say I want to set a global variable called soundCount =
>ound(4).which  - How would I update soundCount as sound(4) was playing? When
>I check "sound(4).which" in the watcher window - it remains void.

you can't update that property while it's playing.

I was thinking more like
sound(4).queue([#member: member("sound1"), #which: 1 ])
sound(4).queue([#member: member("sound2"), #which: 2 ])
sound(4).queue([#member: member("sound2"), #which: 3 ])
sound(4).queue([#member: member("sound1"), #which: 4 ])

& then monitoring sound(4).which would tell you which item from the 
original queue was now playing.

Irv's idea is MUCH better.

-Buzz

>
>Please help!
>
>Thanks so much,
>
>Michael Nadel
>[EMAIL PROTECTED]
>Mediart - Multimedia as an Art Form
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>[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!]


[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