Jump to content
  • Advertisement
Sign in to follow this  

Flash Help Needed

This topic is 5134 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!