function OnMouseDrag(x, y) ... end function
This is an event function you can overload in you prodram to react on mouse actions. (x, y) - are the coordinates of a point, over which user is dragging a mouse. On Windows this event is firing when left mouse button is pressed and mouse is moving. On touchscreen devices it is fired when user is touching the the screen and moving his stylus/finger. Example:
$Pony = #"pony.png" $nWidth = GetImageWidth($Pony) $nHeight = GetImageHeight($Pony) function OnMouseDrag(x, y) ClearScreen() DrawImage(x-$nWidth/2, y-$nHeight/2, $Pony) end function
See also: