Receiving mouse clicks from panels
I’d like to have a coloured rectangular panel or button which can receive and report mouse clicks. I’ve looked at lcd and ubutton which are great but the problem is I want to deploy this panel in Mira and neither of these object can be put into a Mira frame (yet).
I can put a panel object into a Mira frame but I can’t figure out how to get it to report mouse events. Is there any way to do that? If not, are there any panel-like objects I can use instead?
pictslider maybe ?
Maybe [hover] and some clever routing of [mousestate] clicks when over a panel?
----------begin_max5_patcher---------- 1615.3oc6b0tiahCE82oR8c.wuyNBa9b1+sOGUqF4j3gwsD.ANoytU6695uH 7wfS.uMDnKUifHav93C260WeLze74OswdW163Raqe25KVa17CVIaDkwKYSUA arOhdeeBpTbg1o3ums6q1aU0QwuSEkmasOKIq3REulkRSQGwhJ+iBBJ4RUjC hBYMyu45bozzSGIoIXpnafUklin6eijF+RAdOUhTPfySNasbAhSdg7iP1us9 yFMU1IZUaAZBoRxeKfD.xtMU4xqk9W4XYGXaW2Th9GWnXjJJg0VjD7YbQIIK sYerwFkm2n7MMuINS90LQaErstLRprLPcYE3yjplvutXTAiKnLh3TgjWeOJv VU6+74OcAC0bkfhDGB7jzUTSlh8zNNIa+2vhmHNWJMKGmRRyKvk3TJhpPRc8 GvuhNkPeQCi19BdEsGq+162FYicbA4PVJGHsuWd4UcIyVPLn.sGShKIEk22s WxFNmJ2gJ3D7tDbSiMl0bVVR65pevx7KPojiHJlRjPF5T2tji4EjTZ6NCmhX Myak6KxRRZ2ZxpN2WUGXO72i+N4.8MQy0hVY2.Iu5AhcMccfDiKocJjhhK6T TKO9VFmM87aWwUi.zNJPINwxwBzpxq7TtSz.naqZZEQvsYM8DU.5D8DzmaKH syC9PXgdBM31Em8YL2aHhcnzX6s0mYgLtb4LWwpey8JMlnOhKKQw39Y5cwh3 sVfm3+4vOZJqC0y5vav5tLVOjy5dJGQWwonqS6.io8GFM67j5OioYPn4zL34 Pow8u9zbPXiClS1AlS19RNVQ0dvkGUe+hPC7LOBsuJTwuNAnEicsgUuBU4LL pRZBB8qNNXKvOvFhTSZc26y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fACro0DqKWnAXSNgwyEZ.VXfGCv.2DXSusOXPOI6xqSgIFXtBL +ACro0ozyclxXdCJXQ3jiqng3S5E8Pv0M4Kuf4IeAAyS9BL8Se6MHf4O8SS1 01QCvl9LDGVHrGAi4NSYrtgM03TN8A8Gzz2QODXAuYr0amG1Qxg7LRJsrZ4+ ARMQjq9ORIFPyUzdsQhZ8nc9ZCEChtekgc+BC64qKT6WVnnCYG9W.q3tfgC -----------end_max5_patcher-----------
That is indeed very clever. ;-)
Many thanks for that – it looks perfect.
This was solved in a previous topic. Look here: http://cycling74.com/forums/topic/momentary-switch-for-mira/
My final solution uses a stack of objects to register mouse clicks as well as Mira touches.
I did look at that thread when trying to solve my issue but it wasn’t suitable for me as I don’t want to use toggle switches in the mira.frame.
I like the solution posted by Pedro using hover and mousestate so will probably go down that route.
Unfortunately, the hover + mousestate approach isn’t going to work with Mira because the iPad doesn’t support the notion of hovering or mice. So apologies for framing my question poorly.
As it happens, there’s a solution built in to Mira which is the mira.multitouch object and mira.mt.fingers.
Thanks for all the input, however.
I did find it somewhat strange, but I thought that you wanted to have some kind of control on the computer with the mouse and replicate that state on the iPad with a mira compatible object (panel, in this case).
Not to worry, your example was still very useful. I think that combination of hover and mousestate is very powerful.
Forums > MaxMSP