Draw line with mouse pointer

New releases and general discussions.

Post » Wed Nov 12, 2008 6:30 am

Yo guys,

I would like to know if there was a way to use the mouse pointer to draw lines (or scribble) with while the app. was running. Like, to jot down notes or something.

Tank hugh!
B
13
S
3
G
5
Posts: 286
Reputation: 3,193

Post » Wed Nov 12, 2008 4:48 pm

Just put down a canvas object, and in the events:

SETUP TWO GLOBAL VARIABLES: MouseX and MouseY

EVENTS

+Left mouse button is down
-Canvas: Draw line from global('MouseX'), global('MouseY') to MouseX, MouseY

+Is global variable MouseX different from MouseX(<<actual mouse coordinate)
-Set global variable MouseX to MouseX

+Is global variable MouseY different from MouseY(<<actual mouse coordinate)
-Set global variable MouseY to MouseY

That should get you perfectly unbroken lines. Hope that helps. :)
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Wed Nov 12, 2008 9:32 pm

Hey thanks Linkman. Didn't know about that object! 8)
B
13
S
3
G
5
Posts: 286
Reputation: 3,193


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 5 guests