A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: NEED HELP WITH MY PRELOADER!!!!

  1. #1
    Please can someone help me with my preloading problems that i haved for years now!!

    I am jusing this code:
    ______________________________________________
    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);
    }
    _______________________________________________

    I have copy it from a tutorial on flashkit.

    The problem I have is that in some swf movies that i use
    this scrip it wont go to the frame i tell in the scrip! It just jumps into the next scene somewere.

    Sometimes the scrip works - this is very confusing!!
    Please can someone help me!

    niklas@handelsakademien.se

  2. #2
    FlashKit Joker
    Join Date
    Jan 2001
    Posts
    659
    Maybe this will help:

    Code:
    loadedbytes = getBytesLoaded();
    totalbytes = getBytesTotal();
    loadedkbytes = Math.ceil(loadedbytes/1000);
    totalkbytes = Math.ceil(totalbytes/1000);
    if (loadedbytes == totalbytes) {
        gotoAndPlay ("yourscene", 1);
    }
    frame = int(loadedbytes/(totalbytes/100));
    tellTarget (_root.loader) {
        gotoAndStop (_root.frame);
    }
    Cheers

  3. #3
    Nope it didn't make any differens!

    It still jumps into the last frame of the scene2.
    I don't get it - why?

    This is how it all works,

    first there is a move loaded called default.swf and in this move there is a button that's loadmove we.swf and in we.swf there is two scenes called "preload" and "scene2".

    There must be something vrong somewere?!

    loadedbytes = getBytesLoaded();
    totalbytes = getBytesTotal();
    loadedkbytes = Math.ceil(loadedbytes/1000);
    totalkbytes = Math.ceil(totalbytes/1000);
    if (loadedbytes == totalbytes) {
    gotoAndStop ("Scene2", 1);
    }
    frame = int(loadedbytes/(totalbytes/100));
    tellTarget (_root.loader) {
    gotoAndStop (_root.frame);
    }

    The thing is that a use this scrip in an other production an there it works perfect. But there its only one frame in scene2 - can it have something with that? Or that here I use some loadmove scripts, dose it need some _root tellings?
    Please help! =)

  4. #4
    FlashKit Joker
    Join Date
    Jan 2001
    Posts
    659
    hmmm...I can't see the prob. Maybe you should post it at FK Actionscript Forum or contact the creator of the preloader.

    mailto: rf_outer@hotmail.com (he's the creator of the preloader)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center