PDA

View Full Version : flash buttons with sound problem


boeing747fp
08-10-2008, 08:16 AM
I've done what im supposed to for adding sound to a Button object in flash, but i added it to the "Over" keyframe and there's no sound in the Down or Hit keyframes... yet it's still playing the sound when mouse over AND when clicked :(

_Aerospace_Eng_
08-10-2008, 07:05 PM
Give us a link to your fla file and sound file or zip them up here.

jschumann
08-12-2008, 11:07 PM
One way which I think will fix your sound problem is to use the sound object. Under the linkage properties for your sound object, give the identifier a name. Then give your button an instance name on the timeline and add some code similar to this in the frame.

var snd:Sound = new Sound();
snd.attachSound("chimes");


btn.onRollOver = function() {
snd.start();
}

btn.onPress = function() {
snd.stop();
}
btn.onRollOut = function() {
snd.stop();
}

This will play the sound on rollover but will stop the sound on a press or rollout. Hope this helps.