This is a really basic question that has probably been answered a million times before, but it's stumping me.
I've written a MXML component with a public property. I can add an instance of the component and set its property in the designer. However, my changes to the property are not reflected in the Design view - they only show at runtime. The consequence is that I'm really flying blind when it comes to designing my user interface.
Is there something I'm missing, or is this is just a limitation of the Flex Designer?
Here's my custom component, called "Planet.mxml". Note that the public property "planetColor" colors the contained image. Thanks in advance.
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="300" height="300" initialize="initializeColorTransform()">
private var _planetColor:uint = 0x7f7f7f;
public function get planetColor(): uint
public function set planetColor(value: uint):void
_planetColor = value;
private function initializeColorTransform():void
var r:Number = (_planetColor >> 16) & 255;
var g:Number = (_planetColor >> 8) & 255;
var b:Number = (_planetColor) & 255;
if (planet != null)
planet.transform.colorTransform = new ColorTransform(r/255, g/255, b/255);
I used to use the design view 3 or 4 years ago. It helps you when you're a novice in Flex or when you have to do a Multimedia component with few programmatically changes. Now, you have to assume that the design view cannot perform runtime calculation like algorithmic calculation of a background color.
Thanks, this is the answer I was afraid of, but I don't doubt you're right.