Featured Site
» Posted in the Flash Kit Links section
» Title: 3D Jobs
» Description: Free job forum for jobs in Films, Video Games, Multimedia and jobs in flash animation and scripting.
Just real simple, but something that is very useful to know, for reusability purposes or for whatever you may think of.
Steps
Import a sound into your library.
Right click the sound and select linkage then check, Export for actionscripting and Export in first frame
Then in your first frame put
s = new Sound();//declare s as a sound
s.attachSound("buttonSound");//attach the linked sound 'buttonSound' to s
myButton.onRollOver=function(){// make a function
s.stop();//and just so we dont get
//that aweful looping over one sound, we will stop
//it before we start it again.
s.start();//starts the sound
}
This creates a sound object 's' and puts your sound file named 'buttonSound' into 's'. Then creates a function so that when you roll over the button it plays the sound, pretty straight