开发者

mx:HTML control won't display when added in code-behind

I am building an AIR application and I was planning to include the mx:HTML control but I can't seem to get the control to display. Here is the code:

var tmpHtml:HTML = new HTML();
tmpHtml.htmlText = "<开发者_StackOverflow社区;a>This is the sample </a>";
tmpHtml.x = 48;
tmpHtml.y = 10;
tmpHtml.width = 360;
tmpHtml.height = 169;
tmpHtml.visible = true;
stage.addChild(tmpHtml);
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addChild(txt);


You need to add tmpHtml to application, not stage.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜