Simple mp3 thing

I am trying to create a real simple mp3 playing movie … i just want to be able to click a button and the mp3 loads and plays, and when i click the same button again, it goes off (it would be great if it could fade out). Whatever I do, the button always loads and plays the mp3 over and over again on top of itself.

Also, is there a way to load the mp3 without playing it, so it kind of preloads before i want it to start playing? Because it seems that loading and playing at the same time seems to “halt” the movie for a couple of seconds while it loads up the mp3. So it would be good if it loaded before i actually want it to play, so clicking to start the song would start it instantly …

Thanks in advance!

i found this tutorial a great help. hope it solves your problem.

working with sound objects

*Originally posted by Julz *
**i found this tutorial a great help. hope it solves your problem.

working with sound objects **

That website had nothing to do with anything I asked … in fact, it didnt have any information on flash at all.

trust me it does.

" This tutorial will attempt to use ActionScript techniques that are familiar to the intermediate Flash programmer and that are easily grasped by the less experienced. "

it uses flash’s actionscript to control sound including mp3s more effectively within your flash movie.

NO, IT DOESNT!
Have you even clicked on that link you gave me? Why don’t you try it, because there is nothing there about Flash at all!

Here is a good sound tutorial:

http://www.flashkit.com/tutorials/Audio/Flash_MX-Kenny_Be-824/

bout that sound playing over itself, just put in the stopAllSounds(); command before you load that mp3

And yes the link that Julz posted is to a complex and comprehensive tutorial on Sound in Flash. It is the same tutorial that I posted.

*Originally posted by Jubba *
**And yes the link that Julz posted is to a complex and comprehensive tutorial on Sound in Flash. It is the same tutorial that I posted. **

Ok, I must be missing something, because when i click on the link he posted, all i get is this site

http://www.kennybellew.com/

So where is the tutorial in that??

THE WHOLE THING IS A TUTORIAL!!!

This is quoted right from the page that opens up:

Working with Sound Objects
This document copyright © 2002 by Kenny Bellew, [email protected]

This tutorial will cover the following:

How to define a sound object
How to organize sound objects
How to start, stop and loop a sound object
How to control independent sound objects simultaneously
How to control all sounds globally
How to control volume for a sound object
How to build a horizontal volume slider
How to build a vertical volume slider
How to fade a sound object up or down
How to control the volume with the arrow keys
How to control the position of a sound object
How to fade a sound object five seconds from the end of the song
How to pause a sound object
How to pause a looping sound object
How to fast forward and reverse a sound object
How to invoke actions when a sound object ends
How to synchronize animation to a specific time within a sound object
How to load an external MP3 dynamically as a sound object
How to load an external MP3 from a text input box
How to troubleshoot sound objects
Sound will not start
Stopping one sound stops multiple sounds
Sound object error messages
How to build a preloader for dynamically loaded MP3’s

This tutorial is meant to build from information presented in one section to the next. To get the most from this tutorial, it should be read from beginning to end. This tutorial will attempt to use ActionScript techniques that are familiar to the intermediate Flash programmer and that are easily grasped by the less experienced.

Scroll down… The whole site is a tutorial about sound in Flash.

no need to be cheeky damonc79 :frowning: was only trying to help.

Sorry Julz … but seriously, here is all i see when i click that link you posted.

Web Utilities
File Manager
Protect web directory utility (.htaccess)

     DB Utilities
     phpMyAdmin - Admin interface for MySQL
     phpPgAdmin Admin interface for PostgreSQL
     
     EMail Utilities
     IMP - mail client

SQWebMail - mail client
Change your POP3 password

??? Thats really werid because I get a tutorial. But it doesn’t matter because the tutorial that is on the site Julz posted is the SAME EXACT THING that I posted. Written by the same person, just hosted at different places.

:):):):):trout::slight_smile:

you can have the button load the mp2 dynamically, but if it is a small mp3, then just attach it to the down state of your button.
Also, use the “event” option rather “start.” That will prevent it overlapping.

How big of an mp3 file are you loading?
Is it being loaded dynamically?