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

preloader problems 1

Status
Not open for further replies.

349228502

Technical User
Apr 24, 2002
3
IT
I've written this action script in my preloader:
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1000);
totalkbytes = Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
nextScene ();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
The problem is that when it pass to the second scene I can see just some movie clips and not other parts!
 
What not other parts?
Regards,

new.gif
 
after preloading the .swf start to view the movie but it's not complete!it shows just some movie clip simbols jumping everything else...
 
What everything else?

Ya see!... You seem to be questioning your preloader. I question what else is not showing up. Are these loaded movies using the loadMovie action, for example? Or is what's not visible, been set to invisible?
I'm not sitting besides you, and can't see what your taking about.
In the end, if you take your preloader out, does everything work fine, or is it still the same?
Regards,

new.gif
 
I send you the .fla I can't explane me better...
 
In your frame 2 script, change your 2 red lines with my bold ones:


loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1000);
totalkbytes = Math.ceil(totalbytes/1000);
progress=int((loadedbytes*100)/totalbytes)add"%";
//if (loadedbytes == totalbytes) {
if (loadedbytes >= totalbytes) {
//nextScene();
gotoAndPlay ("Scena 1", 1);
}

The main problem was your use of the tellTarget action.
Replace this:

frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.barra) {
gotoAndStop (_root.frame);
}

With:

frame = int(loadedbytes/(totalbytes/100));
_root.barra.gotoAndStop (frame);


Might I be blessed with your vote!
(N'en déplaise à certains! - They know who they are!) Regards,

new.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top