# \_global sound element/ shared Object sound

**URL:** <https://forum.kirupa.com/t/-global-sound-element-shared-object-sound/214631>\
**Category:** flash\
**Created:** [January 30, 2007, 6:31pm UTC](https://forum.kirupa.com/t/-global-sound-element-shared-object-sound/214631 "2007-01-30T18:31:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GrndMasterFlash](https://avatars.discourse-cdn.com/v4/letter/g/71c47a/32.png) [@GrndMasterFlash](https://forum.kirupa.com/u/GrndMasterFlash)\
**Post date:** [January 30, 2007, 6:31pm UTC](https://forum.kirupa.com/t/-global-sound-element-shared-object-sound/214631/1 "2007-01-30T18:31:55Z")

</div>

THIS IS DRIVING ME CRAZY  
Im programing a childrens game that teaches music.  
Needless to say there are a lot of sounds involved, so natuarrally I only want the sounds to load one time then just be referanced later to be played.  
However, this game consists of about 10 different .swf files, that jump back and forth depending on user navigation.  
I have tried defining the sounds as \_global like so

\_global.mysound = new Sound ();  
\_global.mysound.loadSound(“noise.mp3”)  
playsnd = function(){  
\_global.mysound.start(0,0)  
}  
However this will only play in the clip it was defiend in, and I need it to be able to be called from any of the .swfs

I use this code to transpher between movies

unloadMovie(this)  
loadMovie(“new”, this)

I have also tried converting the sound to a Shared:Object but it two only plays in the clip it was defiend in

user\_so = SharedObject.getLocal(“sndz”);  
\_global.sndz = new Sound(this);  
sndz.loadSound(“soundz/parry.mp3”);  
user\_so.data.song = \_global.sndz;  
\_global.playsnd = function() {  
trace(“getting called”);  
user\_so.data.song.start(123, 1);  
};  
user\_so.flush();

OMFG, I have a deadline on Thursday, and I have not been making any progress  
PLEAS HELP!!!
