smurf123
02-29-2004, 12:29 PM
Hi, I would really like some help. What I am trying to do is when an object hits another, it goes to frame 2. I have the object moving(labeled "Mover")and my problem is that I dont know how to make it do that action when it hits the spot. For the "spot" it hits should I use an MC or just coordinates. If I use an Mc could you also tell me what actionscript I would put in either MC. If its coordinates, Would you please tell me what kind of "If" command I would use for that?
Also in case your wondering, heres my code to move the guy around.
onClipEvent (load) {
speed = 2;
}
onClipEvent (enterFrame) {
if (key.isdown(key.RIGHT)) {
_x+= speed;
}
if (key.isdown(key.LEFT)) {
_x-= speed;
}
if (key.isdown(key.UP)) {
_y-= speed;
}
if (key.isdown(key.DOWN)) {
_y+= speed;
}
}
It would be real helpful if you could help me!
Also in case your wondering, heres my code to move the guy around.
onClipEvent (load) {
speed = 2;
}
onClipEvent (enterFrame) {
if (key.isdown(key.RIGHT)) {
_x+= speed;
}
if (key.isdown(key.LEFT)) {
_x-= speed;
}
if (key.isdown(key.UP)) {
_y-= speed;
}
if (key.isdown(key.DOWN)) {
_y+= speed;
}
}
It would be real helpful if you could help me!