Problem with loading

i’ll just past here all the code and explain later the problem i’m having:

this.createEmptyMovieClip(“empresa1”, 1);
//posiçao e alpha do empresa
empresa1._x= 0;
empresa1._y= 0;
//loadmovie do empresa
empresa1.loadMovie(“random/empresa/1.jpg”);
//preloader
a = empresa1.getBytesLoaded();
b = empresa1.getBytesTotal();
if ( a == b ) {_parent.gotoAndPlay (2);}
stop();

this is working on only one frame, no more frames for this code, as you can see with the stop action.
so there are two things here: one - it would work, two - A would never be equal to B.
well if i get the if deleted, the animation from the _parent won’t happen, and with if it will, so, on one time A is equal to B, it works, but still a problem… it does like if empresa1 is empty! it doesnt load the image, the animation is done but image is still loading.
the idea of doing this was so that the image would softly appear through a mask.
sorry english, any doubt i’ll give an answer…

please help me

hey. send me a private message in portuguese :slight_smile:

maybe ill be able to help you. thats a really bad english dude :stuck_out_tongue:

yes kind of… just a poor translation from portuguese to english.
still having the problem, please help i don’t know why is this happening, please tell me what you don’t understand.

got it.
dont you think there’s something missing in there to display load progress? something like… hmm… onEnterFrame ?

lol

this.createEmptyMovieClip(“empresa1”, 1);
//posiçao e alpha do empresa
empresa1._x= 0;
empresa1._y= 0;
//loadmovie do empresa
empresa1.loadMovie(“random/empresa/1.jpg”);
//preloader
this.onEnterFrame = function(){
a = empresa1.getBytesLoaded();
b = empresa1.getBytesTotal();
if ( a == b ) {
_parent.gotoAndPlay (2);
delete this.onEnterFrame
}
}

strange… but it works! thanks… do you have msn or something?

ok new problem around this one… thanks for the help pantas, stupid error and now a stupid question:
this.onEnterFrame = function(){
a = empresa1.getBytesLoaded();
b = empresa1.getBytesTotal();
c = Math.ceil((a/b)*100);
this.preloader.text = c;
if ( a == b ) {
_parent.gotoAndPlay (2);
delete this.onEnterFrame
}
}
if ( a == b ) {_parent.gotoAndPlay (2);}
stop();

here it is the final code, preloader is supposed to be a dynamic text with the instance preloader. but it isn’t working, do you know why? maybe another stupid error.

check your private messages. sent you my contact