theres a tutorial in this project
Game
simple events, visibility, simple motion, simple loops, screen bounds, advanced costume handling, delays, direction and turning, input/output, advanced motion, program control, detect conditions,