Hello.
Does anybody know how to solve the following situation...
The component has a property of an object type (?fontNormalStyle?) with the
values like ?fontColor?, ?fontWeight? etc.
These properties should not be displayed in the main Component inspector panel
but in the window box of the fontNormalStyle property (object) and have color
picker and pre-populated list box. So it looks like [Inspectable] tags embedded
in an object property ("fontNormalStyle"). Like "sub-properties"... I have
tried to do something like this but failed.
At present, the user has to type the HEXA value for the fontColor and the
string value ("none" or bold) for the fontWeight parameter. Is there any way to
do it using color picker and pre-populated list box accordingly? The Macromedia
team thinks it possible. As for me - I don't know how...
Hope someone is able to help me.
...
var __fontNormalStyle:Object;
var __fontColor:Number;
var __fontWeight:String;
...
function set fontColor (val:Number) {
__fontColor = val;
invalidate();
}
function get fontColor ():Number {
return __fontColor;
}
...
[Inspectable (defaultValue={"fontColor:0x000000,fontWeight:none,..."},
type="Object")]
function set fontNormalStyle (fObj:Object) {
__fontNormalStyle = fObj;
invalidate();
}
function get fontNormalStyle ():Object {
return __fontNormalStyle;
}
...