Hi people,
I’ve a question: What do I’ve to change in the code that, the border of the container on press of the third button is not going above the blue line.
I want that the border always scale to the right-bottom.
Do you know what I mean?
And what do I’ve to change, that the shadow is always at the same distance to the right und bottom end of the container. So that i can change the height and width and the shadow is always at the same place, like it is whenn button 1 and 2 are pressed.
MovieClip.prototype.resizeMe = function(w, h) {
var speed = 3;
container._alpha = 0;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
shadowFollow();
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = container._y-h;
container._x = this._x+spacing/2-1;
container._y = this._y+spacing/2-140;
container._alpha += 5;
if (container._alpha>90) {
container._alpha = 100;
delete this.onEnterFrame;
}
}
};
};
function shadowFollow() {
shad_bl._y = shad_b._y=shad_br._y=border._y+border._height-138;
shad_bl._x = border._x+shad_bl._width;
shad_b._x = shad_bl._x;
shad_r._x = shad_br._x=shad_tr._x=border._x+border._width;
shad_tr._y = border._y+shad_tr._height-139;
shad_r._y = shad_br._y;
shad_b._xscale = shad_br._x-shad_bl._x;
shad_r._xscale = shad_br._y-shad_tr._y;
}
It would be really cool, if someone could take a look at the code.
Thank you guys.
cheers
froesi