While ("True")
For x = 0 To 800 Step 4
If Key = "Left" Then
yInc = yInc * .9
ElseIf Key = "Right" Then
yInc = yInc * 1.1
EndIf
If y > yCenter Then
yStep = yStep - yInc
If Key = "Down" Then
yStep = yStep * .9
EndIf
Else
yStep = yStep + yInc
If Key = "Up" Then
yStep = yStep * 1.1
EndIf
EndIf
y = y + yStep
Shapes.Move(Dot[x],x,y)
Program.Delay(10)
EndFor
EndWhile
Sub OnKeyDown
Key = GraphicsWindow.LastKey
EndSub
Sub OnKeyUp
Key = ""
EndSub
Sub InitVariables
GraphicsWindow.PenColor = "Blue"
For x = 0 To 800 Step 4
Dot[x] = Shapes.AddEllipse(6,6)
Shapes.Move(Dot[x],x,yCenter)
EndFor
GraphicsWindow.BrushColor = "Red"
Note = Shapes.AddText("Tap the ARROW keys to affect the wave!")
Shapes.Move(Note,50,20)
EndSub