Hi all,
Hope someone out there can help me.I am tring to make an image controller fly from one point to another point ..But I seem to have problems locating the
following code. All I have is an "image" name=graphic ..What is P2:X or P1.Y ? ..Could you make it work...?
thanks

VB Code:
  1. Private Sub Timer1_Timer()
  2. Dim speed As Long
  3. Dim X As Long
  4. Dim Y As Long
  5. speed = 10
  6. DistX = p2.X - p1.X
  7. distY = p2.Y - p1.Y
  8. dist = Sqr(DistX * DistX + distY * distY)
  9. Unitx = DistX / dist
  10. Unity = distY / dist
  11. graphic.Move graphic.Left + speed * Unitx, graphic.Top + speed * Unity
  12. End Sub