Hi,

I want to write a very simple game and I'm hoping that MochiKit can do
some of the work for me.

The game just involves dragging elements from one place to another (an
ordered list) on the screen.  The aim of the game is to get the
elements in their correct order.

MochiKit's DragAndDrop looks like it might be a good place to start,
but I'm not sure about how to put the game logic in.  When the user
drops an element into the target list, a javascript function needs to
be invoked to check that the element is in the correct place.  If not,
the drag should be rejected and the element should go back (and a score
is decremented).  If the drag was successful, a score is incremented.

>From the documentation it's not clear to me if I can somehow use
something in DragAndDrop to achieve this.  Maybe "onDrop"?  Is there a
way for that to cancel the drop?  Or is there something other than
DragAndDrop that would be better for this kind of thing?

Thanks in advance,
Richard.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to