Author Topic: Support for alternative input devices  (Read 727 times)

randykato

  • Newbie
  • *
  • Posts: 9
Support for alternative input devices
« on: March 17, 2011, 10:25:11 pm »
We have been working on a presentation tool that will mostly be controlled via touchscreen. However, we are implementing support for multiple alternative input devices such as Kinect.

We've been using TUIO for this and with the AS3 library there is an easy way have TUIO events also dispatch matching mouse events, so just about everything we've built worked immediately, except for MegaZine and a few other things. With certain events (like those for dragging) that require using mouseX/mouseY, it wasn't working. We had to grab the coordinates relative to the MouseEvent and then everything worked fine. For example...

Instead of:
Code: [Select]
function dragIt(e:MouseEvent):void{
[ . . . ]
startX = mouseX;
}

We need:
Code: [Select]
function dragIt(e:MouseEvent):void{
[ . . . ]
startX = e.stageX;
}

This change, among others like easy de-activation of mouseover effects, could make MegaZine more flexible for use with many more devices.

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1989
  • MegaZine3 Developer
    • MegaZine3
Re: Support for alternative input devices
« Reply #1 on: March 18, 2011, 08:55:53 am »
I'm currently looking into tuio, and thinking about what changes a proper integration would require, and how to best generalize this. My current train of though follows some sort of abstraction layer (let's call it InputManager) that sits between MegaZine3 and the rest of the world. A default implementation would then use mouse events, but an alternative one could use tuio or even completely code generated "events". Still not 100% sure about this, though.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.

touchrev

  • Newbie
  • *
  • Posts: 2
Re: Support for alternative input devices
« Reply #2 on: January 25, 2012, 07:43:45 pm »
I'm currently looking into tuio, and thinking about what changes a proper integration would require, and how to best generalize this. My current train of though follows some sort of abstraction layer (let's call it InputManager) that sits between MegaZine3 and the rest of the world. A default implementation would then use mouse events, but an alternative one could use tuio or even completely code generated "events". Still not 100% sure about this, though.

Greetings, Florian!

I have recently purchased a license of your API and so far I have received amazing feedback on the extensibility and quality of the application.
I would not have replied in this 10 month old thread, but it is the only conversation I can find regarding TUIO (besides the revision history page and the API Docs).

I am currently working with v2.2.1 and trying to figure out how to use the TUIO plugin.
Is there a simple way to make pages turn from tuio touch events? (I've included the tuio plugin in the .mz3 plugins setting..)
I am familiar with the tuio-as3 library and have successfully implemented TuioTouchEvents in other applications, but I cannot figure it out on the magazine side..

Thank you for you help and I am grateful for whatever you can provide at this point!

Enthusiastically,
Steve Miller

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1989
  • MegaZine3 Developer
    • MegaZine3
Re: Support for alternative input devices
« Reply #3 on: January 25, 2012, 11:39:04 pm »
I just added some documentation on the plugin to the wiki, see if that's enough to get you started :)
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.