Posts Tagged ‘Touchlib’

Coding Edits Coming

January 7th, 2010

Looks like it is about time I back track a little and do some post editing. There are a few things that have changed through time that I should re-account for.

  1. returnBlobs() now exists in the Touchlib TUIO library
  2. using ‘localhost’ may not be the best to connect TUIO, with Win 7 out people have been running into Flash connection problems and ‘’ connects much better.
    • In Posts
    • In Files
      • Google Code Subversion repository
      • Google Code Zip Files
      • based Zip Files

Soon they edits will be made and I’ll let you know when the changes are up.

Touchlib’s AS3 TUIO library updated

May 31st, 2009

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.

  • Addition of DX/DY event sending. Important for getting multi-touch FluidSolver to work
  • returnBlobs(); function was added into ~ 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 »

Touch Explosions

April 11th, 2009

Particle Emitter from Touch Down Events

Read the rest of this entry » to

April 7th, 2009

colorlinesTonight, 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 »

Introduction: Flash Google Maps API and Multi-touch

March 21st, 2009

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 »

multitouchas3experiments aka. Multi-touch Flash Actionscript 3.0 Experiments

March 8th, 2009

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.

(-_-) ZZZ zzz …

Multi-touch Flash Experiments

February 22nd, 2009

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:

  1. Rings, which works by extending RotatableScalable
  2. Grey Lines, which uses TouchEvent.MOUSE_DOWN and TouchEvent.MOUSE_UP to read any blobs which appear on the stage
  3. 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
  4. 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
  5. 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.

Multi-touch Flash Experiments from Chris Yanc on Vimeo.

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.

Multi-touch Flash Experiments – Feb 22,2009

Touchlib + Box2D

February 14th, 2009

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.

Multi-touch Flash Apps from Chris Yanc on Vimeo.

Quality Note: The compliant surface has temporarily buckled because of the temperate/humidity shift in the weather. I’ll be reworking how I lay out the compliant surface next.

I’ve zipped the files I used, I’ve edited some of the Touchlib AS files so these files probably won’t work if you use the real downloaded version of the Touchlib AS files.

Download Touchlib+Physics

Enjoy (^_^)//

Touchlib – Gesture Update

January 17th, 2009

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.


Gesture Update Download