|
-
Jun 26th, 2001, 09:18 AM
#1
Thread Starter
New Member
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
-
Jun 26th, 2001, 12:01 PM
#2
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.
-
Jun 28th, 2001, 05:13 AM
#3
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|