A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Maze hitTest

Threaded View

  1. #1
    Member
    Join Date
    Feb 2002
    Location
    Chicago, Atlanta
    Posts
    57

    Maze hitTest

    Im making a maze that ball travels through. I am succesful on one wall. But when I come down to the other side it brings it up. How do make the side a hitTest? or can give me advice if theres better solutions. Thanks....
    I have attached it to the ball named circle. I have include the file


    //the hitTest
    if (hitTest(_level0.wall)==true) {
    _y = _y-10;
    this below is the full code
    onClipEvent (enterFrame) {
    if (Key.isDown(37)) {
    _x=_x-10;
    }
    if (Key.isDown(38)) {
    _y=_y-10;
    }
    if (Key.isDown(39)) {
    _x=_x+10;
    }
    if (Key.isDown(40)) {
    _y=_y+10;
    }
    //the hit test
    if (hitTest(_level0.wall)==true) {
    _y = _y-10;


    }

    }
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center