1. Beginning
GraphicsWindow.KeyDown = kd
aloha = Shapes.AddEllipse(10,10)
Sub kd
For i = 0 To 100
Shapes.Move(aloha, i, i)
EndFor
EndSub
2. Shape's movement is great but too fast
Reason: shapes movement too fast
GraphicsWindow.KeyDown = kd
aloha = Shapes.AddEllipse(10,10)
Sub kd
For i = 0 To 100
Shapes.Move(aloha, i, i)
program.delay(1000)
EndFor
EndSub
But if I add program.delay(1000) the shape is not moving at all. Why? Still don't know.
3. Now forget it for a while. We build the data outside the sub of kd.
For j = 0 to 100
x[j] = j
endfor
Sub kd
For i = 0 To Array.GetItemCount(x) - 1
Shapes.move(aloha, x[i], x[i])
TextWindow.WriteLine(i)
'Program.Delay(1000)
EndFor
EndSub
And it works well
GraphicsWindow.KeyDown = kd
aloha = Shapes.AddEllipse(10,10)
Sub kd
For i = 0 To 100
Shapes.Move(aloha, i, i)
EndFor
EndSub
2. Shape's movement is great but too fast
Reason: shapes movement too fast
GraphicsWindow.KeyDown = kd
aloha = Shapes.AddEllipse(10,10)
Sub kd
For i = 0 To 100
Shapes.Move(aloha, i, i)
program.delay(1000)
EndFor
EndSub
But if I add program.delay(1000) the shape is not moving at all. Why? Still don't know.
3. Now forget it for a while. We build the data outside the sub of kd.
For j = 0 to 100
x[j] = j
endfor
Sub kd
For i = 0 To Array.GetItemCount(x) - 1
Shapes.move(aloha, x[i], x[i])
TextWindow.WriteLine(i)
'Program.Delay(1000)
EndFor
EndSub
And it works well
No comments:
Post a Comment