[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]
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]
_root.sfx.start();
[/INDENT][FONT=verdana, arial, helvetica][SIZE=1]
but it does’nt work.
How to do that ?
Thanks a lot …
PS : sorry for my bad english[/SIZE][/FONT]