如何根据闪存中的swf调整文本框的大小?

时间:2012-03-01 05:24:28

标签: flash textbox height stage

因为我有一个文本框。当我放大swf窗口时,swf的大小很大。那时我想调整textbox.how来做这个吗?

我需要调整x,y,宽度和高度取决于舞台的高度和宽度。

更新

当我调整窗口大小时,它看起来像那样 enter image description here

1 个答案:

答案 0 :(得分:0)

stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;

_resize();

stage.addEventListener(Event.RESIZE, _resize);
function _resize(e:Event = null):void
{
    tbox.x = 0;
    tbox.y = 0;
    tbox.width = stage.stageWidth;
    tbox.height = stage.stageHeight;
}