开发者

Reading component parameters and setting defaults

I'm pulling my hair on this because it should be simple.

I'm trying to create a component and set its default properties.

<CustomComp text="Some text" color2="0x939202" value开发者_运维技巧="4.5" />

But when I initialize it, the parameters still don't register.

I do like this:

[Bindable] private var myColor2:uint = 0x000000;
[Bindable] private var myValue:Number = 10.0;

But it just gives me the default, all the time. What am I doing wrong?


For starters the private vars have different names than the vars in the CustomComp tag.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜