Fire up the SVN, Touchlib’s AS3 TUIO library has been updated! Along with RotatableScalable. These files have been my introduction to developing Flash AS3 apps for multi-touch. This is a great thing, changes that have been mentioned in the NUIGroup Forum Threads have been added in. And even suggestions from this site has been added as well.
returnBlobs(); function was added into TUIO.as ~ a personal favorite of mine ~ read more
RotatableScalable scaling registration point bug fixed ~ read more
and TUIO debug mode ON/OFF bug fixed, all tracking diplays can be turned off without errors
Now that Touchlib is once again updated. I’ve integrated the new files into my own collection of experiments., and went through each one to make sure no problems arose. Another thing I began checking was using Flash Player’s Standalone Debugger version 10. For those who don’t have Flash to work with and do not have a stand alone player, that’s where you can find one. Read the rest of this entry »
Tonight, I decided to look into some of these core files you can find in the Touchlib Library. If you haven’t tried it out yet, there is a LOT of powerful stuff in there, but to me it seems rather tucked away. You need to open up the file and just read them to see what they intend to do. Then you can start to simplify.
Now the paint canvas file is used in the AS3\src\deploy\Paint.swf file. It give you a nice palette of color to choose from and uses Filters to blur and fade out and disperse the lines/dots as you draw them. Fact is that you are just dropping dots along a path to create the lines in the file.
Looking at that file, I wanted to pull out the most basic part. And maybe try to change it a little bit. So I don’t really want to bring in the color picker, only the touch drawing part. And I want to change that to put down a random color for each time I get a new touch point. Read the rest of this entry »
There are many APIs out there to work with. If you start searching around Google, there are many people dedicated to helping people like you and me tie in different information and resources into Flash. It can take quite a long time just understanding a full API and be able to use ALL of it’s capabilities. But that idea is way down the road. If you are like me, it’s nice to find something to help you get off the ground. Read the rest of this entry »
Here’s the link, it’s the whee hours of morning now. But it has been quite an eventful saturday.
And now I just realizied I lost another hour today…Daylight savings time. At least I can actually say that there just weren’t enough hour(s) today and mean it.
Well, I plan to keep the SVN files in the googlecode page up to date as much as possible. So grab em’ learn from them, I plan on explaining my thoughts and why I did thing and how and why they work and now I’m using a lot of ands. Ok, may be it’s time to get a little sleep.
I’ve been working with the Touchlib library of multi-touch apps using Actionscript 3.0 to develop some of my own apps. This driving force behind what I’ve been doing is to get a general idea of how to start thinking about the code, and try to discern what works well and what does not. I began with making a simple interface to select an app to be dynamically loaded into the main flash movie. The buttons and information is built dynamically and after an app is selected a trigger is placed in the bottom right corner the user will need to hold down to being back the menu. I’ve used that menu to build a small collections of apps i have been experimenting with:
Rings, which works by extending RotatableScalable
Grey Lines, which uses TouchEvent.MOUSE_DOWN and TouchEvent.MOUSE_UP to read any blobs which appear on the stage
Squeegee, build an array of circles, then uses any blob information to rescale those circles based on their proximity to the blob, then uses the circles to mask an image which is revealed after you begin touching the screen
Cats Cradle, loops through all the blobs on the screen and draws a line in order of how the array of blobs is constructed. Good for studying how blobs are added an removed from the array
Physics, Flash Physics + Multi-touch — a continued from the previous post
At the end of the video, I just wanted to give my thanks to NUIGroup, everyone there help me tremendously with getting my multi-touch hardware up and running. I hope to offer value by doing these experiments and letting the community use them as needed.
Here are some thoughts I normally have when coming up with experiments like this. How can this be different than just something you can do with just a mouse? It’s one thing to get one touch point working and build an application around that. But how does it change when you can pretend there are 2 mouse cursors you can work with? Then 3? Then 4? What is the best way to optimize the code for these applications? How can I take this and build something useful for a business? Is a gaming environment the best option for thinking of commercialization opportunities?
I feel this technology has opened some interesting windows of opportunity.
And once again, I’d like to offer all my source code for the video above to anyone who’d like to dissect it.
I’ve been wanting to use physics and multi-touch together. But physics calculations + ME = Years and years and years. But, there are already solutions that I can use to create physics based applications in Flash, but there are many to choose from. So I slowly started sifting through all the choices to find one I understood and work with.
It took a little while, but I began to make sense to me, at least the intial tutorial did, and the additional tutorials that I could find online. Emanuele Feronato » italian geek and PROgrammer IS MY FLASH PHYSICS HERO!
I took built an enclosed area around the outside of the projected screen with 4 walls. Then started with just building a regular flash app which the mouse clicks on a circle, you can drag the circle around and the other circles react to it, just using the normal MouseEvent.MOUSE_DOWN. Done, next. Next I changed the MouseEvent to a TouchEvent, changed the rest of the code as needed to work with just 1 touchpoint. That took a little while to hammer out, and got a bit frustrating here and there. Till I acutally understood everything that was going on in the code when it came to Mouse/Item interaction. Touch and empty part of the stage, new circle, touch a circle, it follows the touchpoint. Done Again.
Finally, get it to understand different touchpoints at the same time. A lot to think about in that one. My solution in a nutshell is that any and all touchpoints are collected into an array, along with the corresponding circle (if the touchpoint is indeed touching a circle), then the code to update any touched circles loops through the array of touchpoints and adjusts the circles positions accordingly. I do not pretend to be a master flash coder in any sense, so I do not know if this is the Best solution, BUT it works and it works very very well, even on a non-high end computer. And I am quite happy with the refresh rate of it all.
Video for show, 3 app demos, 1st is the fire app (comes with Touchlib), 2nd ring app (example from NUI Group), 3rd my physics app demo.
I’m currently fascinated by touch screen techonology. And I’m learning and doing all that I can to hopefully growing the technological savvyness of my fair city, Cleveland OH. But it’s all about taking everything one step at a time. With that, I’ve been looking into various open source code bases to run my multi-touch rear projection display. I’ve been favoring TouchLib and tBeta. Within their libraries for implimenting Flash for communications with a TUOI interface I found a gesture recognition example. I loaded it up, but nothing worked for the touch screen, it worked for the mouse however, so the base structure was there.
I started looking through the code and parts of the Touch based functionality was there, it just needed to be wrapped up. So I tinkered around until I got it completely functioning. If you are familiar with the Touchlib SVN download, you can take this file: Gesture Update and update the files in: \AS3\int\app\core\action\gestures
Again, it’s all about the baby steps, now to take this code and figure out how to expand it’s use.