UStream Not Live

cyancdesign: blog

New Function for TUIO.as

Building an array in a new AS file is redundant when the TUIO.as file already contains an array of all the TUIOobjects constantly updated everytime the XML from FLOSC is updated for tBeta or Touchlib. So I planned on figuring out how to access that information directly from TUIO.as

I started with converting some variables to public. It worked well, but after talking with a co-worker/developer, I realized that I should keep that var in the TUIO.as file private. So I needed a new way to gather the information. My first thought was to use some type of set/get to pull the information. After a few attempts, and getting no where. I realized there were already public functions that pass data from the TUIO.as file. So I simply added a new function that returns OBJECT_ARRAY.

public static function returnBlobs():Array{
	return OBJECT_ARRAY;
}

Then, in the new AS file I'm creating, all i have to use it TUIO.returnBlobs() and the returned value is already an array, ready to use, and every time TUIO.returnBlobs() is called, it is already up to date with the proper number to TUIOobjects in the array.

Download example Multi-touch Flash apps at: http://code.google.com/p/multitouchas3experiments/

Tags: , , ,

2 Responses to “New Function for TUIO.as”

  1. [...] the code doing? Well thanks to our trusty TUIO.returnBlobs() function in the TUIO.as file (refer to this post for more information), we do not have to gather all of the blob information in this AS file. TUIO [...]

  2. [...] returnBlobs(); function was added into TUIO.as ~ a personal favorite of mine ~ read more [...]

Leave a Reply