I hope this is the correct forum category. I am using Flash 6 Trial version
I am trying to complete a tutorial http://www.webmonkey.com/webmonkey/05/46/index2a.html?tw=multimedia I believe that I have carefully followed the instructions but the MP3 player does not work.
The tutorial has you create 4 layers. Play, Pause, Trigger (hidden button) and Action
The play and pause layers have graphics that are to be turned into a movie clip.
The trigger button was created with Insert, New Symbol, Button. The hit frame was highlighted by clicking on hit and hitting F6. I drew a circle and gave it the name trigger_btn. It shows up as a blue ring and blue hue over and around the play and pause images.
All of the script was put in the action layer in the first frame.
The invisible button seems to work because the play changes to pause when clicked and back when clicked again. I am not getting any sound.
I have worked on this for several days with no success. flv attached in zip file.
Thanks in advance for the help … Micheal
pause_mc._visible = false;
function getSound(url:String) {
sound1.stop();
delete sound1;
sound1 = new Sound();
sound1.onLoad = function(success:Boolean) {
if (success) {
trace("[MP3 Player]: file loaded");
} else {
trace("[MP3 Player]: Could Not load Sound Data from file, please try again");
}
};
sound1.loadSound(url, true);
}
function audioStop() {
sound1.stop();
$marker = sound1.position/1000;
$state = false;
}
function audioPlay() {
sound1.start($marker);
$state = true;
}
function checkState() {
if ($state == true) {
pause_mc._visible = false;
audioStop();
} else {
pause_mc._visible = true;
audioPlay();
}
}
getSound(“song.mp3”);
sound1.stop();
var $state = false;
var $marker = 0;
trigger_btn.onRelease = checkState;