the tutorial is really amazing the only thing i was wondering about is if it is possible to make the box (example used in url) stop at a certain point instead of just going further…
i reaaallly would love to know if i can do that…! thank you and i i’d appreciate ne help
and after it is done going to that place i’d want it to go down…
i know that i havta change the _x to _y but what i mean is what do i do so that after it reaches the _x destination then it starts to accomplish the _y position…? its sounds confusing i know
thank u
Where it reaches the _x if statement, and then it executes the _y movement while the clip is at 200 and it moves the block down to 200 then stops there.
Hey lost. Do these onEnterFrame commands still fire even if the mc reaches its defined x and y coordinates? I assume they do. Would you put an if statement in the code to delete the enterframe command? I’ve heard that saves CPU work.
Well moving one clip like that isn’t very CPU intensive, but yes, you can delete an onEnterFrame, but that would involve an onEnterFrame, not on onClipEvent(enterFrame).
So in that case the code above would become…
this.onEnterFrame = function {
speed = 5;
this._x += speed;
if (this._x>=200) {
this._x = 200;
this._y += speed;
if (this._y>=200) {
this._y = 200;
delete this.onEnterFrame
}
}
}
Well moving one clip like that isn’t very CPU intensive, but yes, you can delete an onEnterFrame, but that would involve an onEnterFrame, not on onClipEvent(enterFrame).
So in that case the code above would become…
this.onEnterFrame = function {
speed = 5;
this._x += speed;
if (this._x>=200) {
this._x = 200;
this._y += speed;
if (this._y>=200) {
this._y = 200;
delete this.onEnterFrame
}
}
}
People dont know that all the code lost gave us is AI
Iv’e been studying that code for a wile now and could make a cirxcle go around a whole course.
All you would need is that when a car hits it
store last cordinates and make it move a couple digits away.