venerdì, febbraio 06, 2009

Il prof ci ha lasciato un codice sorgente di small basic:

GraphicsWindow.BackgroundColor = "Black"
GraphicsWindow.PenColor = "White"
GraphicsWindow.MouseDown = OnMouseDown
GraphicsWindow.MouseMove = OnMouseMove
Sub OnMouseDown
GraphicsWindow.BrushColor=GraphicsWindow.GetRandomColor()
EndSub
Sub OnMouseMove
x = GraphicsWindow.MouseX -10
y = GraphicsWindow.MouseY -10
If (Mouse.IsLeftButtonDown) then
GraphicsWindow.FillEllipse(x, y,Math.GetRandomNumber(30),Math.GetRandomNumber(30))
GraphicsWindow.FillEllipse(x, y,Math.GetRandomNumber(30),Math.GetRandomNumber(30))
endif
EndSub

Nessun commento: