Image to graphic

Sarah sarahr at
Wed Nov 19 21:50:58 EST 2003

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.

sarahr at

On 20 Nov 2003, at 12:21 pm, Bojsza wrote:

> I have two nodes (filled rectangles) and I want to be able to have a 
> script connect them with a line graphic.
> ..
> choose line tool
> drag from loc of grc node1 to loc of grc node2
> ..
> this does create a line but it is an image and I need a graphic 
> because I want to be able to allow the user to move the nodes and keep 
> the line "attached".
> This is also the second question I have... how can I create the effect 
> of a "sticky" line?
> thanks,
> Glen
> _______________________________________________
> use-revolution mailing list
> use-revolution at

More information about the Use-livecode mailing list