开发者

StageScaleMode.NO_BORDER: Event.Resize problem

/* MyClass is a class of stage */
public MyClass()
{
stage.scaleMode=StageScaleMode.NO_BORDER;
stage.addEventListener(Event.RESIZE, resizeHandler);
}

function resizeHandler(e:Event)
{
trace("hello")
}

if I set StageScaleMode to NO_SCALE, code works properly, but 开发者_JAVA百科if I set it to NO_BORDER, code won't working

How to avoid this problem?

Thank you for help.


The only time the resize event is dispatched is when the scalemode is set to NO_SCALE.

"Dispatched when the scaleMode property of the Stage object is set to StageScaleMode.NO_SCALE and the SWF file is resized." http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/display/Stage.html#event:resize

"In addition, when scaleMode is set to StageScaleMode.NO_SCALE and the SWF file is resized, the Stage class’s resize event is dispatched, allowing you to make adjustments accordingly." http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS0D75B487-23B9-402d-A52D-CB3C4CEB9EE4.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜