Hi,
I’m having a problem when loading external swf of xml gallery into a container and then trying to move the container smoothly on resize the window. It works fine only at the beginning, but after resizing images don’t come up when clicking thumbnails.
I’m using Kirupa tutorial: http://www.kirupa.com/developer/mx2004/thumbnails.htm
and Rhamej answer: http://www.kirupa.com/forum/showthread.php?t=199041&page=2&highlight=resize+motion
Stage.showMenu = false;
Stage.scaleMode = “noScale”;
Stage.align = “LT”;
stageListener = new Object();
MovieClip.prototype.centerIt = function() {
this.onEnterFrame = function() {
var StageX:Number = Math.round(Stage.width/2);
var StageY:Number = Math.round(Stage.height/2);
var speed:Number = 5;
this._x += (StageX-this._x)/speed;
this._y += (StageY-this._y)/speed;
if (Math.abs(StageX-this._x)<1 && Math.abs(StageY-this._y)<1) {
this._x = StageX;
this._y = stageY;
delete this.onEnterFrame;
}
};
};
stageListener.onResize = function() {
box.centerIt();
};
Stage.addListener(stageListener);
stageListener.onResize();
Thanks for help!
Luk