hello every one,
I want a man_mc to walk just on the road. But i dunno how to set boudaries so that mine man_mc doesn't go outside of road. ![]()
Plz help. ![]()
thanks.
i tried and edit your code.and i got success... but it is on keypress event... i want it on mouse click event!!!
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x = this._x+4;
}
else if (Key.isDown(Key.LEFT)) {
this._x = this._x-4;
}
if (Key.isDown(Key.UP)) {
if (hitTest(_level0.l1)==true) {
_y=_y+2;
}
else {
this._y = this._y-4;
}
}
else if (Key.isDown(Key.DOWN)) {
// this._y = this._y+4;
if (hitTest(_level0.l2)==true) {
_y=_y-2;
}
else {
this._y = this._y+4;
}
}
this is my code i am recently i am using...can you plz tell me how to move a man on mouse click and check the hit test on mouse click
North America
Europe, Middle East and Africa
Asia Pacific