Results 1 to 2 of 2

Thread: Move pictures accross line to time

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Posts
    332

    Move pictures accross line to time

    I would like to move a picture accross a line to time.

    For example, drawing a line with each end A and B respectively.
    I would like to append the picture (most probably a tiny dot) to the line, starting from A, and move it to B over a certain period of time.

    The problem is, how do I make the dot move exactly on the line to B, so that it also reaches B by the time I specify?

    Any ideas ppl on how I can code this?

  2. #2
    Fanatic Member McCain's Avatar
    Join Date
    Jan 2002
    Location
    Sweden/Denmark
    Posts
    802
    It is just math...
    First you have to know how long the line is and then divide the lenght with the time. So now you know how far you have to move the dot every time constant (i.e. every second). Move the dot by changing its .left value and use the API cal GetTickCount. Do not use a timer!
    (Asuming it is a horizontal line)
    Last edited by McCain; Feb 20th, 2002 at 11:27 AM.
    Never argue with fools, they will only drag you down to their level, and beat you with experience.

    Q: How do you tell an experienced hacker from a novice?
    A: The latter thinks there's 1000 bytes in a kilobyte, while the former is sure there's 1024 meters in a kilometer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width