Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stop();
- //-----
- //-------------preloader------
- //make the preloader bar not appear "full" right away
- bar_mc._xscale = 0;
- //load Movie into level 1
- loadMovieNum("/chocolates/FoiledChocolateHeartsNew.swf", 1);
- //not the movie to load has a blank first frame.
- _level1.stop();
- onEnterFrame = function () {
- // get the bytes of Level 1 and make into a percent
- percent = Math.ceil((_level1.getBytesLoaded()/_level1.getBytesTotal())*100);
- //use the percent to determine the xscale of the preloader bar.
- bar_mc._xscale = percent;
- // if loaded play level1
- if (percent>99) {
- //note you MUST delete onEnterFrame otherwise it
- //will continue to run.
- loadText._alpha=0;
- bar_mc._alpha=0;
- loadBorder._alpha=0;
- delete this.onEnterFrame;
- _level1.gotoAndPlay(2);
- }
- };
Add Comment
Please, Sign In to add comment