PDA

View Full Version : How can I achieve this? AUTO scaling??



stangn99
July 17th, 2008, 12:56 AM
I came across this site:

http://www.limoosoft.com/Limoosoft-En.html

When you reduce the window size of the browser, all the contents of the flash document automatically SHIFT to compensate for the enlargement/reduction of the browser window.

Anyone know how this is achieved? It really jazzes things up.

TheCanadian
July 17th, 2008, 01:06 AM
stage.addEventListener(Event.RESIZE, resize);

function resize(evt:Event):void {
trace("stage resized");
}

stangn99
July 17th, 2008, 11:02 PM
stage.addEventListener(Event.RESIZE, resize);

function resize(evt:Event):void {
trace("stage resized");
}

Many thanks! Will give it a try!

stangn99
July 17th, 2008, 11:06 PM
Many thanks! Will give it a try!

the trace works, but the objects do MC's don't move with the screen.. they stay in the same position. I'm probably doing something wrong?

I've just placed the code you supplied in the first frame.

zeff
July 18th, 2008, 04:59 AM
the trace works, but the objects do MC's don't move with the screen.. they stay in the same position. I'm probably doing something wrong?

I've just placed the code you supplied in the first frame.

You must put the actual code inside the function when the stage is resized like the example below

stage.addEventListener(Event.RESIZE, resize);

function resize(evt:Event):void {
trace("stage resized");
menuGroupMC.x=stage.height -50;
menuGroupMC.x=stage.width -50;
}

hanzi
July 18th, 2008, 09:05 AM
I did this tut and it works great.

http://www.adobe.com/devnet/flash/articles/liquid_gui.html