# Play sound on frame event!

**URL:** <https://forum.kirupa.com/t/play-sound-on-frame-event/175931>\
**Category:** Uncategorized\
**Created:** [January 18, 2006, 10:49pm UTC](https://forum.kirupa.com/t/play-sound-on-frame-event/175931 "2006-01-18T22:49:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bzouchir](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bzouchir/32/2088_2.png) [@bzouchir](https://forum.kirupa.com/u/bzouchir)\
**Post date:** [January 18, 2006, 10:49pm UTC](https://forum.kirupa.com/t/play-sound-on-frame-event/175931/1 "2006-01-18T22:49:27Z")

</div>

Hi guys,

I’m putting music for my flash website, I’m adding the audio using Actionscript as per the tutorial below:

This is my script assigned to a mc at the frame I want the music to start play:

onClipEvent (load) {  
mySound = new Sound();  
mySound.setVolume(\_root.volume\*2);  
mySound.attachSound(“backgroundmusic”);  
mySound.start(0,999);  
}

with a stop(); on that frame.

the problem is that obviously flash keeps creating that sound over and over on top creating a chaos!

Is there anyway to trigger that sound only once!?  
or how can I trigger it when it reaches a certain frame without using a clipEvent?

Please help since that the only thing keeping me from launching the website! :hurt:

thx.
