Image to graphic

J. Landman Gay jacque at hyperactivesw.com
Wed Nov 19 22:01:12 EST 2003


On 11/19/03 8:50 PM, Sarah wrote:

> Try something like this:
> 
> put the loc of grc node1 & cr & the loc of grc node2 into thePoints
> create invisible graphic "StickyLine"
> -- set properties: color, thickness etc.
> set the points of graphic "StickyLine" to thePoints
> show graphic "StickyLine"
> 
> To move it while dragging a node, you'll have to abandon the "grab" 
> command and use mouse messages. There have been discussions about this 
> on the list before, but basically, in a mouseDown message, set a script 
> local variable to show you are dragging. Then have a mouseDrag message 
> that moves the node AND refreshes the points of the line but only if the 
> variable is set. In mouseUp, turn off the dragging variable so that 
> further mouseMove messages are ignored.

There's an example of exactly this same thing in the MetaCard examples 
stack. Lines connect three buttons. You can drag any of the buttons 
around and the end of the line stays stuck to it. Glen could probably 
grab the script pretty much intact.


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list