OMG. I had been trying to make my moveable player stop moving when it hit a squared, as if it was a solid wall… and I had a very bright idea… but not very bright at last. I achieved making my character stop by using hitTest and making its speed go to “0”. But now, I can’t make it get away from the wall. As the speed has gone to “0”, It can’t move any longer… it’s stuck to the movie clip… here is the code I’m using… can anyone help please?
onClipEvent (enterFrame) {
if (_root.player.hitTest(this)) {
_root.speed=0;
} else {
_root.speed=2;
}
}
Thanks in advance.
Unchew.