# Sound Chaos using ActionScript!

**URL:** <https://forum.kirupa.com/t/sound-chaos-using-actionscript/175946>\
**Category:** flash\
**Created:** [January 19, 2006, 1:36am UTC](https://forum.kirupa.com/t/sound-chaos-using-actionscript/175946 "2006-01-19T01:36:09Z")\
**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 19, 2006, 1:36am UTC](https://forum.kirupa.com/t/sound-chaos-using-actionscript/175946/1 "2006-01-19T01:36:09Z")

</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.
