Search tutorials
Heig,
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
| » Level Intermediate |
|
Added: 2003-03-25 Rating: 4 Votes: 42 |
| » Author |
| designer of iremota |
| » Download |
| Download the files used in this tutorial. |
| Download (0 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!