A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: pre-loader NOT LOADING!

  1. #1
    Designer Persistent1's Avatar
    Join Date
    May 2003
    Location
    Columbus, OH
    Posts
    233

    pre-loader NOT LOADING!

    I have a movie called resume.fla and in that movie have a pre-loader on the firs frame with the following action script;

    stop();
    onClipEvent (enterFrame) {
    loading = _parent.getBytesLoaded();
    total = _parent.getBytesTotal();
    percent -= (percent-((loading/total)*100))*.25;
    per = int(percent);
    percentage = per+"%";
    loadBar._width = per;
    if (percent>99) {
    _parent.gotoAndStop(2);
    }
    }


    The animation and movie proceeds then on to frame 2. However, the pre-loader doesnot work. I used it in many other movies I am building and it works fine. Do I have the wrong decription tag; (i.e.- _parent instead of maybee a _parent._parent or _this tag)? Any help would be great. Thanks and if you need to see the fla to see hwat I am talking about, let me know where I can email it to you. Thanks a million.
    -Persistent1

  2. #2
    I'm not a vegetarian
    Join Date
    Sep 2001
    Posts
    498
    try this preloader:

    (you need to publish to see the percentage increment - it will always jump to 100 when you test your movie)

    Code:
    _root.onEnterFrame = function() {
            // percentage of the _root that has loaded
            myPercent = (Math.round(_root.getBytesLoaded())/Math.round(_root.getBytesTotal()))*100;
            if (!isNan(myPercent)) {
                    trace(myPercent+"% loaded");
            } else {
                    trace("0% loaded");
            }
            if (myPercent == 100) {
                    trace("loaded "+ myPercent+"%. All done!");
                    delete _root.onEnterFrame;
                    // do something
            }
    };
    Last edited by lentil dal; 11-21-2003 at 11:14 AM.
    give me all your lentils

  3. #3
    Designer Persistent1's Avatar
    Join Date
    May 2003
    Location
    Columbus, OH
    Posts
    233
    nope, didn't work. Same problem as the other one.
    -Persistent1

  4. #4
    I'm not a vegetarian
    Join Date
    Sep 2001
    Posts
    498
    it does work - must be something else wrong with your movie
    give me all your lentils

  5. #5
    Spartan Mop Warrior Loyal Rogue's Avatar
    Join Date
    Apr 2003
    Location
    The Pit of Despair
    Posts
    513
    Hi Persistent1,

    I can't do Flash on this computer, but it looks like you are using the exact same code as in the preloader I've attached here.
    It's a great one frame preloader, and the *.25 part makes it go nice & smooth.
    (We must have used the same tute.)

    Open the .fla and compare the AS on my movieclip to what you have there.
    I would, but I can't open my own .fla on this pc.
    Attached Files Attached Files
    ::
    "Just go make web and stfu already." - jAQUAN

    "Twitter is a public display of verbal diarrhea that comes out in small squirts." - Gerbick

  6. #6
    Spartan Mop Warrior Loyal Rogue's Avatar
    Join Date
    Apr 2003
    Location
    The Pit of Despair
    Posts
    513
    When you say it they don't work, what do you mean?
    That you don't see them before the movie starts, or that the movie doesn't get past the preloader?
    Are you uploading it to your server first?
    Are you clearing your browser's cache (temp internet files)?
    ::
    "Just go make web and stfu already." - jAQUAN

    "Twitter is a public display of verbal diarrhea that comes out in small squirts." - Gerbick

  7. #7
    I'm not a vegetarian
    Join Date
    Sep 2001
    Posts
    498
    my loader works fine

    http://lentildal.co.uk/load
    give me all your lentils

  8. #8
    Designer Persistent1's Avatar
    Join Date
    May 2003
    Location
    Columbus, OH
    Posts
    233
    loyal rogue, i cannot open the .fla you sent me for some reason. Is is cross platform issues possibly? I am on a mac, using MX. Try emailing it to me if you can,

    craigmu@bgnet.bgsu.edu


    Thanks.
    -Persistent1

  9. #9
    Spartan Mop Warrior Loyal Rogue's Avatar
    Join Date
    Apr 2003
    Location
    The Pit of Despair
    Posts
    513
    Yep. Compatibility issues.
    I'm using a PC.
    I have never been able to open a mac .fla either...

    I have emailed it to you, but I don't know if that will help.
    I can check your code against mine when I get home tonight and post back here.

    Again, just to clarify, what is happening when you try to use either your preloader or lentil's preloader?
    ::
    "Just go make web and stfu already." - jAQUAN

    "Twitter is a public display of verbal diarrhea that comes out in small squirts." - Gerbick

  10. #10
    Designer Persistent1's Avatar
    Join Date
    May 2003
    Location
    Columbus, OH
    Posts
    233
    Checked both your file code and my files code. Both match up, mine just doesn't work. I mean that the pre-loader doesn't even appear and it just skips to the animation and rest of the movie. Its almost as if there is no pre-loader even there. Thanks for look'n at it tonight. Let me know what you find out.

    later,

    -craig
    -Persistent1

  11. #11
    I'm not a vegetarian
    Join Date
    Sep 2001
    Posts
    498
    sounds like you've got the file cached.

    empty temp internet files/cache
    delete history
    restart browser

    if that doesn't work restart your machine
    give me all your lentils

  12. #12
    Spartan Mop Warrior Loyal Rogue's Avatar
    Join Date
    Apr 2003
    Location
    The Pit of Despair
    Posts
    513
    Do you have a link to the webpage for us?

    If you are just running it on your computer, the preloader won't show up.
    ::
    "Just go make web and stfu already." - jAQUAN

    "Twitter is a public display of verbal diarrhea that comes out in small squirts." - Gerbick

  13. #13
    Designer Persistent1's Avatar
    Join Date
    May 2003
    Location
    Columbus, OH
    Posts
    233
    it's work'n now. the main problem was that I had placed the onClipEvent() on the first frame
    of the timeline instead of on the preloader clip. also put path names on the getBytesLoaded and
    getBytesTotal . also the last line of the code in preloader was changed from
    _parent.gotoAndStop(2); to _root.play();


    Thanks for your intrest in helping me , both of you. I'll probably be bugg'n you here in a matter of 24hrs as i progress and stumble upon new querks in my code though.

    later,
    -Persistent1

  14. #14
    I'm not a vegetarian
    Join Date
    Sep 2001
    Posts
    498
    you should put the code on the main timeline and use _root.onEnterFrame instead like in the example I gave you. the code is much more versatile and can be applied in many more situations.
    give me all your lentils

  15. #15
    Designer Persistent1's Avatar
    Join Date
    May 2003
    Location
    Columbus, OH
    Posts
    233
    thanks lentil dal, I will give it a try and see which works best for me. I appreciate the help and advice.
    -Persistent1

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