views:

52

answers:

2

Hi guys,,, I was wondering if there are anyways to get the fixed size swf file when I build my AS3 only project in Flex environment. I can't use scaleMode="noScale" since my swf is very small. I don't want it expand it to full browser winder either. Are there anyways to do it? Thanks for the help!

+1  A: 

Your Application is sort of like a Canvas inside of the flash player. Thus, you can give it a fixed size (with the width and height attributes), but that will just reduce its size inside the flash player. I don't think you can mess with this in pure AS3 - you'd need to change the underlying HTML (although, you may be able to do this with ExternalInterface, which allows you to call javascript methods on the HTML page...).

Kelsey Rider
I just found out this...FYI..http://www.adobe.com/devnet/flashplayer/articles/swfobject.html
Jerry
+1  A: 

Use metadata above the main class declaration

[SWF(width="400", height="125")]
public class MyAS3Project extends Sprite
JabbyPanda