Morse Code Sample Program
' This example shows how to use sound and image resources
' Press mouse button to start sound
' Release mouse button to stop sound
program "Morse Code"
$Sound = #"tone.mp3"
$Picture = #"morse.png"
function OnSize()
ClearScreen()
nX = int(GetWidth()/2 - GetImageWidth($Picture)/2)
nY = int(GetHeight()/2 - GetImageHeight($Picture)/2)
DrawImage (nX, nY, $Picture)
end function
function OnMouseUp(x, y)
StopSounds()
end function
function OnMouseDown(x, y)
PlaySound($Sound)
end function
OnSize()