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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clip running wild. Help!

Status
Not open for further replies.

tommytx

Programmer
Nov 27, 2002
28
US
Help! I can't find anyway to stop this thing.

The clipevent moves the movieclip which is named mymovie_mc (instance) right of the bottom of the stage and keeps going. I have tried all the items following the // but none of the have any effect on stopping this thing. How do I stop this thing. I have searched and found a lot of data on stopping the onEnterFrame, but can't find anything on onClipEvent.


onClipEvent (enterFrame) {

_y += 5;

if (_y > Stage.height) {

// delete this.onClipEvent(enterFrame);
// delete this.onEnterFrame;
// this.removeMovieClip();

}

}
 
Whty don't you use an onEnterFrame function in the first place?
 
Hello...

Place your code on the timeline instead of on the movieclip itself, and then use something like this:

YourMovie_mc.onEnterFrame = function(){
YourMovie_mc._y += 5;
if (YourMovie_mc._y > Stage.height){
delete YourMovie_mc.onEnterFrame;
}
}

Hope that helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top