Collision and Animation?

Important:
[LIST]
[]ActionScript 2.0
[
]Flash CS3
[*]I have some knowledge in Java and C++ which makes this easier… :slight_smile:
[/LIST]Im trying to make a game and the collision *** does not stop the character in its spot… if i set _y to 0 then it would go to the top of the screen… if i set _y to -1 each frame that the hitTest is active then the character goes through the platform and the rises by -1 (1 up) _y … how can i make it so the character is stopped immediatly when touching (hitTest) the platform?

//this is what i wrote
onClipEvent(enterFrame){
 if(wall.hitTest(hero)){
  _root.hero._y -= 2;
 }
}
//This is what i got from a website (end)
onClipEvent (enterFrame) { 
 if (this.hitTest(_root.man)) { 
  _root.map._y -=5; 
 }
}
//this works as the problem
onClipEvent(enterFrame){
 if(wall.hitTest(hero)){
  _root.hero._y -= 2;
 }
}
//To reproduce the problem, swap "wall" with "this",
//put _root. before "hero".
//thats it... and that reproduced the problem.
//website:http://max-flashtutorials.blogspot.com/search/label/hit%20test
//so:
onClipEvent(enterFrame){
 if(this.hitTest(_root.hero)){
  _root.hero._y -= 2;
 }
}
//and that shall reproduce the poblem

And for my second problem:

  1. how can i make my character move when the RIGHt/LEFT/UP/DOWN or WASD keys are pressed (animation move… not x,y).
    i made the animations but the animations do not stop when i dont press anything…
  2. the same character ^^^^^ i put walls around the playing area… and i want the character to STOP DEAD when touching them… meaning STOP completely… unmovable in the wall’s direction.
    :(:crying::cry3:

http://www.swfcabin.com/open/1276513279 is the “game” if you can call it that.
Help appreciated!!