• home
  • forum
  • my
  • kt
  • download
  • Flash Preloader

    Author: 2007-06-14 17:28:15 From:

    Step 1

    Create a new Flash Documet, take the Text Tool (T), in the Properties Panel (Ctrl+F3) set the font and size which you like and type load somewhere on the stage. Look at the picture below!



    Step 2

    Select that text ("loading") and press F8 to turn the text in a Movie Clip symbol. Name it whatever you like.



    Step 3

    Open the Properties Panel (Ctrl+F3), and for   type loading_mc.



    Step 4

    Double click the Movie Clip and go into symbol editing mode.

    Step 5

    Then, press ten times F6 on the keyboard (keyframe). Look at the picture below!



    Step 6

    Click on every second frame and press delete key on the keyboard.



    Step 7

    Insert a new layer and name it percent.

     

    Step 8

    Take the Text Tool (T) and click somewhere beneath the "loading" text. In the Propertise Panel (Ctrl+F3) choose Dynamic Text, and for var: type percent. See the picture below.



    Step 9

    In text box type 0.




    Step 10

    Go back on the main scene (Scene 1).

    Step 11

    Click once on preloader to select it, open the Action Script Panel (F9) and enter the following A.C.code inside the Actions panel:

    onClipEvent (enterFrame) {
    _root.stop();
    mctotal = _root.getBytesTotal();
    mcloaded = _root.getBytesLoaded();
    percent = Math.round((mcloaded/mctotal)*100);
    load = percent+"%";
    if (percent == 100) {
    _root.play();
    }
    }

    Step 12

    Take the Text Tool (A) again, in the Properties Panel (Ctrl+F3) choose  Static Text and somewhere on the stage (over or beneath the preloader) type loaded bytes and total bytes. See the picture below.





    Step 13

    Take again the Text Tool (A) click on the right side of loaded bytes, and type 0. Then in the Properties Panel (Ctrl+F3) set Dynamic Text, and for Var: type loaded. Look at the pictures below!





    Step 14

    Repeat step 11, but for this time do that for a Total bytes. Only difference is that in the Properties Panel (Ctrl+F3) for Var you must type total.

    Step 15

    Take the Selection Tool (V), click once on Preloader (loading) to select it, open the Action Script Panel (F9) and beneath the first script enter the following Action Script code:

    onClipEvent (enterFrame) {
    _parent.loaded = _parent.getBytesLoaded();
    _parent.total = _parent.getBytesTotal();
    if (_parent.getBytesLoaded() == _parent.getBytesTotal()) {
    _parent.nextFrame();
    }
    }

    Step 16

    Create a new layer and name it picture. Then using the "drag and drop tehnique", move that layer beneath the first layer. Look at the picture below!



    Step 17

    Click on the second frame of layer picture and press F7 (blank keyfreame). After that choose File > Import > Import to Stage (Ctrl+R) and import any picture.



    Step 18

    Click on the second frame of layer 1 (layer of preloader), press F7 (Blank keyframe), open the Action Script Panel (F9) and and type this

    stop ();

    we're done! Cheers!

    Download source file (.fla)

    discuss this topic to forum

    relation tutorial

    No relevant information

    Category

      3D (20)
      Math Physics (14)
      3rd Party (5)
      Navigation (60)
      Actionscripting (26)
      Optimization (16)
      Animation (32)
      Projector (9)
      Audio (46)
      Special Effects (112)
      Backend (25)
      Text Effects (65)
      Drawing (18)
      Tips and Techniques (41)
      Dynamic Content (25)
      Tricks (6)
      Games (66)
      Utilities (19)
      Getting Started (71)
      Video (10)
      Interactivity (21)
      Web Design (22)

    New

    Hot