-
Preloader
I want to insert a bar into the first frame of my Flash website that displays the loading progress. I created a bar, used a shape tween on it and then added the following actionship to the movie clip, which is called 'bar_mc':
--
stop();
bar_mc.onEnterFrame=function(){
this.gotoAndPlay(Math.round((_root.getBytesLoaded( )/_root.getBytesTotal())*100));
if(_root.getBytesLoaded()==_root.getBytesTotal()){
play();
}
};
---
For some reason when I test the flash file offline it reports 2 errors and the bar repeatedly fills up. Is there something I need to add to the above code? I got it from a web designer magazine.
-
Hard to say without seeing your actual setup, but I'd say you'd have to delete the onEnterFrame, when the preloading's done...
You might want to check this other preloading code...