Preloader is used for load the full swf file in the
computer's memory. And then play the swf file. By this
process any heavy swf file will play smoothly.
we can use preloading functionality on the first frame as:
stop();
this.onEnterFunction = function(){
percent = (_root.getBytesLoaded()/_root.getBytesTotal())*100;
if(percent==100){
play()
}
Thanks,
Uday
Sr. Flash Developer
uday_sgh@yahoo.com
+91-9701155575
Generally Flash will load starting from Frame one.
If we have animations and scripts then A flash which loads
without a preloader will move through frames immediately
when they load. In this way flash run with glitches and the
actions in the frames cannot access objects on the stage of
that frame as frame loads first with actions and objects
next[this i have faced in many experiments]. so Even the
code is correct it will malfunction.
For this purpose we use preloader to stop the movie in the
first frame and check the progress of the loading of entire
move. Once the loading is finished it is OK to go.
the default var used in preloader are
bytesLoaded
bytesTotal
More we create a var which we name it as 'per' to calculate
the percent loaded. once it reaches 100 which means it is
loaded.