Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delay Movie Clip

Status
Not open for further replies.

zbphill

Technical User
Jan 30, 2007
40
US
I want to Delay Mc2 to play a couple seconds behind Mc1.
Thanks for the Help.


MovieClip.prototype.moveMeX = function (posX,speed,alpha,) {
this.onEnterFrame = function () {
this._x += (posX - this._x) / speed;
this._alpha += (alpha - this._alpha) / speed;
if (Math.abs (posX - this._x) < 0.2) {
this._x = posX;
delete this.onEnterFrame;
}
}
}

mc1.moveMeX(300,2,100,);
mc2.moveMeX(300,2,100,);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top