Ok, well while i was waiting for this thread to be cleared by the mods, i tried everything under the sun to get it working, and i did!
Here is what ive come up with:
DO
IF MouseClick() = 1
PRINT "Left click"
ELSE
IF MouseClick() = 2
PRINT "Right click"
ENDIF
ENDIF
LOOP
From what i can tell, DarkBasic used "MouseButton = 1" and DarkBasic Pro uses "MouseClick() = 1" (for left click).
I added the Do...Loop so the screen doesnt close and you can see it works!
!!!BUT!!!
I have a new problem, the next example doesnt work for me either, i have looked and i cant find any obvious things i can change.
REM Create some variables
BallX = 320
BallY = 240
BallSize = 20
SpeedX = 4
Speedy = -5
Border = 25
REM Initialize the program
SYNC ON
REM Set the color
color = RGB(0, 200, 255)
INK color, 0
REM Start the main loop
DO
REM Clear the screen
CLS
REM Draw the screen border
LINE 0, 0, 639, 0
LINE 639, 0, 639, 479
LINE 639, 479, 0, 479
LINE 0, 479, 0, 0
REM Move the ball
BallX = BallX + SpeedX
BallY = BallY + SpeedY
REM Check conditions for the BallX
IF BallX > 640 - Border
BallX = 640 - Border
SpeedX = SpeedX * -1
ELSE
IF BallX < Border
BallX = Border
SpeedX = SpeedX * -1
ENDIF
ENDIF
REM Check conditions for BallY
IF BallY > 480 - Border
BallY = 480 - Border
SpeedY = SpeedY * -1
ELSE
IF BallY < Border
BallY = Border
SpeedY = SpeedY * -1
ENDIF
ENDIF
REM Draw the ball
CIRCLE BallX, BallY, BallSize
REM Redraw the screen
SYNC
LOOP
The problem is, the program should bounce the circle off the screen walls, but it doesnt. Any help!!!???