flash question
- Started
- Last post
- 6 Responses
- ammansabet
is there a way to get the height and width of a browser window in flash to be able to store it as a variable?
- unfittoprint0
either use the Stage object [if u have ur swf width and height parameter scaled to 100%] u'll be able to check the inner winodw size.
if u want to know the overall browser window size, either add some pixels to the retrieved Stage.height or use javascript :
http://www.macromedia.com/suppor…
- Boz0
@unfit
swLiveConnect="true" with JS/Flash communication doesn't work on all browsers and platforms.But it's true about Stage, just keep your swf file at 100% and you can do your thing.
- ammansabet0
aye, th e100% thing works, but only if i dont want to change my aspect ratio for the stage
im trying to get the stage to to resize with the browser without distorting anything else
- unfittoprint0
@Boz: true.
some Mozilla flavored browsers (Netscape, AOL, Compuserve, firefox, etc.) have issues regarding swLiveConnect js/flash communication.
- connerd0
you can set your movie size to 100% and your stage.scaleMode to "noScale".
this should solve your problem of resizing everything in the movie without actually scaling it or distorting your aspect ratio.
i like to add a resize listener to the stage object to handle resizing. i'll paste you in some code if you need any.
- ********0
moock has a thing on this