Learning Flash: Loader Component

Home Food Mates • Members Tutorials Forum Buy Templates Contact Us 

 


Flash Tutorials

   

Flash Tutorial - Preloading External Jpegs or SWFs

Free Flash Tutorial


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

 

Step Four: Adding the Loader Component

  1. In the Timeline click on the Insert Layer Button:
  2. Rename this new Layer: Loader
  3. If the Components are closed, open them: Window > Development Panels > Components (Ctrl F7)
  4. Drag onto Stage a copy of the Loader:


    The Loader on Stage.

  5. In the Property Inspector give the Progress Bar the Instance Name: myLoader

    Notes on the Size: If we leave the Loader Component the default size the image will load at that small size even though original is much bigger. Like this:


    Default image size.

    Proportions: You may note that the proportions of the Jpeg image are different to the Loader Component. When the image is loaded it is resized but it retains it's original proportions. The image is simply centred inside the loader:


    The image is not stretched.

    Note Reversal: You will see in the ActionScript below that it is possible to reverse this situation, so that instead of the image scaling to the Loader you can get the Loader to scale to the image.

    We now need to resize the Loader so that it matches the original image.

  6. In the Property Inspector set the following attributes:

    Width:
     550
    Height:
     400
    X:
     0
    Y:
     0


    Settings in the Property Inspector.


    The Loader Component now fits the Stage exactly.

         

Step 4    <<   Previous      Intro   1   2   3   4   5     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

205053 visitors to this page since Sept 05 •

 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.