1 Reply Latest reply on Feb 13, 2008 10:56 AM by C-Rock

    Blocker problems in flash game

      Hi everyone

      I’m trying to create a game whit mouse control and I’m having some problem creating a blocker.
      When I click whit the mouse so that the ball moves form A to B if a blocker is in the way the ball reappears at the starting point and try’s again until you stop it.
      Expected: when the ball hits the blocker it should stop.

      I used this code for blocker:

      if (hitTest(_level0.wall)==true) {
        • 1. Re: Blocker problems in flash game
          C-Rock Level 2
          find the location of the blocker and its width so you know the x or the y of the leading edge that is being contacted. set a loop up to run on the enterframe of your ball clip and when its leading edge is less than or equal to the blockers leading edge it should stop moving.