I’m trying to build a simple photo gallery, that when a user clicks on a button, the frame for the loaded jpeg changes size to fit the new image. I also want to include a title for the image, that stays aligned with the top-right of the frame. My problem is that I have the title within the frame MC and as the frame resizes, so does the title. is there a way of stopping the resize of the title???
Here’s what I have thus far for the frame resize:
var over:Number = 50;
var off:Number = 100;
var aProjectsNumbers:Array = new Array();
//
function mcOnEnterFrame() {
this._alpha += (this.endAlpha-this._alpha)/10;
this._xscale += (this.endXscale-this._xscale)/4;
this._yscale += (this.endYscale-this._yscale)/4;
}
//
this.mcImgHolder.onEnterFrame = mcOnEnterFrame;
this.mcImgHolder.mcTitle.onEnterFrame = mcOnEnterFrame;
//
for (var i:Number = 0; i<5; i++) {
aProjectsNumbers.push("mcNumber"+i);
this[aProjectsNumbers*].tNumber.text = i+1;
this[aProjectsNumbers*].onEnterFrame = mcOnEnterFrame;
///
this[aProjectsNumbers*].onRollOver = function() {
this.endAlpha = over;
};
this[aProjectsNumbers*].onRollOut = function() {
this.endAlpha = off;
};
this[aProjectsNumbers*].onRelease = function() {
with (this._parent) {
mcImgHolder.endYscale = Math.random(3)*120;//just testing resize
mcImgHolder.endXscale = Math.random(3)*120;
//mcImgHolder.mcTitle._xscale = the same size always;
//mcImgHolder.mcTitle._yscale = the same size always;
}
};
}
so as you can see i don’t have the jpeg loading yet, but as you press a button the frame resizes to a random size for testing.
thnx
