# Activating a sound on Rollover

**URL:** <https://forum.kirupa.com/t/activating-a-sound-on-rollover/152077>\
**Category:** flash\
**Created:** [June 21, 2005, 1:58am UTC](https://forum.kirupa.com/t/activating-a-sound-on-rollover/152077 "2005-06-21T01:58:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sweatbox](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@sweatbox](https://forum.kirupa.com/u/sweatbox)\
**Post date:** [June 21, 2005, 1:58am UTC](https://forum.kirupa.com/t/activating-a-sound-on-rollover/152077/1 "2005-06-21T01:58:11Z")

</div>

I have an invisible button in a swf called “birds.swf” When you rollover the invisible button, a sound is activated. It works fine when I test it in the “birds.swf”. But when the “birds.swf” is loaded into the “stage.swf” on level 10, no sound is heard. I’m sure there’s a simple solution, I’m just spacing out right now.

Here’s the code I put on the main timeline. The invisible button is named “birds”.  
[AS]  
mySound =new Sound(pic)  
birds.onRollOver =function(){  
mySound.attachSound(“joinsound”);  
mySound.start();  
}  
[/AS]

Anyone?

Thanks in advance.
