Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sound Question

Status
Not open for further replies.

HaroldM

Technical User
Joined
May 27, 2003
Messages
6
Location
US
Ok so I am completely new to Flash. I made an SWF file from an mp3 I want to play when you go to a site. Just some info this site is going to be for a musician so he wants to have one of his songs play as soon as you pull up his page. He wants to have an option that says Music: On and when you click on it will then say Off and the music will stop. The inspiration for this idea came from the site You'll notice in the upper left corner this same thing. Any idea how to do this? I want to use the SWF file I made and not an mp3. Thanks in advance.
 
not sure what you mean..not use an mp3...have to use mp3 or .wav to get sound from flash.
 
Not sure either. HAHA. I just installed flash and was playing around and I made this.


It should start playing music soon as that page loads. If you look at the source its just loading a file called pixa.swf which I made in flash by importing the mp3.

Again I am a total newb here so forgive me for any misinformation I may say. :)
 
well do 1 of things to the file (the fla). either click in frame1, select properties, sound, and select the music from there or use actionscript to play and control the sound.
 
Eh? Lost me there. First off why cant I use the swf file I made? It seems to load fine and play the music fine. i just want a simple way so people can turn the music off and on like the site
 
Bill sometimes gets carried away with his own wishes and sloppy explanations!

That said, if you made your .fla available (upload it and zip it up), I can have a look at it. The buttons should be in the same movie, but I'd have to see how you actually coded this thing, to further help you out!

Regards,

cubalibre2.gif
 
Ok no problem I can do that. It is at
I haven't made any buttons or anything. Again I am like 100% newb here. :) Any help is greatly appreciated.

Just so you know this zip is like 35.5MB. :)
 
Here ya go!
Just re-insert your sound on that one and only frame of the "sound" layer within the movie clip "soundclip".
Select that frame and drag your sound from the Library on stage, reset your loop and it should work.
I've removed the sound from my .fla, to make it smaller and because you obviously already have it.
Make sure the sound is only on frame 1 of the "soundclip" movie clip.

There would be better ways of doing this, like streaming an mp3. This will take quite a while to download for a dialup connected user, and you haven't even added visual content yet to this movie.


Regards,

cubalibre2.gif
 
It's not even a movie actually. It's just supposed to be an audio clip. I didn't know how else to stream it with Flash other than making a swf file. Basically you will go to and while you browse you'll hear that tune playing and have the option to turn it off and then back on if you want.
 
Well, my example should work for now, but you may want to check this site, and learn how you could stream (sound starts playing as soon as enough data has been downloaded) an mp3...


Regards,

cubalibre2.gif
 
Hey all I am back. So now I finally got it to somewhat work. It plays when you go to the site. Now my step-bro is wanting this type of setup. He has 4 songs of his he has picked out to have on the site. He wants to have the people visiting his site to be able to choose a song. I have the 4 songs in mp3 format but have no clue how to do what he wants. If anyone is willing ot help please let me know. I am on AOL Instant Messenger under HSDHollywood or Yahoo Messenger under hmartin80. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top