-
Play sound on rollover !
hi guys,
Here's a problem. I am using a movieclip as a button. I want to play a sound from my library on the rollover position of that movieclip. what is the script?
Jayhari
-
mate i would just put the sound inside th movie clip, does the movie clip play frames when u roll over it?
if so that is an easy fix,
-
PHP Code:
on(rollOver) {
name of sound = new Sound()
name of sound.attachSound("name in library")
_root.name of sound.start()
}
so an example would be:
PHP Code:
on(rollOver) {
animal = new Sound()
animal.attachSound("birdsound")
_root.animal.start()
}
In your library, go to the option called "Linkage" check the "Export for ActionScript" box and "Export in First Frame" then give it a name in the boxes above that, give it the same name in both. In the example above the "birdsound" is name name I gave the file in the "Linkage" menu. the "animal" is the new name for refering to it. If you want to you can name them the same thing. Hope that helps, - Peter.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|