Dragging in processing.js
===

I am a physics teacher in London and I am trying to learn processing.js

To make teaching resources a very important technique is to be able to drag shapes around.  Although I know how to do this in PJS, I have found that the code for having several draggable objects quickly gets messy.  (especially if the object is "locked", so that it does not matter if the cursor goes off the object)

Does anybody know how to run the dragging spript from a separate file?  i.e. so that the main script calls the dragging script for objects?  The idea is that you would draw shapes and simply make them draggable, with the dragging code in a separate file?  This would make the creation of teacher resources a lot easier.

It would be great if people could provide some ideas on this.  I have seen the drag demos on the main PJS website, but I am looking for something quicker/easier.

Many thanks

Matt Klein

ruby_murray1@hotmail.com