-
(flash 5)i am using the following script for a preloader in the first of a two scene movie...when it finishes and loads the second scene , it jumps over about a quarter of the second scene and proceeds to loop 30 some odd frames...it seems to get stuck..can you figure out if there is something wrong with the script or what?..how can i fix it/figure it out?..i got a deadline, any ideas appreciated...thanks....
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);
}
-
explaination..?
Try using
loadedbytes=_root.getBytesLoaded();
totalbytes=_root.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);
}
-
AKA [ Paul Bainbridge]
This is my preloader script i hope it helps
var byteload = _root.getBytesLoaded();
var bytetotal = _root.getBytesTotal();
var ready = Math.round((byteload/bytetotal)*100);
var kilobytes = Math.round(bytetotal/1000);
var output = ready+"%"+" "+"of"+" "+kilobytes+"kb";
bar1._xscale=ready
if (ready == 100) {
_root.gotoAndPlay("start");
} else {
gotoAndPlay ("loading");
}
-
thanks for the effort, with your code the problem remains the same...the preloader works and counts up to 100% and then loads to a quarter way through the following scene and loops 30 frames or so...any other ideas?...
-
thanks webdreamer, i am trying it out now....
-
AKA [ Paul Bainbridge]
If you can't get it to work i suggest you download and have a look @ one of the many preloaders that can be found in the movie section.
-
thanks a lot webdeamer, the movies section suggestion was excellent!...
-
WOW!
Jeez, I was having the same problem yesterday -- Thanks webdreamer!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|