I have the following [color=blue]if [/color]statement:
btn2.onRelease = function(){
btn1.yPos (30);
btn3.yPos (30);
if (btn1._y == 30 ){
mc1.scale (110);
mc2.scale (390);
if (mc1._width == 110 && mc2._width == 390){
this.yPos (50);
}
}
}
to accomplish that one event is waiting for the other to finish before it starts, but it isn’t working.
This is the entire code:
MovieClip.prototype.yPos = function(y){
this.onEnterFrame = function(){
this._y += (y - this._y)/3;
if (this._y > y - 1 && this._y < y + 1){
delete this.onEnterFrame;
}
}
}
MovieClip.prototype.scale = function(w){
this.onEnterFrame = function () {
this._width += (w - this._width)/5;
if (this._width > w - 1 && this._width < w + 1) {
delete this.onEnterFrame;
btn1.yPos(50);
}
}
}
btn2.onRelease = function(){
btn1.yPos (30);
btn3.yPos (30);
if (btn1._y == 30 ){
mc1.scale (110);
mc2.scale (390);
if (mc1._width == 110 && mc2._width == 390){
this.yPos (50);
}
}
}
mc1.scale (50);
mc2.scale (450);
What is wrong with the [color=blue]if [/color]statement :h: