How to draw a line between objects or letters?
Kay C Lan
lan.kc.macmail at gmail.com
Fri Jun 5 23:01:16 CDT 2009
On Sat, Jun 6, 2009 at 3:17 AM, William de Smet <williamdesmet at gmail.com>wrote:
> Yes, they are in different fields.But to make it more difficult: it can be
> images as well that I want to use (Look for the same image?).
> Maybe this is too difficult to do?
William, the image I get from your description is something for very young
children, to check they correctly identify a letter or image on the left
side of the screen with multiple answers, letters or images, on the right
hand side of the screen. The question letter/image on the left will always
be in the same place, and the three or four answers letter/images will
always be in the same place on the right.
If this is sort of what your after then read on, if not, completely forget
Why not use buttons? You can leave the name of all the buttons the same and
simply set their Label to the required letter or set the Image. With the
default setting you can test if a student can match A to a, or if you set
caseSensitive to true you can test for exact matches.
If the buttons don't move then it is simple to draw all the lines in place
beforehand and simply hide them. When a student presses the right sequence
of buttons, show the appropriate line (graphic). With a sensible naming
convention is should be relatively easy to check that the correct graphic
has been shown. ie if button "three" contains the correct answer then you
could check that graphic "three" is visible.
Even if the buttons moved, it's pretty easy to determine the location of
each of the corners, which are the closest corners and draw a line
dynamically between those corners.
Even if there were far more than just a few buttons involved, ie you wanted
to do something like a join-the-dots drawing with 50+ connections, and have
all the connections made in the correct sequence, I think I'd still stick
More information about the use-livecode