FORCING A CD PLAY BUTTON TO PLAY ONLY A PARTICULAR TRACK.

In this example, you want to play only track 4 from the CD (Mixed-mode or CD-EXTRA) and then stop.
The user can replay the track as much as he wants by pressing the play button. Track 4 is 30 seconds long.
Why?
Let's say your page describes the content of that track. You don't want track 5 to start on that page.
Create a PLAY button (or use the "Insert CD controls" wizard). Note that you should only include PLAY and STOP buttons since the user is not supposed to browse the CD.
Using the script wizard ("Action" in the button configuration window), determine the track you want your button to start. In this example, track 4 ( CD Track("4") ). Again, with the script wizard, choose for Action: Script Timer.
For Object, choose your STOP button.
Finally, set the amount of time to the exact lenght of your track (milliseconds).
So, if track 4 is 30 seconds long, the timer should be set like this: ScriptTimer("Your_Stop_Button","30000").
The entire script should like this in the small window: CD Track("4") ScriptTimer("Your_Stop_Button","30000")
The result of this is simple.
The PLAY button will start to play CD track 4, start a countdown of 30 seconds and then launch the script of your STOP button which will stop the CD.
You can restart the track by pressing the PLAY button. Pressing the STOP button will stop the CD as well.

Here's an extra tip...
Let's say you are creating a CD with many audio tracks and want to have one page describing each track.
Create a menu page. On each "track page", create a BACK button and add to its script the same action as your CD STOP button.
That way, if the user hits the back button while listening to the audio track, it won't play over the menu page.
You could also add the CD STOP command to the script of your menu page. _____________________________________________________________________________ -- ***********************************************************

Marc Jutras

mjutras@cyberjunkie.com
http://www.cyberjunkie.com/mjutras