Results 1 to 3 of 3

Thread: How do I move a bitmap DOWN or LEFT?

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Posts
    11

    How do I move a bitmap DOWN or LEFT?

    Hi,

    I know the code to move a bitmap to the right, which is : (Example)
    Image1.Left = Image1.Left + 20
    But, how do you move the object in the opposite direction, i.e. Left.

    Also, to move an object upwards its
    Image1.Top = Image1.Top + 10
    But, how do you move the object downwards.

    Any Info, I`m in the middle of making the game!!!

    Mark

  2. #2
    Zaei
    Guest
    Move Left: SUBTRACT values from .Left
    Move Right: Add values to .Left
    Move Up: SUBTRACT values from .Top
    Move Down: ADD values to .Top

    Z.

  3. #3
    Junior Member
    Join Date
    Jun 2001
    Location
    Lv4-26
    Posts
    19
    Sub Form_Keypress
    i use these keys because its simple to use the num pad controls
    'up
    if KeyAscii = Asc ("8") then pic.top=pic.top-10
    'down
    if KeyAscii = Asc("2") then pic.top=pic.top+10
    'left
    if KeyAscii = Asc("4") then pic.left=pic.left-10
    'right
    if KeyAscii = Asc("6") then pic.left=pic.left+10
    Help!, They're Gonna Get Me

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