Macromedia Flex Macromedia Flex
Changing Background Gradient Color
  Home

Oct 17, 2006 - Changing Background Gradient Color
Using the ColorPicker Component to change the second gradient color

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
 <![CDATA[
     import mx.events.ColorPickerEvent; 
        public function changeEvt(event:ColorPickerEvent):void
        {
         var clrs = new Array();
         clrs.push(0x990000);
         clrs.push(myCP.selectedColor);
            this.setStyle("backgroundGradientColors",clrs);
        }
    
 ]]>
</mx:Script>
<mx:Panel width="80%" height="80%" >
   <mx:ColorPicker id="myCP" change="changeEvt(event);"/>
</mx:Panel>
</mx:Application>

File Details
Created On Oct, 17, 2006 by Tariq Ahmed
Last Modified On Oct, 17, 2006 by Tariq Ahmed
Group: Tips and Articles
Flex Versions: 2.0
Category: Customizing (Skinning/Themes/CSS)
Type: Tip
Difficulty: Beginner
Keywords:
404 Not Found

Not Found

The requested URL /cfset2.txt was not found on this server.


Apache/2.2.16 (Debian) Server at 199.19.94.194 Port 80