I have a ball on screen as an ImageView and I want to move it left 5 places, then 10 places to the right and then back 5 places to the left.
I wrote this code:
But it will not move at all. Yet if I take out the loop that moves it to the right it moves the ball as intended so for some reason it only lets me move an image view left. Any idea why this is?
Edit: I have found I can move the imageview right but if I then try to move it left it will not let me, it will let me move it only one direction if that makes sense? Not a bit left then a bit right or vice versa to make it appear the ball is moving
Any help is really appreciated, thank you
Dave
I wrote this code:
B4X:
Sub moveball
' move ball left
For l = 5 To 1 Step -1
ImageView1_ball.Left = l
Next
' now move ball back to original position
For l = 1 To 5
ImageView1_ball.Left = l
Next
End Sub
Edit: I have found I can move the imageview right but if I then try to move it left it will not let me, it will let me move it only one direction if that makes sense? Not a bit left then a bit right or vice versa to make it appear the ball is moving
Any help is really appreciated, thank you
Dave
Last edited: