Groups | Blog | Home
all groups > flash (macromedia) > september 2003 >

flash (macromedia) : How Do I Add a Sound to a Rollover?



tonybologne
9/8/2003 9:05:21 PM
Pardon my ignorance, I can not add a sound to a Mouse Over or Click on a button rollover in Flash.

Can anyone help?

Thanks

googly
9/8/2003 11:38:38 PM
here's an even easier way than writing code.
open your button
make a new layer
make a keyframe in the "over" frame on the timeline of the button
from the sound panel select your sound and set the sound to "start" on the
over state.

bada bing, you have a button with a rollover sound. wanna use the button
again? duplicate it in the libray and use it again and again, set it's
actions as an object instead of inside the button.

cheers
[quoted text, click to view]
: Pardon my ignorance, I can not add a sound to a Mouse Over or Click on a
button rollover in Flash.
:
: Can anyone help?
:
: Thanks
:
:

somaBoy MX
9/9/2003 12:20:20 AM

"tonybologne" <webforumsuser@macromedia.com> wrote...
[quoted text, click to view]
button rollover in Flash.

try this:
// initiate sound object
mySound = new Sound();
// attach a sound infrom your library by linkage name
mySound.attachSound("myLibrarySound");

// play sound on rollover
myButton_btn.onRollOver = function() {
_root.mySound.start();
}

[...]


..soma

pazzoboy
9/9/2003 1:12:44 AM
on(mouseOver){
mySound.start(0,1);
}

I'm probably mixing up the syntax with javascript, but you get the idea.

googly
9/9/2003 2:30:11 AM
pazzoboy, that is javascript and it works great with static rollover
buttons.
Flash is a wysiwyg timeline and stage animating tool though with many other
uses of course.
to put a sound in a button is simply a matter of telling the "over" frame in
the button object, to start playing a sound.

cheers
[quoted text, click to view]
: on(mouseOver){
: mySound.start(0,1);
: }
:
: I'm probably mixing up the syntax with javascript, but you get the idea.
:
:

tonybologne
9/9/2003 2:51:34 AM
Is there a point and click method to this script?


Thanks

AddThis Social Bookmark Button