PDA

View Full Version : Help with the Blue Gel MP3 Player


unknown user
07-21-2002, 03:28 AM
OK here's a very simple blue gel MP3 player I did:

http://www.indigorose.com/free/Blue%20Gel.exe

I would like to attach a condition to the buttons so that if someone presses any button BEFORE they press the load button, a pop-up message directs them to first load an MP3. So for example if someone pressed the play button before loading an MP3 it would instruct them to, "Please load an MP3 file to play"...


So I guess I have to be able to test if the MP3 path is set yet, %FullPath% is the variable. So how do I set up the play button to test if that path is empty and then either direct the user to load an mp3 or start playing the mp3 depending on the result?

Thanks

unknown user
07-21-2002, 05:47 AM
As you stated, you need to check if %FullPath% is set, so set a variable in Page Properties > On Initialize:

<font color=purple>%FullPath% = FALSE</font color=purple>

// set the play button to check %FullPath% :
<font color=blue>IF (%FullPath% = FALSE)</font color=blue>

// and if it is not set, load an mp3 using Dialog.FileBrowse
<font color=purple>%FullPath% = Dialog.FileBrowse (Open, "FileOpen","%Desktop%","MP3's (*.MP3)|*.mp3|")</font color=purple>

// once mp3 is chosen, load mp3 for playing and play it
<font color=purple>MP3.Load ("%FullPath%")
MP3.Play</font color=purple>

// if %FullPath% was set .. go ahead and play it

<font color=blue>ELSE</font color=blue>
<font color=purple>MP3.Load ("%FullPath%")
MP3.Play</font color=purple>
<font color=blue>END IF</font color=blue>

unknown user
07-21-2002, 01:56 PM
Thanks...

RobertB
07-24-2002, 12:48 PM
Blue Gel was kewl....I want one...LOL

unknown user
07-24-2002, 02:26 PM
Unless I have a cardio infarction before release date, some variation of Blue Gel will be in AMS4's template suite...