The Stage.onResize event works perfectly as long as the scale mode is set to
"noScale" (the example below from the Flash 8 docs is pretty good). If the
movie is set to scale, then the event is never fired, and all bets are off.
You can, however, use JavaScript to fire a resize event when the user
resizes the browser.
// From the Flash 8 docs:
this.createTextField("stageSize_txt", this.getNextHighestDepth(), 10, 10,
100, 22);
var stageListener:Object = new Object();
stageListener.onResize = function() {
stageSize_txt.text = "w:"+Stage.width+", h:"+Stage.height;
};
Stage.scaleMode = "noScale";
Stage.addListener(stageListener);
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mick G
Sent: Monday, June 05, 2006 8:34 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] onResize (when done)
My question is two-fold: Is it possible to determine if the stage is
resizing larger? smaller? only height? only width?
If you don't want to use onEnterFrame, just do the same process by checking
the Stage.width and Stage.height with a setInterval and compare the current
values with the last.
On 6/6/06, Flash Mel <[EMAIL PROTECTED]> wrote:
>
> I had a question about this. There is a solution in the archives
> (
>
http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2002-December/056558.
html
> )
> where someone used onEnterFrame. That solution was back in 2002. Is
> there a better alternative now?
>
> My question is two-fold: Is it possible to determine if the stage is
> resizing larger? smaller? only height? only width?
>
>
> Ah, my mind is boggled!
>
> Cheers,
>
> fM
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com