Skip to main content
gamedev.net
🔒 Locked

Flash Help Needed

Started by toye Nov 26, 2004 at 2:20 PM 0 replies 400+ views
Original Post
toye
toye
Hello, I was working with flash and a begginers tutorial and it was teaching me how to move and object around with my arrow keys. It was also teaching me if I drew a line to make a wall how to make it so the cirlce that I have created not to move through the wall. Now after following all the steps I got the circle to move around but it can still pass through the line I made. Here is the tutorial link http://www.actionscript.org/tutorials/beginner/Movement_and_simple_hittest/index.shtml and here is the code I used on the ball in my flash: onClipEvent (enterFrame) { if (Key.isDown(37)) { _x=_x-2; } if (Key.isDown(38)) { _y=_y-2; } if (Key.isDown(39)) { _x=_x+2; } if (Key.isDown(40)) { _y=_y+2; } if (hitTest(_level0.wall)==true) { _x=_x-2; } } SO any suggestions on what I can do to fix this problem?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.