如何设置我在AS3 SWF的宽度和高度? [英] How do I set the width and height of my swf in AS3?
本文介绍了如何设置我在AS3 SWF的宽度和高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何设置我的AS3 SWF的宽度和高度?
How do I set the width and height of my swf in AS3?
这是我的code到目前为止:
This is my code so far:
package {
import flash.display.Sprite;
public class Game extends Sprite {
}
}
现在,加载时它是在一些任意默认大小。
Right now, when loaded it is at some arbitrary default size.
如果我不能改变大小这样一来,有没有简单的变通,这将是一致的?
If I can't change the size this way, is there any easy work around that will be consistent?
推荐答案
尝试把
[SWF(backgroundColor="#000000", width="200", height="400", frameRate="29")]
在上述
public class Game extends Sprite {
....
你在哪里,当然也可以设置的backgroundColor,宽度,高度等任何你想要的。
Where you, of course, can set backgroundColor, width, height etc. To whatever you want.
希望它能帮助!
这篇关于如何设置我在AS3 SWF的宽度和高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文