Hi everybody,
I have a little prob of resize here. it works when i expand the stage but does not work when i size it down. i have a onResize on main timeline which works perfectly but i need to write another onResize for my child which is placed inside another MC on the stage which is repositioned without any prob. BUt as soon as i click on a button on my child, it position middle of the screen. my onResize function inside the child works when i increase the window (size it up) but when i size it down, the pic is not reposition.
I think the prob is coming from Stage.addListener(gui2). I dont think i can use Stage again i cannot refer to stage with only “Stage” but rather with _parent._parent._parent …
Can anyone direct me…
I even try thi.addlisterner(gui2) == doesnt work.so im a bit lost in it. the code of my second onResize is found below:
var gui2:Object = new Object();
Stage.scaleMode = "noScale";
Stage.align = "TL";
Stage.showMenu = false;
var stageIndicator = _parent._parent._parent._parent._parent;
///////////////////////////// Position MovieClip within the GUI /////////////////////////////////////////
gui2.onResize = function() {
trace(_parent._parent._parent._parent._parent._width+ "sas");
trace(stageVar._width +" "+ stageVar._height);
imageDisplayer.imageBg._width = (stageIndicator._width);
imageDisplayer.imageBg._height = (stageIndicator._height);
imageDisplayer.imageLoader._x = (stageIndicator._width/2)-(imageDisplayer.imageLoader._width/2);
//33 = 53-20 YOU MUST TAKE INTO ACCOUNT THE MENU WHICH INCREASE THE SIZE OF THE STAGE
imageDisplayer.imageLoader._y = (stageIndicator._height/2)-(imageDisplayer.imageLoader._height/2)-33;
};
Stage.addListener(gui2);
trace("GUI2");
The trace show me the increase in size but when i resize down it get stuck on the same size as it was when i sized it up.
Hope my explanation will help. sorry for any english mistake, my bad
Thanks for any help,
Jerome