Image preloader *sigh* (again)

alright here’s the code


this.createEmptyMovieClip("preloader", 1000);
this.createEmptyMovieClip("container", 1001);
with (container) {
        loadMovie(_root.picture);
        _x = 240;
        _y = -60;
        _xscale = 35;
        _yscale = 35;
        _visible = false;
}
preloader.onEnterFrame = function() {
        var l = container.getBytesLoaded();
        var t = container.getBytesTotal();
        var getPercent = l/t;
        loadText = Math.round(getPercent*100)+"%";
        loadBar._width = getPercent*160.5;
        if (l>0 && l>=t) {
                container._visible = 1;
                loadText = ""
                loadBar._visible = 0;

lostinbeta: i thought it was working yesterday but then it really wasn’t :frowning: so i need help figuring out what’s wrong with it

the preloader shows like it’s supposed to for the first image. but when subsequent images are called then loaded, the preloader doesn’t show. yes i cleared my cache

--------------------edit-------------------
you can see the problem at http://www.aaronsleeper.com

:hangover:
Well the text keeps showing and updating fine (but hard to see because of the color BTW)

But you never make your loadBar visible again, so that doesn’t show.

right … i tried to make it visible again … that’s how i broke it yesterday … where do i put the code to say loadBar._visible = 1; ??

Put that on the code you use in your onPress so that when you press the button, the bar becomes visible again.

genius … but it didn’t work :frowning:

in the on press function for the buttons i put designtext.loadBar._visible = 1;

but it didn’t work … it made the whole preloader invisible

Well that makes no sense. If you set something to be visible, then there is no reason that it would make the clip it is inside invisible.

There must be conflicting code in there somewhere.

Also… you might want to take a look at Senoculars noCache prototype here…

http://www.kirupaforum.com/forums/showthread.php?s=&threadid=14268&perpage=15&pagenumber=3

It would save you from having to clear your cache because if you add it to your loadMovie code that loads the .jpg image (shows how to use in thread) then it prevents it from getting cached.