View Full Version : music button


TheDisturbedOne
03-29-2003, 01:27 PM
i wanted to know how to make a buttion that when visitors click it music would start but when they clicked it agian the music would stop

Arc Angel
03-29-2003, 06:52 PM
I'm not sure how to do it with one button but here is a way to do it with two. (their may be an easier way though)

Here is an action to start the sound:
mySound.loadSound("url")

Put this action on the second button to stop the music:
Sound.stop

Hope that works/helps! :)

TheDisturbedOne
03-29-2003, 08:21 PM
thanks very much arc angel

Arc Angel
03-30-2003, 03:19 AM
Your welcome! Glad I could help. :)

TheDisturbedOne
03-30-2003, 11:53 PM
how do i get the music to start automaticly when the page loads in

Jasper
04-01-2003, 05:28 AM
Just put in a new layer and call it 'music'.
Then Go to 'import to library' then import your music. Open the library, and drag the music into the layer 'music'.

TheDisturbedOne
04-01-2003, 12:34 PM
nut then you can't stop the music or at leased im haveing trouble with stoping it

Jasper
04-01-2003, 06:27 PM
Do as I said above. (insert your music wherever you want it to start.) Create a new layer. In that layer Make a nice little fancy button. Right click it and press "convert to symbol". Give it any name you want, and choose the option 'button'. Then press OK. SELECT your button, and open the action panel (window >>> actions or simply press F9.) Then choose under "movie control" choose "stopallsounds". Now when you press the button, you'll see that the music stops. I hope i'm not confusing. BTW, this is the way for Flash MX, but if you use flash 5, there should not be much of a difference.

-Jasper

Arc Angel
04-01-2003, 09:42 PM
Do as jasper said; make a music layer, import the music, etc. THEN you need to make a actions layer with stop on the last keyframe of your movie. Then the buttons should turn it off and on. Hope that helps.

-Arc

TheDisturbedOne
04-03-2003, 12:49 AM
well theres is a diffrents

TheDisturbedOne
04-18-2003, 10:58 PM
i need it in flash 5 if ya could get it ok?

Arc Angel
04-19-2003, 02:09 AM
Get what in Flash5?

AdidasGuy
05-04-2003, 08:11 AM
Sorry to change the subject here, but what would be the whole HTML Code for adding a button that plays music and another button that stops playing the music?

I've tried using the mySound.loadSound("url") and the Sound.stop, but I don't know where to put it in the HTML Code itself...

-AdidasGuy

Arc Angel
05-04-2003, 02:28 PM
You import the sound file and put it directly in flash. And you have to create your own buttons.

-Arc

SchoolzOut.com
06-01-2003, 10:52 PM
You cause just make a Movie Clip and make 2 frames both with stop as the action. Then add a button into both. One saying stop and one saying play the set the action of both of them to play(); and for the button in the first frame add stopAllSounds(); and then put the music into the first frame.

Ujin
12-20-2004, 01:54 PM
You can try Flash Voice Buttons. It's the most powerful tool. Putting any sound or voice message to your website never been so easy.
A lot of button styles and the main thing is that all of the internet surfers can play sounds without any extra downloads or plugins.

Get It On:
oh, and by the way, advertising is not allowed here, thank you very much

Marianne
12-20-2004, 04:06 PM
wow, your first post here and a helpful one too!
I'm sure they were still waiting for an answer to their question, over 18 months since the question was posted here.
They probably checked this forum every single day, to find out if someone had finally answered their question.
It sure is good to have you on board, just don't bring up any other old threads please!!!