Full flash problem...again
I am using this script:
Stage.scaleMode = "noScale";
Stage.align = "LT";
box2._x = Math.round((Stage.width/2)-(box2._width/2));
box2._y = Math.round((Stage.height/2)-(box2._height/2));
box2.onResize = function() {
box2._x = Math.round((Stage.width/2)-(box2._width/2));
box2._y = Math.round((Stage.height/2)-(box2._height/2));
};
Stage.addListener(box2);
box2.onResize();
When loading an external swf into box2, the code does not move the box to the middle when the browser is rescaled. What is the problem?
Stage.scaleMode = "noScale";
Stage.align = "TL";
stageListener = new Object();
setStage = stageListener.onResize=function () {
box2._x = Math.round((Stage.width/2)-(box2._width/2));
box2._y = Math.round((Stage.height/2)-(box2._height/2));
}
setStage();
Stage.addListener(stageListener);
/*In your MovieClipLoader or preloader call setStage()
to center box2 on init or just put an OnClipEvent
directly on it */
onClipEvent(load) {
_parent.setStage();
}
#If you have any other info about this subject , Please add it free.# |
Author:
admin
03 12th, 2010 in
portal.gzui.com
edit