I am using a fluid flash layout for my flash movie…but the flash gallery I am using it is not displayed correctly…the images appears to be “zoomed in”…can someone help me fix this? I know it has something to do with the movieclip mcBackground width and height
The main movie clip on the timeline is mcStage, then inside I have mcBackground and inside mcBackground I have the gallery movie clip…
Here is the code I am using…hope someone can help me figure this out…
// 1: import the Delegate class to deal with event function scope
import mx.utils.Delegate;
// 2: set the Stage class params
Stage.scaleMode = "noScale";
Stage.align = "C"; // to centre the stage
// 3: Assign the dimensions of the document
// to the Movie object (same as FLA):
var Movie:Object = new Object();
Movie.width = 1100;
Movie.height = 556;
// 4: create function to position your MC at the top-left of the stage
function positionStageMC():Void {
/* note: because we are using Delegate, the scope of this function
is mcStage, and not "slistener"
*/
// position mcStage (this)
this._x = (Movie.width/2)-(Stage.width/2);
this._y = (Movie.height/2)-(Stage.height/2);
// position & size background
this.mcBackground._width = Stage.width - mcBackground.width;
this.mcBackground._height = Stage.height - mcBackground.height;
}
// 5: initialize mcStage position
positionStageMC();
// 6: create an onResize event which calls positionStageMC()
// when the stage is resized.
var slistener:Object = new Object();
slistener.onResize = Delegate.create(this, positionStageMC);
Stage.addListener(slistener);