# Problem reading sound of another swf

**URL:** <https://forum.kirupa.com/t/problem-reading-sound-of-another-swf/184731>\
**Category:** flash\
**Created:** [April 7, 2006, 9:30am UTC](https://forum.kirupa.com/t/problem-reading-sound-of-another-swf/184731 "2006-04-07T09:30:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thekinder](https://avatars.discourse-cdn.com/v4/letter/t/da6949/32.png) [@thekinder](https://forum.kirupa.com/u/thekinder)\
**Post date:** [April 7, 2006, 9:30am UTC](https://forum.kirupa.com/t/problem-reading-sound-of-another-swf/184731/1 "2006-04-07T09:30:27Z")

</div>

[FONT=verdana, arial, helvetica][SIZE=1]Hi evrybody,[/SIZE][/FONT]  
[FONT=verdana, arial, helvetica][SIZE=1]this is my first post on this forum, I hope you 'll help me.[/SIZE][/FONT]  
[FONT=verdana, arial, helvetica][SIZE=1]I’m making my own flash website and I have a sound problem. I explain :[/SIZE][/FONT]  
[FONT=verdana, arial, helvetica][SIZE=1]In my main swf on frame 1 I have a movieClipLoader which load a swf containing musics and sounds. So I can make my preload on frame 1[/SIZE][/FONT]  
[FONT=verdana, arial, helvetica][SIZE=1]Then, on frame 2 I have my interface, etc … and I would like to use the sounds loaded in my frame 1 but it does’nt work. Here is my code :[/SIZE][/FONT]  
[FONT=verdana, arial, helvetica][SIZE=1]  
Frame 1

[/SIZE][/FONT][INDENT]

```php

var monClip_mcl = new MovieClipLoader();
var monEcouteurDeClip = new Object();
monEcouteurDeClip.onLoadProgress = function(cible, loadedBytes, totalBytes){ 
//blablabla .....
};
monEcouteurDeClip.onLoadComplete = function(cible){ 
//blablabla .....
};
monEcouteurDeClip.onLoadInit = function(cible){ 
sfx = new Sound (cible); 
sfx.attachSound("ambiance1"); 
sfx.start(); gotoAndStop(_currentframe+1);
};
monEcouteurDeClip.onLoadError = function(cible, codeErreur){ 
trace("Une erreur est servenue lors du chargement" + codeErreur);
};
monClip_mcl.addListener(monEcouteurDeClip);
monClip_mcl.loadClip("sfxlib.swf", soundClip);

```

[SIZE=1][FONT=verdana, arial, helvetica]With this code, i read the sound on frame 1  
[/FONT][/SIZE]

[/INDENT][SIZE=1][FONT=verdana, arial, helvetica]To read sound on frame 2 i wrote this code :

[/FONT][/SIZE][INDENT]

```php

_root.sfx.start();

```

[/INDENT][FONT=verdana, arial, helvetica][SIZE=1]

but it does’nt work.

How to do that ? ![](http://www.flash-france.com/forums/images/smilies/frown.gif)  
Thanks a lot …

PS : sorry for my bad english[/SIZE][/FONT]
