I’m using AS to control movement and I would like for it to load an external .swf once the object has reached its destination, but I’m having trouble with the if statement.
Here’s the movement code:
MovieClip.prototype.ease = function(width, height) {
this.onEnterFrame = function() {
this._width = width-(width-this._width)/3;
this._height = height-(height-this._height)/1.5;
if (this._width>width-1 && this._width<width+1 && this._height>height-1 && this._height<height+1) {
this._width = width;
this._height = height;
delete this.onEnterFrame;
}
};
};
And here’s my controling function:
_root.history_btn.onRelease = function() {
_root.mask_mc.ease(914.5, 20);
if (mask_mc._height ==height) {
loadMovieNum("history.swf", 1);
trace("wft");
}
};
I can only get to work with the “>” operator, but that’s no good. Can anyone help me?