Detect the point where the mouse was clicked

Raconteur's picture

I must be completely obtuse here... All I want to do is have a comp that I can click in, detect the point that was clicked and use it as input into the processing of the comp.

Ultimately, I'd like to have the click initiate the comp's processing if possible.

I have tried the Interaction and Mouse, but the Interaction requires it to be connected to something to interact with, and I cannot get the coords out of say a Billboard. The Mouse just streams the position throughout the comp...

This can't be difficult to do... what am I missing?

Thanks!

C

smokris's picture
Re: Detect the point where the mouse was clicked

Use the Mouse patch. Create two Sample & Hold patches, and connect X to one and Y to the other, and use the Left Button output to trigger the Sampling input on the Sample & Hold patches.

Raconteur's picture
Re: Detect the point where the mouse was clicked

Ok, will give that a try. Thanks!

Is there a way to "kick-off" the timeline with the mouse click, or is the comp just always running?

smokris's picture
Re: Detect the point where the mouse was clicked

Right-click the Timeline patch and set Timebase to External. Then use a Stop Watch or something similar to provide the Time input.

Raconteur's picture
Re: Detect the point where the mouse was clicked

Cheers, Steve! Will post (with kudos to you) when I'm done!

Raconteur's picture
Re: Detect the point where the mouse was clicked

Hey Steve,

I guess I spoke too soon... how do I make the overall comp rely on the new Timeline? Or does it do that by default?

bAjA's picture
Re: Detect the point where the mouse was clicked

I'm guessing you used the term "timeline" to describe the rendering of your composition. This confused Steve as there is a patch call the timeline. If you didn't already have a timeline patch in your comp then its not what your looking for.

Most patches are driven by patchtime - so they start running when the patch starts to render. You can change this by right clicking a patch and setting its time base to external - this allows you to feed a new number in to replace patchtime. Eg a stopwatch.

See the attachment for an example.

PreviewAttachmentSize
timeBase.qtz6.06 KB

Raconteur's picture
Re: Detect the point where the mouse was clicked

Ahhh... now I get it.

Thanks a TON!