The vizact.onmousedown(' ' ,toggleLink()) needs a mouse button argument. Check docs on this.
Otherwise I don't see whats wrong. Throw some print statements around to see where the code is going or not going.
You also have the possibility of creating two links and loosing your handle to the first link. To fix create a list of grabable objects and use a "for in" loop to check if the hand should grab. If you grab, end the loop with a "break" statement.
__________________
Paul Elliott
WorldViz LLC
|