xy
erik hansen
erikhans08 at yahoo.com
Wed Jan 23 16:33:01 EST 2002
hmmmmm.
--- Richard Gaskin <ambassador at fourthworld.com>
wrote:
> Tereza Snyder wrote:
>
> >> new and improved... no flashy text...
> >>
> >> on xy
> >> repeat until the mouseClick
> >> get the mouseLoc&&" horz:"&the mouseH&&"
> vert:"&the mouseV
> >> if it is not lastxy then
> >> put it
> >> put it into lastxy
> >> end if
> >> end repeat
> >> end xy
> >
> > To avoid bottling up the engine servicing
> your loop:
> >
> > on mouseMove mX, mY
> > put format( "horz: %d vert: %d", mX, mY )
> > end mouseMove
> >
> > Scott Raney has told us in the past that
> "repeat until the mouseClick" is
> > not a good idea because it bolixes up the
> event handling in the engine. I've
> > found that mouseMove works wonderfully in
> situations where you'd be tempted
> > to use "repeat until the mouse is up" or
> similar loops.
>
> Very true, but in this case it turns a very
> simple handler into a project.
> :)
>
> The example you posted has a different effect
> than the goal being met by the
> others: HC's traditional xy handler is invoked
> only until the mouse is
> clicked, and then stops. Using a mousemove
> handler is an always-on
> proposition, requiring a second handler to
> invoke it by setting a flag, and
> a modification to the mousemove to check that
> flag.
>
> Since xy is the only thing running when it's
> used, the performance
> degredation is less of an issue.
=====
erik at erikhansen.org http://www.erikhansen.org
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
More information about the metacard
mailing list