开发者

Flex 4 syntax in actionscript ...?

One (dumb) question:

Is it possible to use flex 4 syntax declaration inside of a actionscript method? For example, something like that:

private function buildContent() : void {

     <s:Label id="aLabel">

}

Thanks.

P.S. I couldn't find any reference about this,开发者_StackOverflow so i think it is not possible :).


No sorry, not possible. Just like you can't put HTML in JavaScript (without it being a string).


The syntax isn't "Flex 4 syntax" but "MXML".

You can achieve what you want, while writing:

private function buildContent() : void {
     var label:Label = new Label();
}

The syntax <s:Label /> represents an spark:components:Label object.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜