We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Stage size changing with browser
Page Index Toggle Pages: 1
Stage size changing with browser? (Read 914 times)
Stage size changing with browser?
Dec 22nd, 2009, 5:46am
 
Hi.

I would like to know if I can determine the stage size of the processing application depending on the browser size. I prefer to do something like;

* creating the applet on browser in %100 width and height.
* reading/detecting the current width/height of the applet from code.

Is this possible? If not, any extension or library would solve this?

Thanks Cheesy
Re: Stage size changing with browser?
Reply #1 - Feb 17th, 2010, 12:52am
 
In response to my previous post, Making Flash movies obey browser text size changes, someone asked in the comments whether this method works when Stage.scaleMode is set to “noScale” (like it is automatically in every Flex SWF, for example, and in many Flash applications.) Setting the scaleMode of the Stage to "noScale" lets Flash developers control the layout of a Flash application in response to a change in the size of the Stage. It's how you create liquid layouts in Flash.

The answer to the question is that, yes, this method will work when using noScale and you can decide exactly how to handle the layout of your SWF when the stage size changes.

Here's the example from the previous post, refactored with some custom scaling code: You can view the example online and download the source code.

Page Index Toggle Pages: 1