PDA

View Full Version : sounds on buttons


matt poole
06-29-2001, 04:01 PM
could you direct me toward a tutorial or library piece on attaching sounds to buttons.

Ive got a movie clip with lyrics for a song with a button to click for more. I want to attach a sound called 'pageturn' to the button without adding it to the timeline if poss.

is there a play(sound) script?

new sound = "pageturn" .... or something comes to mind, or am I talking nonsense?...

akilwani
06-30-2001, 06:47 AM
I m not sure, but try this.

Main Scene

buttonsound = new Sound()
buttonsound.attachSound('YourFileName')


on button write this:

on(rollOver) {
buttonsound.start(0,1)
}



hope it will work

matt poole
07-01-2001, 04:57 PM
cheers,

what i did in the end was:

on release {
buttonsound = new Sound ();
buttonsound.attachSound ("pageturn");
buttonsound. start ();
}