I am new to flash, so one question rushed into my head. I found a lof of topics about preloaders here, but I want to create very simple preloader without such things like getBitesLoaded and similiar. I want simple preloader which would only show a line without any percents and bytes. Can anyone help me? Write Action Script or explain how to create it without Action Script.
I think what Ilyalmasse is trying to say is that to just create a bar the loads according to your movie you have to have getBytesLoaed in your code. Otherwise it won’t work properly, it don’t have to show the getBytesLoaded(); but it will allow for the bar to scale properly in conjunction with your movie that you want to preload. I hope you understand what were trying to say.
The code would look like this.
//All this is necessary for the code to function properly
onClipEvent(enterFrame){
if(_root.getBytesLoaded () > 0 && _root.getBytesLoaded() == _root.getBytesTotal() )
_root.gotoAndPlay(“beginMovie”);
}else{
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
percent = int(loaded/total * 100)
//Scales the bar to percent, which has to have getBytesLoaded()
bar._xscale = percent;
}
}
Thanks for the Action Script a lot, now please help me to do the line. I have tryed to make one : I drew a rectangle with filled it with color. But the fill in rectagle doesn’t change depending on loaded bytes.
create a new layer drag ur movie across 2 frames then in ur nw layer add this script into the second layer or first im not sure try both out then pressctrl+enter then press it again u shold c a red loader bar