Playing Sound Clips

Geoff Canyon gcanyon at inspiredlogic.com
Wed Jan 30 13:28:01 EST 2002


At 9:41 AM -0500 1/30/02, Gene Kennedy wrote:
>I originally placed your code in a "On MouseUp" handler in a button on a card where the "PlayStopped" signal was not detected.
>When I moved your code to the card script, and called it from the button event, it worked "OK".  Is this the general case with most RR signals, i.e. they are sent to the card and not to the control on the card which initiated the response?

In this case it gets sent to the player that is playing the sound (one is created on the fly in this instance). In general, messages like this are sent to the object doing the work, rather than the one that initiated the action. From there they pass up the hierarchy, so when in doubt, you can trap at the card level. 

One of the great things about Revolution is the (nearly) unlimited script length -- you can put something like this in the card script (or any other script that will catch the message) without worrying about running out of space.

regards,

Geoff




More information about the use-livecode mailing list