开发者

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

开发者 https://www.devze.com 2023-03-01 12:05 出处:网络
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:

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

精彩评论

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