我如何设置我的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.
希望它能帮助!