Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mySound.start(0,999); problem

Status
Not open for further replies.

bubu

Programmer
Mar 3, 2002
463
RO
Hello guys!

I have a movie...the main movie...and on it's main timeline an empty movieclip (instance name: holder_mc) in which i load the sound_mc with this action:

_root.holder_mc.loadMovie("flash/sound_mc.swf",5);

...sound_mc movie loads just fine but the music doesn't plays...here is the action from the first frame of sound_mc movie:

mySound=new Sound();
mySound.attachSound("sound1");
level5.mySound.start(0,999);
stop();

...sound1 is the identifier from the linkage panel of the .mp3 in the library. Export for actionscript, and export in first frame are checked.

The problem...i guess...is with this:
level5.mySound.start(0,999);

I tried many combinations...but it doesn't work.

Please advise!





Regards,
Dragos.


 
First, you're mixing up loading in a container clip and on another level...

Try...

loadMovieNum("flash/sound_mc.swf",5);

And in that sound_mc movie, add this (as you ALLWAYS should eventhough MM says the parameter is optional) to your sound object's definition...

mySound=new Sound(this);
mySound.attachSound("sound1");
level5.mySound.start(0,999);
stop();





Regards,

cubalibre2.gif
 
In fact you shouldn't even need to specify _level5 (another typo or is it an error - it should in any case be _level5 and not level5 alone) in the sound movie itself...

mySound=new Sound(this);
mySound.attachSound("sound1");
mySound.start(0,999);
stop();

You would use _level5, only if you were starting the sound from _level0 or your root movie.



Regards,

cubalibre2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top