Pin Me Down
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 10096
- Joined: Fri Feb 19, 2010 10:17 am
Pin Me Down
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.
- Attachments
-
- PIN ME DOWN.livecode.zip
- Stack.
- (1.3 KiB) Downloaded 106 times
Re: Pin Me Down
Hi Richmond,
try this
Kind regards
Bernd
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
Bernd
-
- Livecode Opensource Backer
- Posts: 10096
- Joined: Fri Feb 19, 2010 10:17 am
Re: Pin Me Down
Bless You!you are outside of the starting object and it will only get a mouseRelease

I had absolutely no idea about that.
-
- Livecode Opensource Backer
- Posts: 10096
- Joined: Fri Feb 19, 2010 10:17 am
Re: Pin Me Down
Cripes: long-winded process . . .
- Attachments
-
- PIN ME DOWN.livecode.zip
- Stack.
- (2.03 KiB) Downloaded 104 times
Re: Pin Me Down
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
-
- Livecode Opensource Backer
- Posts: 10096
- Joined: Fri Feb 19, 2010 10:17 am
Re: Pin Me Down
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.
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.
-
- Livecode Opensource Backer
- Posts: 10096
- Joined: Fri Feb 19, 2010 10:17 am
Re: Pin Me Down
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).
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
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.
BTW, it is legal to reuse the starting point later in the pattern, or duplicate any of the others as well.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Livecode Opensource Backer
- Posts: 10096
- Joined: Fri Feb 19, 2010 10:17 am
Re: Pin Me Down
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?
- - -
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
Hi Richmond,
the trick is to insert empty lines in the list of points. That will not show the connecting line.
Kind regards
Bernd
the trick is to insert empty lines in the list of points. That will not show the connecting line.
Kind regards
Bernd
-
- Livecode Opensource Backer
- Posts: 10096
- Joined: Fri Feb 19, 2010 10:17 am