[Flash] Assign movieclips to fiducials
Posted: 16 October 2007 06:07 AM   [ Ignore ]
New Member
Rank
Total Posts:  3
Joined  2007-10-16

Hello, I’m new with reactivision and I know a little bit about actionscript.

I want to assign different movieclips to different fiducials, but I don’t know where to begin.

Can someone please give me an example of the TUIO flash client where 2 different movieclips are assigned?

That should help me starting.

Thanks in advance.

Profile
 
 
Posted: 16 October 2007 07:12 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  537
Joined  2006-11-09

Might be Helpful: http://nuigroup.com/forums/viewthread/281/

 Signature 

~

Profile
 
 
Posted: 16 October 2007 09:30 AM   [ Ignore ]   [ # 2 ]
New Member
Rank
Total Posts:  40
Joined  2007-08-31

try to check the code from svn at http://code.google.com/p/tuio-as3-lib and look at TUIOTest demo. To get different objects added to stage depending on the fiducial id just modify the addTuioObj method to check for the id before crating the object,

switch(event.data.i)
{
case 1:
var a:Item1 = new Item1();
items[event.data.s]=a;
addChild(a);
break;

case 2:
var a:Item2 = new Item2();
items[event.data.s]=a;
addChild(a);
break;
.
.
.

}

obviously need to create your custom Item1 and Item2 classes wink

PD: you will also need FLOSC and the OSCConnection classes used by the tuio-as3-lib you’ll find at http://code.google.com/p/flosc

Profile
 
 
Posted: 29 October 2007 06:26 AM   [ Ignore ]   [ # 3 ]
New Member
Rank
Total Posts:  3
Joined  2007-10-16

thanx, but I didn’t understand your explanation.
I’m a total newbie with reactivision. After some puzzling with te code I managed to get to an solution myself.
But thank you for the fast replies. smile

Profile