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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing form preloading scene into main scene. 1

Status
Not open for further replies.

eladi

Programmer
Sep 4, 2001
80
AU
hi all,

i've got a problem i can't figure out. i'm working on my website in flash. this is how i will do it:


now, you see the letters cercling around in the upper left corner. all is well. now i created a preloader (there will be heavy stuff on it...maybe even shockwave files). i chose to do it with a new scene. it's a basic one. bar filling up, a few dynamic texts with the status. this is working too.
but then, when the preloading is done, it jumps into the main scene. everything appears and works. but the circeling letters don't work anymore. they run on a little loop for themselves. it's actually the only loop i have on my mainline. the rest is in mc's. i even tried to put the letters in a mc. didn't work either. it seems as the letters wouldn't initialize anymore. i checked if there are no already set variables coming over from the preloader. negative. i'm out of wisdom. if anyone could help me...i'd send the files, if nothing else helps. it's nothing really to steal.

tnx
adrian
 
Post your .fla or better a link to it, including your preloader scene. Regards,

oldman3.gif
 
Yeah! That preloader has been f.... things for many users!

The way it's coded, it actually sends the main movie to frame 100 (100% loaded), or to the last frame you have in your movie if you have less than 100 frames. Since your letters are iniated on frame 1 of your main scene, and that frame 1 is bypassed, then obviously they don't show up.

Correct the preloader to this, and everything will work fine again:

loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1000);
totalkbytes = Math.ceil(totalbytes/1000);
frame = int(loadedbytes/(totalbytes/100));

if (loadedbytes >= totalbytes) {
gotoAndPlay("aresthetics", 1);
} else {
_root.loader.gotoAndStop(frame);
}

tellTarget is deprecated, I've used simple dot syntax instead! But it's the "else" that really makes the difference.
Regards,

oldman3.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top