A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: preloader problem

  1. #1
    SeniorMember yet almost newbie deniel87's Avatar
    Join Date
    Oct 2001
    Posts
    202

    preloader problem

    why doesnt this work???
    I have MC1 in the first frame (which is stopped). Inside MC1 there is MC2
    MC2 has the following script:
    Code:
    onClipEvent (enterFrame) {
        loadedbytes = getBytesLoaded();
        totalbytes = getBytesTotal();
        if (totalbyter == loadedbytes) {
            nextScene();
        }
    }
    {
    the movie is supposed to change scene when it finishes loading... but it wont work
    Thanks for helping

  2. #2
    general rule bender Gloomycus's Avatar
    Join Date
    Nov 2000
    Location
    ontario canada
    Posts
    1,538
    code:

    onClipEvent (enterFrame) {
    loadedbytes = _root.getBytesLoaded();
    totalbytes = _root.getBytesTotal();
    if (totalbyter == loadedbytes) {
    _root.nextScene();
    }
    }


  3. #3
    SeniorMember yet almost newbie deniel87's Avatar
    Join Date
    Oct 2001
    Posts
    202

    doesnt work

    mmmm that wont work
    Thanks for helping

  4. #4
    Member
    Join Date
    Jul 2003
    Location
    UK - aka: stupidland
    Posts
    41

    Re: doesnt work

    Erm... it isn't the simple fact that you've put totalbyter and not totalbytes is it? the simplist things are usually what's wrong


    -Luke
    www.essentialparadox.com

    "I only post a question when i've thoroughly searched beforehand"

  5. #5
    SeniorMember yet almost newbie deniel87's Avatar
    Join Date
    Oct 2001
    Posts
    202

    ok u r right

    that mistake u pointed is right, but it isnt the main problem
    here's the code again:
    Code:
    onClipEvent (enterFrame) {
            loadedbytes = _root.getBytesLoaded();
            totalbytes = _root.getBytesTotal();
            if (totalbytes == loadedbytes) {
                    _root.nextScene();
            }
    }
    I've corrected the "byter" thing, but the thing that doesnt work is the "_root.nextScene" WHY!???
    I tried seting an alfa property of 50 to a MC if the condition is verified and it works fine, but the going to the next scene doesnt work
    Thanks for helping

  6. #6
    Member
    Join Date
    Jul 2003
    Location
    UK - aka: stupidland
    Posts
    41
    Did you say the first scene is stopped? Why so?


    -Luke
    www.essentialparadox.com

    "I only post a question when i've thoroughly searched beforehand"

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