I am looking at code for a simple preloader
I have three frames in scene 1, frame 2 simply says: this.gotoAndPlay(1);, frame 3 says stop(); and here is the code for frame 1:
bytes_loaded=Math.round(this.getBytesLoaded());
bytes_total=Math.round(this.getBytesTotal());
getPercent=bytes_loaded/bytes_total;
this.loadbar._width=getPercent400;
this.Loadtext=Math.round(getpercent100)+"%";
if(bytes_loaded==bytes_total){
this.gotoAndPlay(3);
}
loadbar - when I look in library it is called LoadBar and it is a movie clip
when I click on the movie clip and look under at properties panel it is called LoadBar?
If I double click on the LoadBar instance - inside the movie clip time line it says LoadBar?
confused :- (
If I change the code from
this.loadbar._width=getPercent*400
to -->
this.LoadBar._width = getPercent*400 (it works)
if I change the code to:
this.loadBar._width = getPercent*400 (it works)
if I change the code to:
this.loadbar._width = getPercent*400 (it works)
Similarly if I call it LOADBAR, or LOadBar, or LOadBAR or LOadBar etc it all works as expected
however if I call it loadb, or loady it does not work
I am very confused please, please help
How can this be case sensitive???