[Q] Learning Event

Karl Ramberg karl.ramberg at chello.se
Sat Mar 30 17:19:50 UTC 2002


ducasse wrote:
> 
> Hi
> 
> I want to do a small game based on the FlasherMorph.
> I change its location via the step method so that it crosses the screen
> 
> I redefined the methods
>     handleMouseDown: to return true
> 
>     mouseDown: to toggle the direction
> 
> Now I tried to increase the speed when the user lets the mouse on the morph.
> There is a handleMouseOver: but no method mouseOver:.
> What is the idiom to get the mouseOver behavior?

Look at mouseEnter and mouseLeave
Karl

> 
> I also tried to handle keystroke evt
> so I redefined handlesKeyboard: return true
> and keystroke: to analyse the hit key
> 
> But the morph to not get the key event. The browser still gets the event
> 
> I'm sure I missed something. Any hint?
> 
> Thanks



More information about the Squeak-dev mailing list