How to develop multitouch app in Flex?? 
Posted: 16 November 2008 09:51 AM   [ Ignore ]
New Member
Rank
Total Posts:  31
Joined  2008-09-25

Any one know how to develop multitouch app in Flex and the same time can work with TUIO??

Thx

Profile
 
 
Posted: 16 November 2008 12:15 PM   [ Ignore ]   [ # 1 ]
New Member
Avatar
Rank
Total Posts:  57
Joined  2007-12-08

Flex Builder ( the tool built on Eclipse ) is a great actionscript editor.  I highly recommend the NUI group head in this direction.  In Flex Builder when you start a project you can specify that you want to build an actionscript project and after that there isn’t a ton of differences than building an application in Flash CS3. 

Flex ( as apposed to Flex Builder ) is a framework.  You can use xml mark ( mxml ) up to represent actionscript components.  In addition to that the Flex team at Adobe has put together an exhaustive list of components to help developers jump start the process.  In stead of starting with a Sprite a developer might start with a Button or a Text Input.  Flex Builder also has a visual representation of the code (mxml) so users can drag and drop components on to the screen. 

Flex (the framework) does not have multi-touch components out of the box.  There is a fair amount of work involved in getting then to react to TouchEvents as apposed to Mouse Click events.  Additionally the way the components are not written to be rotatable or scalable which as an underlining class in a lot of what makes the UI feel natural.  Basically a quick and dirty way to get objects to react to Multi-touch events would be to instantiate the TUIO class after your stage has been created then add an event listener for the TouchEvent to the component that you have on stage. 

I think Flex Builder is a great IDE but we need to start from the groud up and build multi-touch components for use in Flex builder.  So the big question is who want to start in on the multi-touch Flex component framework?  It’s a pretty big undertaking.

-Matt

Profile
 
 
Posted: 16 November 2008 06:11 PM   [ Ignore ]   [ # 2 ]
New Member
Avatar
Rank
Total Posts:  32
Joined  2008-10-12
MattL - 16 November 2008 12:15 PM

Flex Builder ( the tool built on Eclipse ) is a great actionscript editor.  I highly recommend the NUI group head in this direction.  In Flex Builder when you start a project you can specify that you want to build an actionscript project and after that there isn’t a ton of differences than building an application in Flash CS3. 

Flex ( as apposed to Flex Builder ) is a framework.  You can use xml mark ( mxml ) up to represent actionscript components.  In addition to that the Flex team at Adobe has put together an exhaustive list of components to help developers jump start the process.  In stead of starting with a Sprite a developer might start with a Button or a Text Input.  Flex Builder also has a visual representation of the code (mxml) so users can drag and drop components on to the screen. 

Flex (the framework) does not have multi-touch components out of the box.  There is a fair amount of work involved in getting then to react to TouchEvents as apposed to Mouse Click events.  Additionally the way the components are not written to be rotatable or scalable which as an underlining class in a lot of what makes the UI feel natural.  Basically a quick and dirty way to get objects to react to Multi-touch events would be to instantiate the TUIO class after your stage has been created then add an event listener for the TouchEvent to the component that you have on stage. 

I think Flex Builder is a great IDE but we need to start from the groud up and build multi-touch components for use in Flex builder.  So the big question is who want to start in on the multi-touch Flex component framework?  It’s a pretty big undertaking.

-Matt

I am also a fan of Flex Builder but an even bigger fan of Flex SDK. Flex Builder is not free, Flex SDK is. You can actually do the same things in both of them, it’s just a different way of work.

Multitouch components for Flex is a great idea though. I would happily work on that if there is any project starting.

 Signature 

Building MT for games projects : 24” LCD + LLP

Profile
 
 
Posted: 17 November 2008 03:55 AM   [ Ignore ]   [ # 3 ]
New Member
Avatar
Rank
Total Posts:  33
Joined  2008-05-26

Actually, i’m working on a flex multi-touch component.
I’ll publish the result in the group but meanwhile if you are a flex developer and interested to take part on this project feel free to contact me.

Profile
 
 
Posted: 18 November 2008 04:39 PM   [ Ignore ]   [ # 4 ]
New Member
Rank
Total Posts:  3
Joined  2008-11-18

Hello all, I’m Flex programmer but i’m new at multi-touching apps. I’m actually trying to use it with Touchable and RotatableScalable classes (with some changes), does anyone knows if have better classes to work with Flex?
Thx

Profile
 
 
Posted: 18 November 2008 04:41 PM   [ Ignore ]   [ # 5 ]
New Member
Rank
Total Posts:  3
Joined  2008-11-18
seeacloud - 16 November 2008 09:51 AM

Any one know how to develop multitouch app in Flex and the same time can work with TUIO??

Thx

Yes, it works great, just remember that you need to initialize it, it will be something like that: TUIO.init(this, “127.0.0.1”, 3000, 800, 600);

Profile
 
 
Posted: 18 November 2008 04:41 PM   [ Ignore ]   [ # 6 ]
New Member
Rank
Total Posts:  3
Joined  2008-11-18
dsan - 17 November 2008 03:55 AM

Actually, i’m working on a flex multi-touch component.
I’ll publish the result in the group but meanwhile if you are a flex developer and interested to take part on this project feel free to contact me.

I’m waiting for this :D

Profile
 
 
Posted: 18 November 2008 11:11 PM   [ Ignore ]   [ # 7 ]
New Member
Avatar
Rank
Total Posts:  57
Joined  2007-12-08

Here are three open source Flex project deployed as Air applications:

Rock Me Amadeus - http://code.google.com/p/rockmeamadeus ( open source multi-touch mp3 player )
Multi Touch Flickr Viewer - http://code.google.com/p/multitouchflickrviewer ( Flickr image stretch and zoom )
TouchRotary - http://code.google.com/p/touchrotary ( Rotary VIOP phone application )

All three are Multi-touch applications and each of the three apps have a few custom components that listen for TouchEvents. 

The code is open but it is far from clean well written code.  I’d like to see a group dedicated to building a set of flexible, extensible and stylable multi-touch components that developers can drag and drop onto the stage.  The Flex 4 Gumbo framework using Flash 10 would be a really good starting place for the group.

PM me with any interest.  Or let me know if I can help with any component creation. 

-Matt

Profile
 
 
Posted: 19 November 2008 03:16 AM   [ Ignore ]   [ # 8 ]
New Member
Rank
Total Posts:  5
Joined  2008-10-16

Greetings all!

I also work in Flex Builder but have been building MultiTouch apps as ActionScript only projects.  So I have not been utilizing the Flex framework for my apps…

What I have been using as a framework is PureMVC ( http://puremvc.org ).  I’ve found its method of passing notifications handy for passing touch events around to the views listening for those events.  I’ve even forgone the TUIO as lib here to see if I could simply rely on having individual views doing hit detection on the touch notifications passed to them and, so far, so good. 

I hope to have some code available soon if anyone is interested in the approach.  Wouldn’t mind showing the authors of the TUIO AS work check it out as well and tell me where I can improve smile

Profile
 
 
Posted: 19 November 2008 11:29 AM   [ Ignore ]   [ # 9 ]
New Member
Avatar
Rank
Total Posts:  57
Joined  2007-12-08

I agree with joseh that a some sort of MVC framework needs to be used in both building out the component architecture as well as the creation of larger applications.  I think it would also be helpful for the group to standardize on one framework in order to make the development process more seamless when multiple developers are working on the same projects or components. 

Here is a quick list of some of the more popular frameworks:

Cairngorm ( maybe the most popular )
PureMVC
Swiz ( http://www.onflex.org/ted/2008/09/360flex-sj-2008-introduction-to-swiz.php )
Mate ( seems to be gaining popularity right now )

I think organizing the TUIO data in a data model would be a great place to start.

Profile
 
 
Posted: 20 November 2008 12:09 PM   [ Ignore ]   [ # 10 ]
New Member
Rank
Total Posts:  3
Joined  2008-10-23
MattL - 19 November 2008 11:29 AM

I agree with joseh that a some sort of MVC framework needs to be used in both building out the component architecture as well as the creation of larger applications.  I think it would also be helpful for the group to standardize on one framework in order to make the development process more seamless when multiple developers are working on the same projects or components. 

Here is a quick list of some of the more popular frameworks:

Cairngorm ( maybe the most popular )
PureMVC
Swiz ( http://www.onflex.org/ted/2008/09/360flex-sj-2008-introduction-to-swiz.php )
Mate ( seems to be gaining popularity right now )

I think organizing the TUIO data in a data model would be a great place to start.

I’ll be working on adding multi-touch features to some Flex apps developed using the Cairngorm framework in March.  I’d be happy to contribute to anything done with that framework.

Profile
 
 
Posted: 23 November 2008 09:14 AM   [ Ignore ]   [ # 11 ]
New Member
Rank
Total Posts:  1
Joined  2008-11-17
MattL - 19 November 2008 11:29 AM

I agree with joseh that a some sort of MVC framework needs to be used in both building out the component architecture as well as the creation of larger applications.  I think it would also be helpful for the group to standardize on one framework in order to make the development process more seamless when multiple developers are working on the same projects or components. 
Here is a quick list of some of the more popular frameworks:
Cairngorm ( maybe the most popular )
PureMVC
Swiz ( http://www.onflex.org/ted/2008/09/360flex-sj-2008-introduction-to-swiz.php )
Mate ( seems to be gaining popularity right now )
I think organizing the TUIO data in a data model would be a great place to start.

That is an amazing post, ]MattL!
I have been programming AS3 classes in Flex Builder 3, and currently digging into multitouch technology.
Indeed, having a common component dedicated for multitouch events handling will be very handy, so that the applications can be built upon the same multitouch component.
I see some projects using multitouch idea. But isn’t it time to start an open source project for AS3 classes related purely to the multitouch itself?
I will be glad to join such a project.
If anyone has compared the existing projects, you probably have the understanding which one fits best to a common approach of an AS3 multitouch component.
MattL, can you describe those listed frameworks and provide the links, please?

Profile
 
 
Posted: 23 November 2008 12:50 PM   [ Ignore ]   [ # 12 ]
New Member
Rank
Total Posts:  5
Joined  2008-10-16

Here’s a couple of related PureMVC links:

PureMVC : http://www.puremvc.org

And a great article on describing the framework and a simple example: http://www.as3dp.com/2007/12/27/minimalist-mvc-example-using-the-puremvc-framework/

As for the others, MattL ?  smile

Profile
 
 
Posted: 23 November 2008 02:45 PM   [ Ignore ]   [ # 13 ]
New Member
Avatar
Rank
Total Posts:  57
Joined  2007-12-08

Here are a few links regarding frameworks in addition to the PureMVC link provided above:

Mate : http://mate.asfusion.com/

Cairngorm: http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm;jsessionid=69011C9404204FA74371FBED1E24F63B

Swiz: http://code.google.com/p/swizframework/

As for component creation, I think we should consider targeting Flash player 10/Air 1.5 and the new Flex 4 gumbo architecture.  Flash player 10 has some performance enhancements, native 3D, and the ability to apply live filters via Pixel Bender.  The negative for Flash 10 and Air 1.5 is lower penetration rate but I don’t see that as an issue for Multi-touch development since often the hardware is so tightly monitored and controlled. 

Here is a link to some Gumbo documentation:
http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Component+Architecture

I’m going to start in on a collection of extensible components.  For once I’ll try to write some clean well documented code so people can reuse, recycle and improve upon each component.  smile

-MattL

Profile
 
 
Posted: 24 November 2008 01:54 AM   [ Ignore ]   [ # 14 ]
New Member
Rank
Total Posts:  5
Joined  2008-10-16

This thread has inspired me to post up a version of the PureMVC based framework I’ve been using for the rest of you to check out.  Find it here: http://code.google.com/p/multitouchbase/ I may need to post this in a separate thread, but I thought those of you actively on this one would like to take a look at it first.

This was initially inspired by the IDEO actionscript library as I was looking to port their version to AS3.  You’ll find that some of the code is similar in approach to theirs. 

As for this version, it is very *bare-bones*.  That is, it is parsing the TUIO xml and passing each ‘touch’ as an event via the PureMVC notification system.  As for what else that does, its up to you to add your own views/mediators to respond to those events accordingly. I hope to post some simple example views to show how you can use the notifications to respond to events. As for now, if you compile and run this app while using an active TUIO simulator w/ FLOSC (running on the default host/port), you will see red touch points appear in the SWF where the touches are registered.  Also, you can use the 0-4 keys on the key board to simulate touches based on the position of your mouse.  You can also drag these touch points by clicking and dragging them with a mouse as well.  This is initially how I debugged my earlier apps as inspired by the IDEO work.

Please PM over your thoughts and/or reviews.  Also, would love to have anyone that has the time/interest to contribute to the project as well.

Profile