Free Flash Tutorials

Home Food Mates • Members Tutorials Forum Buy Templates Contact Us 

 


Flash Tutorials

   

Flash Tutorial - Changing the color of Objects

 

Free Flash Tutorial


Page 4     <<   Previous    1   2   3  4   5    Next   >>       >>   Webwasp Mates

 

Step Four: Assigning Actions to your Buttons

  1. Select one of the buttons.

  2. Press F9 to open the Actions panel.

  3. Select Normal Mode from the View Options button

  4. Click on the Plus button

  5. Select: Actions > Variables > set variable

  6. In the Variable option above the ActionScript type in the name: Picasso

    Note:
    You could type anything, it is simply a way to get the computer to remember something. When the PC next comes to the word Picasso it already knows what it means. It is the same as algebra X = 1+2. Except that I use Picasso instead of x. This is normal in ActionScript because X and Y are used as coordinates.

  7. For the value type in: new Color(_root.colorMe)

  8. Select Expression at the end of the Value box (the lower of the two Expression boxes).


    Your ActionScript should look similar to this.

    Note: The brackets around the words (_root.colorMe) are the roundish parentheses() not curly braces {}.

  9. Click on the Plus button

  10. Select: Objects > Movie > Color > Methods > setRGB

  11. In the options above the ActionScript, select Object and type in the name of your variable: Picasso

  12. In the Parameters box type in 0x (zero x) then the Red Green Blue, hexadecimal number, for the color you want. I typed in 0xff9966

    Note: You must type 0x (zero x). Do not type Ox, as in the animal, as you will be an Ox and your code will not work!

    Note: ff9966 is the hexadecimal code for a golden brown color. ff represents the color value of the red, 99 the green and 66 the blue. If you need to see a hexadecimal color chart click here.



    Your code should now look similar to this
    .

         

Page 4     <<   Previous    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

56404 visitors to this page since Jan 04

 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.