Flash Stage resize
- Started
- Last post
- 13 Responses
- Fariska
I've got a small problem with the Stage resize
I guess there is something wrong with flash reading the width and height of the canvas.
In this site ( www.isklar.no ), the flash is embedded using width = 100% and height =100%, and there is a resize function that is called when the site starts and then is assigned to the Stage.onResize event.
Obviously in Firefox and safari works ok, while
with IE (6 and 7), if you open the site
with the browser window sized 1024x768 or less the resize doesn't work until you play with the window's dimensions a bit.Anyone has ever had this problem? Any way to work it around?
- maximillion_0
yeah, call the resize function twice once on load and then after a short interval
- PonyBoy0
never had the problem... but i like to put my stage listener on the first frame...
... make the function _global. and call it anytime you need the resize action to occur (even if the stage hasn't been resized... there will be times you want that action to occur).
- rabattski0
You should use a listener object within flash that will trigger code after a resize.
- rabattski0
Ah, what PonyBoy already said.
- maximillion_0
Stage.onResize is an event listener
- Carty0
have a look at mine... http://stevecarty.com fully scalable at all window sizes.
my coder is a genius.... email me if you want some help- Tell your coder to go fuck himself for forcing my window to resize.ornj
- rabattski0
My coder is a genius. Works best in ff on mac. What part of genius don't i understand?
- rabattski0
True @ maximillion.
I always construct it like this:
function onResize () {
// Code, e.g.:
container._width = Stage.width;
container._height = Stage.height;
Stage.addListener (this);
}And call it:
onResize();
- Carty0
u need the latest flash player.
- kerus0
i reloaded and it worked fine, but gave me the error again later
no big deal