Page 1 of 1
Pin Me Down
Posted: Sun Sep 11, 2022 9:57 am
by richmond62
-
I might be trying to be too clever . . .
Certainly I cannot work out
WHY the second
set the points (in the
mouseUp statement) does
NOT set the points.
Re: Pin Me Down
Posted: Sun Sep 11, 2022 10:47 am
by bn
Hi Richmond,
try this
Code: Select all
local doMove = false
on mouseDown
put true into doMove
put the loc of me into fld "fSTART"
put the loc of me into fld "fFINISH"
reset the templateGraphic
if there is not a graphic "LYNE" then
create grc "LYNE"
end if
-- set layer to be able to click again into "me"
-- otherwise "me" is partially covered by "LYNE"
set the layer of grc "LYNE" to the layer of me -1
set the style of grc "LYNE" to "line"
set the lineSize of grc "LYNE" to 4
-- set the height of grc "LYNE" to 100
-- set the width of grc "LYNE" to 100
--send "choose browse tool" to me
choose "browse" tool -- I think it is not needed; how would you get here in edit mode
put fld "fSTART" into XSTART
set the points of grc "LYNE" to (XSTART & cr & XSTART)
end mouseDown
on mouseMove
if doMove then
put the mouseLoc into fld "fFINISH"
set the points of grc "LYNE" to field "fStart" & cr & the mouseLoc
end if
end mouseMove
on mouseUp
put fld "fSTART" into XSTART
put fld "fFINISH" into XFIN
set the points of grc "LYNE" to (XSTART & cr & XFIN)
put false into doMove
end mouseUp
-- you are outside of the starting object and it will only get a mouseRelease
on mouseRelease
mouseUp
end mouseRelease
Kind regards
Bernd
Re: Pin Me Down
Posted: Sun Sep 11, 2022 10:50 am
by richmond62
you are outside of the starting object and it will only get a mouseRelease
Bless You!
I had absolutely no idea about that.
Re: Pin Me Down
Posted: Sun Sep 11, 2022 12:21 pm
by richmond62
-
Cripes: long-winded process . . .
Re: Pin Me Down
Posted: Sun Sep 11, 2022 1:35 pm
by bn
richmond62 wrote: ↑Sun Sep 11, 2022 12:21 pm
Cripes: long-winded process . . .
Richmond,
I do not understand what the rules of this game are. Hence I have no idea what you are asking; if you are asking anything at all.
KInd regards
Bernd
Re: Pin Me Down
Posted: Sun Sep 11, 2022 2:08 pm
by richmond62
This is NOT a game, it is an attempt to make one of
those funny login things that I have on my Android phone.
-
-
And, No, I wasn't a question, it was just a moan about
how long-winded doing it was.
Re: Pin Me Down
Posted: Sun Sep 11, 2022 4:31 pm
by richmond62
AND, having got "that" far, the big question is how one stores that pattern so that
next time I make the same pattern the thing "lets me into the Magic Kingdom",
and when I make a mistake it does not let me in.
Mind you, before that, there is another problem:
-
-
So code has to be altered so one can ONLY end up one's mouse-drag over one of the other
spots (i.e. NOT the one one started dragging from).
Re: Pin Me Down
Posted: Sun Sep 11, 2022 5:47 pm
by jacque
You need the current behavior to draw the line but it shouldn't be used to store the pattern because people are not exact when drawing it. Instead, store the location of every dot they enter, which is a fixed point. When tracking a login attempt, use the dot locations and then compare that list with the stored one.
BTW, it is legal to reuse the starting point later in the pattern, or duplicate any of the others as well.
Re: Pin Me Down
Posted: Mon Sep 12, 2022 10:32 am
by richmond62
Coo; talk about a "dark night of the soul" . . . lay awake half the night over this little problem:
-
-
-
Is there a way to COMBINE 2 or more graphics into 1 graphic WITHOUT
silly things such as that central linking line?
Re: Pin Me Down
Posted: Mon Sep 12, 2022 11:11 am
by bn
Hi Richmond,
the trick is to insert empty lines in the list of points. That will not show the connecting line.
Kind regards
Bernd
Re: Pin Me Down
Posted: Mon Sep 12, 2022 12:12 pm
by richmond62
That's super, Bernd.
You're the man!