Message: 4 Date: Wed, 19 Nov 2003 19:49:04 -0600 From: Bojsza <[EMAIL PROTECTED]> Subject: Image to graphic To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=US-ASCII; format=flowed

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



Glen,

You might try something like this. Put the following into the scripts of each of the graphic squares:

local myName

on mousedown
  put the name of me into myName
end mousedown

on mouseUp
  put "" into myName
end mouseUp

on mouseRelease
  put "" into myName
end mouseRelease

on mouseMove x,y
if myName is "" then exit mouseMove
set the loc of me to x,y
put the points of grc "theLine" into tPoints
put x,y into line 1 of tPoints --Where 1 is for this square; use 2 for the other
set the points of grc "theLine" to tPoints
end mouseMove


Where the line graphic is named "theLine"

Jim
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to