actionscript flex, how to send browser width to the swf itself

Posted by touB on Stack Overflow See other posts from Stack Overflow or by touB
Published on 2010-03-18T17:39:19Z Indexed on 2010/03/18 17:41 UTC
Read the original article Hit count: 400

Filed under:
|
|
|

I'm working with flex, but actionscript ideas are just as good.

The flex <s:Application> tag has height="100%" width="100%" so the swf fits the browser as the browser gets resized.

My problem is that I have a <s:Label> that I need to position based on the real/current size of the browser.

<s:Application height="100%" width="100%">
     .....
     <s:Label text="hello" x="?" y=">" />

</s:Application>

I heard it's possible to use Application.application.width; but I get a compile error, that it doesn't know what that is.

Any ideas how to do this. I'm trying to get the current size of the swf in the browser, as the browser resizes.

© Stack Overflow or respective owner

Related posts about actionscript

Related posts about flex