Skip navigation
oanhyen
Currently Being Moderated

Moving an object on the "floor"?

Aug 4, 2012 9:47 PM

Hi. I want to do something similar in this nickjr game but I'm not sure how to move an object with the mouse only on the floor of a room instead of the whole space. Any ideas?

 

children game:http://www.nickjr.com/kids-games/blues-clues-ghost-hunt.html

 

thanks,

Kim

 
Replies
  • Currently Being Moderated
    Aug 5, 2012 4:58 AM   in reply to oanhyen

    You need to detect collisions with boundary objects and use them to prevent movement beyond those boundaries.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 5, 2012 6:46 AM   in reply to oanhyen

    I am not sure what you mean, but attaching a moveable object to another will not do anything to prevent its movement.  You need to create the controls that limit the movement.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2012 5:32 AM   in reply to oanhyen

    Where is it when it is not on the floor?  I think you might be confusing a visual effect with a physical one... In Flash it is all visual.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2012 6:33 AM   in reply to oanhyen

    Your response brings me back to my first response.  You need to use collision detection in order to keep the object wherever you want it to be limited to.

     

    If you want the object to only move horizontally, then you only change its _x property relative to the mouse's x position - and do nothing to change its _y property

     

    If you have some codeyou are currently using, it would be easier to answer based on that than anything else.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)