[Newbies] How to lay a morph down automatically

David Shaffer cdshaffer at acm.org
Tue Jul 25 14:27:32 UTC 2006

Mike O'Brien wrote:

>	Newly opened morphs seem to arrive in "picked-up" mode,
>attached to the "hand" (cursor).  You left-click to drop them.
>	I went looking for the code that executes when you left
>click on a picked-up morph but couldn't find it.
>	If I wanted to create a morph programmatically and have
>it start life already laid down somewhere, how would I do that?
>I'm presuming that the same check would get done as to whether it
>were to embed itself in whatever it was laid down on, or just
>sit there.  Of course this might wind up embedding it in whatever
>the mouse cursor happened to be sitting on at the moment, which
>would be bad news, since in this case the mouse and the morph
>wouldn't be near each other.
>	Thanks!
>Mike O'Brien

Is this what you mean?

HeadMorph new openInWorld

as opposed to

HeadMorph new openInHand

Additional you can position them:

hm := HeadMorph new openInWorld.
hm position: 400 at 300.

Hope that helps...


More information about the Beginners mailing list