all groups > flash (macromedia) > september 2007 >
You're in the

flash (macromedia)

group:

play mp3 play button, im a complete begginner


play mp3 play button, im a complete begginner dominicmelton
9/11/2007 8:03:13 PM
flash (macromedia):
Hey, I basically want to make a flash banner with a mp3 file embedded which
plays when you press a button, I managed to embed a mp3 file, and its playes,
but it just plays automatically, i want it to be able to start when i press a
button and stop when i press a button.

Is this possible, or is it a bit above the level of a begginer?

thanks.
Dom
Re: play mp3 play button, im a complete begginner budd101
9/12/2007 12:00:00 AM
On the TIMELINE, on frame 1, create three layers. Name them mp3, button,
actionscript. enter into the Actionscript layer:

stop();
play_btn.onRelease = function (){
gotoAndPlay(50);
};

Next , create a button in in the button layer and name it play_btn .
On the timeline, go to frame 50. Insert a keyframe on the button layer, the
actionscript layer, and the mp3 layer. At frame 50 press delete on the button
layer. This removes the button. Insert a new button at frame 50 and call it
stop_btn.
Insert your mp3 in the the mp3 layer at frame 50. In the actionscript layer
at frame 50 enter this actionscript:

play_btn.onRelease = function (){
gotoAndPlay(1);
};

What ever frame the mp3 stops playing at enter a keyframe in the actioncript
layer and enter the actionscript:

gotoAndPlay(1);

Lots of luck
Re: play mp3 play button, im a complete begginner budd101
9/12/2007 12:00:00 AM
Sorry, I made a mistake. Try this:

On the TIMELINE, on frame 1, create three layers. Name them mp3, button,
actionscript. enter into the Actionscript layer:

stop();
play_btn.onRelease = function (){
gotoAndPlay(50);
};

Next , create a button in in the button layer and name it play_btn .
On the timeline, go to frame 50. Insert a keyframe on the button layer, the
actionscript layer, and the mp3 layer. At frame 50 press delete on the button
layer. This removes the button. Insert a new button at frame 50 and call it
stop_btn.
Insert your mp3 in the the mp3 layer at frame 50. In the actionscript layer at
frame 50 enter this actionscript:

stop_btn.onRelease = function (){
gotoAndPlay(1);
};

What ever frame the mp3 stops playing at enter a keyframe in the actioncript
layer and enter the actionscript:

gotoAndPlay(1);

Lots of luck
AddThis Social Bookmark Button