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!

music clip in preloader

Status
Not open for further replies.

Ragol1

Programmer
Oct 25, 2001
315
US
I have a pre loader in my site that loops frame 2 and 3 untill site is loaded.

I have added another layer called music and put a sound clip that is about as long as the loading process, but because the preloader loops the sound clip keeps looping frame 2 and 3.
Once the pre loader is done frame 5 starts the movie at which point I want the sound to stop.

please help

Nick
 
Code:
mysound = new Sound(this);
mysound.loadSound("[URL unfurl="true"]http://mysite.com/music.mp3",[/URL] true);
mysound.start();
Regards,

oldman3.gif


Don't worry, if my reply is wrong, BillWatson will clean it up for me!
 
ok i done this and still nothing
in frame 1

mysound = new Sound(this);
mysound.loadsound("mysound.start();

in frame 5 (which is start of movie)

mysound.stop();

when i do the .attachsound it does work but it plays too quick.

I just give up unless anyone has any other suggestions?
I have tried deleteing the layer and adding the script to an exsisting layer but still nada.


I wish I knew what I was doing wrong... could it have anything to do with my preloader???

here is the code for it

Frame 1 is empty

Frame 2
loadedbytes=getBytesLoaded();
totalbytes=getBytesTotal();
loadedkbytes=Math.ceil (loadedbytes/1024);
totalkbytes=Math.ceil(totalbytes/1024);
if (loadedbytes == totalbytes) {
gotoAndPlay (4);
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}

frame 3 and 4
gotoAndPlay(1);


arrrrrrggggg

Thanks for all your help guys.
Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top