Character hitting area

i have a character, (pawel) this one hits on a set of tree coins (mccorrecto) in this point i have the answer, the problem is… when pawel hits mccorrecto in other part of the movie, most apear tree numbers (280, 340, 460) = i have to do an excercise with number of secuences = so i have this script

for mi coin (mccorrecto)

onClipEvent (enterFrame) {
if (this.hitTest(_root.pawel)) {
_root.score.text++;
gotoAndStop(“hit”);//i was trying to go to an other frame of the time line//it didnt work
_root.intento.text++;
unloadMovie(this);
}
}

for pawel

onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
_X+= 5;
legs.play();
} else if (Key.isDown(Key.LEFT)) {
_X-= 5;
legs.play();
}
if (Key.isDown (Key.DOWN)) {
_y+=5;
legs.play();
}
if (Key.isDown (Key.UP)) {
_y-=5;
legs.play();
}
}
//in this i was trying, If (pawel.hitThis) { (_root.mccorrecto)}

i hope that some one can help me with this… im learning action script but the books are not helping neither the tutorials

Maybe it’s too late for this, but…

Instead of detecting when the character hits a zone, you could call a function depending on the option the user has chosen.

Maybe your problem with gotoAndStop is you need to specify a target like _root.gotoAndStop or my_mc.gotoAndStop or this.gotoAndStop

:wink:

can you help me doing all the action script with the sentence my_mc.gotoAndStop because i dont know in wich frame i have to put it or how should i start the sentence

Well I can help, but I can’t make it for you…

Please tell me, without code, what you want to accomplish and I can give you a general approach. :wink: