调整Flex默认Application的长宽

Flex的ms:Application默认有一个大小,我新建的Panel要比这个大小要大,所以默认会出来滚动条,看着比较的不爽。但是如果在Application中把大小通过Height/Width设死的话,在窗口放大或者丢浏览器里面看的时候又不会居中,比较的不爽。最后终于在这找到一篇文章讲这个的,这个参数不是在mxml文件里面设定的,而是需要在编译的时候传入-default-size 800 600 参数。命令行编译的话,是需要把这个参数加在mxml文件后面的,即这样:

mxmlc.exe  foobar.mxml -default-size 800 600

This entry was posted in Happy coding and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>