Flash动态舞台大小控制 [英] Flash dynamic stage size control
本文介绍了Flash动态舞台大小控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
难道阶段可以动态地在运行时改变了吗?也就是说,如果初始大小为400x300的,我想通过为600x600改变从HTML瑞士法郎舞台的大小?
Did the stage can be changed dynamically in runtime? Means if the initial size is 400X300 and I want to change the size of the swf stage from html by 600x600?
推荐答案
您不能从SWF如更改舞台的大小通过 stage.stageWidth = 600;
但你能告诉包含HTML页面来改变嵌入的SWF的宽度/高度属性,然后在SWF可以应对阶段性的大小变化,例如
You can't change the size of the stage from SWF e.g. by stage.stageWidth = 600;
but you can tell containing HTML page to change width/height properties of embedded SWF then in your SWF you can respond to stage size change e.g.
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, onStageResized, false, 0, true);
和从那里更新布局
这篇关于Flash动态舞台大小控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文