File version: 6

File size: 12762

Frame rate: 20.000000

Frame count: 3

Movie width: 450.00

Movie height: 200.00


Back to examples

# -------------------------------------------------------------------------------------------------------------         # 
# PreLoaderTemplate2.sc - PreloaderTemplate with percent info                                                           #
# Technoargia - june 2006                                                                                               #
#                                                                                                                       #
# To use this preloader :                                                                                               #               
#        swfcombine -o result.swf  PreLoaderTemplate2.swf -x 200 -y 250 loader=swft_loader.swf movie=main_movie.swf     #
#        Maybe you need to change some coordinates to match your movie document....                                     #
# -------------------------------------------------------------------------------------------------------------         # 

.flash name=PreLoaderTemplate2.swf bbox=768x553 background=white version=6

.edittext info text="info" color=black size=100% width=200 height=20 align=center border=none noselect variable=percentVar

.frame 1

          .sprite loader # Empty sprite to be replaced by swfcombine
          .end 
        .put loader x=-60
        .put info pin=center x=334 y=400 alpha=50%

.frame 2

.action:

        _root.getBytesTotal();
        info._alpha = 50;
        info.embedFonts = 0;
        var monStyle = new TextFormat();
            monstyle.bold = false;
            monStyle.italic = false;
            monStyle.border = false;
            monStyle.font = "_sans";
        info.setTextFormat(monStyle);
        percentVar = "Chargement...       " + (String (int ((_root.getBytesLoaded() * 100) / _root.getBytesTotal())) + "%" );
        if (((_root.getBytesLoaded() * 100) / _root.getBytesTotal()) < 100) {
                gotoAndPlay (1);
        }

.end

.frame 3

         .sprite movie # Empty sprite to be replaced by swfcombine
         .end
        .put movie
        .stop

.end