The example you linked to, is just a simple flash film with a mp3 linked from the library, and 2 buttons.
These are the basics (and I mean the basics)
Code:
//this goes on frame 1 of the main timeline
//tell it to stop
stop();
//make a sound object
mySound = new Sound (this)
//attach a sound from the library to it
mySound.attachSound("mySong");
thats our sound attached we just need to start it now.
to do this we make a button and give it the instance name of play_btn (in the properties on the left)
to start the song playing we say:
Code:
this.play_btn.onRelease(){
mySound.start();
}
similarly we can tell the sound to stop by placing the following code on
Code:
this.play_btn.onRelease(){
mySound.stop();
}
hope that gets you started, if you want to pause the sound it gets quite complicated....and I've no flash at the mo, to check it b4 giving it you.
Taff
Bookmarks