3 Replies Latest reply on Feb 14, 2008 10:05 PM by baboy4uro

    Redesigned the game still have blocker problem

    baboy4uro
      I’m trying to create a game whit mouse control and I’m having some problem creating a blocker.
      I want to make’ it so that if an object is an the way the other object should stop right before.
      If the controller was whit the keyboard I cud use the hit test, whit the mouse control it doesn’t work
      This is a link to the game http://www.orasulcarei.com/popescu/joc.fla
        • 1. Re: Redesigned the game still have blocker problem
          Rothrock Level 5
          ?

          hitTest has nothing to do with what control you are using, it is a method of the MovieClip class (and some other classes as well). So as long as you have a movieclip and a point (or another MovieClip) you are good to go.

          You might want to search the web for grant skinners collision detection class. It provides a nice way to handle collision of unusual shapes.
          • 2. Re: Redesigned the game still have blocker problem
            clbeech Level 3
            I've taken a look at your game here, and though that there are a few other ways in which you may want to construct such a system. with the methods you were trying to use I think that you would continue to run into problems, and I'm afraid that some of the coding you were using was ... well, not quite right :) so to help you along I though I'd throw together an example of how you could go about constructing something like this. I don't know exactly what the 'premise' of your game will be or how it will progress, end, or what the goals will be. but you may be able to use the basic system of construction philosophy in the demo, as a springboard to get you thinking along these lines.

            keep in mind, that this also is not the only way something like this can be done. Here's a link to the posted demo and the a download of the FLA: HERE
            • 3. Re: Redesigned the game still have blocker problem
              baboy4uro Level 1
              Thank you for the advices and the *.swf vas vary helpful. I’m new at this action script (2-3 day’s of experience) so probably I ‘l have more questions in the future.