Adding color to application background
I was running through a simple tutorial for loading XML into Flex and displaying it in a thumbnail when I got the following error:
appBgCol.mxml
<?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:Array = new Array();
/*
IF YOU WANT GRADIENT COLORS FOR BACKGROUND
clrs.push(0x990000);
clrs.push(myCP.selectedColor);
this.setStyle("backgroundGradientColors",clrs);
*/
this.setStyle("backgroundColor",myCP.selectedColor);
}
]]>
</mx:Script>
<mx: Panel width="80%" height="80%" >
<mx:ColorPicker id="myCP" change="changeEvt(event);"/>
</mx: Panel>
</mx:Application>

No comments yet.
. As I learn new stuff and pickup interesting stuff from around the internet and the other Flash/Flex Gurus out there, I store them here in this blog so that I can always check back for stuff filled away safely.
