April 6, 2001 - Sonifying Event Handlers | WebReference

April 6, 2001 - Sonifying Event Handlers

Yehuda Shiran April 6, 2001
Sonifying Event Handlers
Tips: April 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

In order to invoke a Flash sound when a link is clicked, use a regular Anchor tag with HREF="javascript://", and set the onclick event handler to call the FlashSound JavaScript API's TGotoAndPlay() method. The following link shows the text "Play the sound" and directs the play head to go to the label "start" in the "/beamscan" frame:

<A HREF="javascript://" onclick="mySoundObj.TGotoAndPlay('/beamscan', 'start')">Play the sound</A>

The following link shows the text "Stop the sound" and directs the play head to go to the label "stop" in the same "/beamscan" frame:

<A HREF="javascript://" onclick="mySoundObj.TGotoAndPlay('/beamscan', 'stop')">Stop the sound</A>