Code:
button.onRollOver = function() {
overSound = new Sound(this);
overSound.attachSound("click");
overSound.start();
}
The key to this working is applying the correct linkage identifier. To do this, right click on the sound file that you want to use in the library (assuming you've imported it already since you're using it on the timeline).
Click Advanced (if not already up by default).
Add identifier (click in my example) to the text field.
Add that actionscript to a frame (not the actual movieclip). If you like adding actionscript to the actual movieclip (which isn't a very good idea and you should get away from doing), change it to this:
Code:
on (rollover) {
overSound = new Sound(this);
overSound.attachSound("coolsound");
overSound.start();
}
Bookmarks