Given the following program, which I claim starts a flag in the
lower right-hand corner of the window and moves it diagonally up and to
the left,
/ Date: October 17, 2006
// Author: Wayne Heym
Program Sprite_Moving_Diagonally
Method Main()
Define F1 As Sprite
F1.Load( "ohio-flag.gif" )
Define F1Xpos As Decimal = ScreenWidth() - F1.Width
Define F1Ypos As Decimal = ScreenHeight() - F1.Height
Define F1_X_Speed As Decimal = -6
Define F1_Y_Speed As Decimal = -6
F1.MoveTo( F1Xpos, F1Ypos )
F1.Show()
While Not IsKeyDown( Escape )
RefreshScreen()
DoEvents()
Delay( 15 )
F1Xpos = F1Xpos + F1_X_Speed
F1Ypos = F1Ypos + F1_Y_Speed
F1.MoveTo( F1Xpos, F1Ypos )
End While
End Method
End Program