Learn Flash: Preloader ActionScript

Home Food Mates • Members Tutorials Forum Buy Templates Contact Us 

 


Flash Tutorials

   

Flash Tutorial: Standard Preloader

 

Free Flash Tutorial


Step 6    <<   Previous      Intro   1   2   3   4   5   6   7     Next   >>       >>   Webwasp Mates

 

Step Six: Actionscript Frame 1

  1. Create a new Layer called: Actions
  2. In the Actions Layer right click on Frame 2 and select: Insert Keyframe (not frame)
  3. Select Frame 2 of this frame and open the Action Panel: Window > Actions (F9)
  4. Note: In Flash 8 you can now use the context Menu: Right click on Frame 2 and select: Actions (F 9)

    Also in Flash 8 Macromedia have brought back the old Flash MX Normal/Expert mode to the Actions Panel. Yeah!!

    Just to make it seem like a new feature they have re-named it: Script Assist which is either switched on (Normal Mode) or off (Expert Mode). Look for the new button in the Actions Panel:



    You can only type, copy or paste in the Actions Panel if Script Assist is switched off. You do this by clicking the button above or by going to the side menu button:    This is just under the cross on the top right hand side of the Actions Panel. If Script Assist is ticked you can't paste into the Actions Panel. Remove the tick:



    To copy and paste use: Ctrl C and Ctrl V.

  5. Apply the following ActionScript to Frame 2:

    myLoaded = Math.round(getBytesLoaded());
    myTotal =
    Math.round(getBytesTotal());
    myPercent = myLoaded/myTotal;
    myBar.
    _width = myPercent*150;
    myText =
    Math.round(myPercent*100)+"%";
    if (myLoaded == myTotal) {
        gotoAndStop(3);
    }
    else {
        
    gotoAndPlay(1);
    }



    I will explain the ActionScript presently. First I would like to finish the Movie.

         

Step 6    <<   Previous      Intro   1   2   3   4   5   6   7     Next   >>       >>   Webwasp Mates


Webwasp Community: Webwasp Mates & Dates

Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates

 Top of Page Home Food Mates Members Tutorials Forum Buy Templates Contact Us 
 All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.