Change the Petals on the Flower


Get Adobe Flash player

The code is shown below:

colorPicker.addEventListener(Event.CHANGE,pickColor);
function pickColor(e:Event):void {
   var colorT:ColorTransform = new ColorTransform();
   colorT.color = colorPicker.selectedColor; //color user selected
   flower.colorArea.transform.colorTransform = colorT; //change the color of the box
} //changeColor
Download movie
INDEX, Change the Color: ColorTransform, Prepare a Flower for changing petal color, Change the color of the Flower, Color Picker Component, Pick Color with ColorPicker Component, A Random Color, A Random Color with a lighter and darker shading, Shading the Flower with a ColorPicker, Random Shades of a Color
Next lesson: Components

Copyright © Zebra0.com
All rights reserved worldwide.

 
 

Pick Color with ColorPicker Component