Steve,

Remove the dragModel behavior and see if the "z" part works.

Faisal



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve Rachels
Sent: Friday, April 23, 2004 10:36 AM
To: [EMAIL PROTECTED]
Subject: Re: <lingo-l> KeyDown, mouseDown question

Faisal,

I seem to owe you at least half a winder.... for the try... ;)

It works part of the way.  If just used straight from the box
(copy/paste
your code), it works great, but when I incorporate it into my code, it
doesn't do what I'm after.  My code:

property newme, theLoc, theModel

on mouseDown me




global gModelCount


if voidP(gModelCount) then

gModelCount = 0

end if


if the keyPressed = "z" then


theLoc = the mouseLoc - point(sprite(1).left, sprite(1).top)


-- Find the model under the mouse closest to the camera

theModel = sprite(1).camera.modelUnderLoc(theLoc)


--Put the member name in the box

member("WhatItem").text = string(theModel)

if voidp(theModel) then exit



-- Clone the original model with a new name

newMe = theModel.clone("model" & gModelCount )

gModelCount = gModelCount + 1



else

put "z isn't down"

end if



end

So it will put the "z isn't down" into the message window with a
mouseDown,
but won't let me clone the model with the key down.  It's as if when the
key
is down it doesn't recognize the mouseDown.  Oh, and there's also a
dragModel behavior on the sprite (3dworld). Any suggestions?


----- Original Message ----- 
From: "Faisal Imam" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 23, 2004 7:52 AM
Subject: RE: <lingo-l> KeyDown, mouseDown question


> Yes you are right. I caught that just as I pressed the send button :)
>
> Does that still qualify for winder shins?
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Kerry
Thompson
> Sent: Friday, April 23, 2004 9:42 AM
> To: [EMAIL PROTECTED]
> Subject: RE: <lingo-l> KeyDown, mouseDown question
>
> > Try:
> >
> > on mouseDown
> >   if the key = "z" then
> >     put "Z Down with a click"
>
> Steve will probably dance windershins for you, too ^_^
>
> Just a note, though. The key doesn't indicate if the key is currently
> down--it gives you the ANSI code of the last key pressed. If Steve is
> looking for simultaneous key presses and mouse downs, I think
> keyPressed(0) is the function to call.
>
> Cordially,
>
> Kerry Thompson


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]).
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to