5 of 6
5
New Tuio as3 library (TCP & LocalConnection)
Posted: 25 March 2011 08:35 PM   [ Ignore ]   [ # 61 ]
Rank
Joined  2009-09-16
Total Posts:  11
New Member

thanks gimmix, it works! :D

Profile
 
 
Posted: 24 June 2011 03:04 AM   [ Ignore ]   [ # 62 ]
Rank
Joined  2010-04-05
Total Posts:  16
New Member
gunni - 13 June 2010 07:27 AM

Hi Gimmix.
THX for your fast reply and your test project.
When i try this i get again serveral error:
...\src\Main.as(107): col: 32 Error: Type was not found or was not a compile-time constant: TuioEvent.

What the hell i my misstake?
i think i have problems with my librarys ?!
i try to install it again.

Hey guys i’m having the same problem as gunni.

Although moving libraries around hasn’t fixed my issue.  I will try and explain my set up as best as i can.

I installed the latest version of both FlashDevelop and Flex to E:\Program Files(86)\FlashDevelop\

I downloaded the latest library (0.71) and put it in the flash develop folder like Gunni said back on page 2, so it’s path is E:\Program Files (x86)\FlashDevelop\org\
I downloaded the gestures demo that gimmix posted and put it here -> E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo

I opened the project and the projects class path is;
src
..\..\org

My Global Classpaths is set to
E:\Program Files (x86)\FlashDevelop\org

When i hit ‘Debug’ i get the following output.

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\Main.as(107): col32 ErrorType was not found or was not a compile-time constantTuioEvent.
public function 
addHandler(e:TuioEvent):void {
^
E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\Main.as(113): col35 ErrorType was not found or was not a compile-time constantTuioEvent.
public function 
updateHandler(e:TuioEvent):void {
^
E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\Main.as(120): col35 ErrorType was not found or was not a compile-time constantTuioEvent.
public function 
removeHandler(e:TuioEvent):void {
^
E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\Main.as(130): col32 ErrorType was not found or was not a compile-time constantTouchEvent.
public function 
tapHandler(e:TouchEvent):void {
^
E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\Main.as(137): col38 ErrorType was not found or was not a compile-time constantTouchEvent.
public function 
circleTapHandler(e:TouchEvent):void {
^
Build halted with errors (fcsh).
(
fcsh)
Done(1)

I can see the library in the project tree, it’s just as if FD can’t see them at all when it tries to compile. Can someone please point me in the right direction?

Profile
 
 
Posted: 24 June 2011 12:41 PM   [ Ignore ]   [ # 63 ]
Avatar
Rank
Joined  2009-10-18
Total Posts:  41
New Member

mh, maybe try removing the /org from your classpath.

Profile
 
 
Posted: 24 June 2011 08:01 PM   [ Ignore ]   [ # 64 ]
Rank
Joined  2010-04-05
Total Posts:  16
New Member

I removed \org from my global classpaths, got the same errors. Put it back in Global and removed it from project classpaths, exact same error.

I take it that it should be working with my set up?

Profile
 
 
Posted: 25 June 2011 05:44 AM   [ Ignore ]   [ # 65 ]
Avatar
Rank
Joined  2009-10-18
Total Posts:  41
New Member

Yes it should, it’s also very strange that you get these errors only for the TuioEvent class, although the TuioManager and TuioClient are in exactly the same folder :/
Maybe you could send me your Main.as or the whole project and I’ll have a look.

Profile
 
 
Posted: 25 June 2011 09:35 PM   [ Ignore ]   [ # 66 ]
Rank
Joined  2010-04-05
Total Posts:  16
New Member

Thank gimmix i appreciate the help.
Attached is my project folder which i have under the FlashDevelop\Projects folder.

I also think it is weird that it not only has a problem specifically with thos two classes, but in the imports at the top of my main.as, the compiler seems to recognise TuioEvent and TouchEvent as valid classes.

afgX4.png

File Attachments
gesturesdemo.zip  (File Size: 55KB - Downloads: 30)
Profile
 
 
Posted: 26 June 2011 04:42 AM   [ Ignore ]   [ # 67 ]
Rank
Joined  2010-04-05
Total Posts:  16
New Member

Update: So i was incredibly annoyed that FlashDevelop could see the TUIO library perfectly fine in the editor, just not when it was being compiled. I ended up getting the gesturesdemo torun by moving the /org into the /src directory.

Could this possibly be a Windows 7 permissions issue or something?

So i can now run it from within FD, but if i try to perform a ctrl-F8 Build, i get the following ~30 errors.

Loading configuration file E:\Program Files (x86)\FlashDevelop\Tools\flexsdk\frameworks\flex-config.xml
E
:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\Main.as(76): col72 ErrorType was not found or was not a compile-time constantTransformGestureEvent.

            
bar.addEventListener(TransformGestureEvent.GESTURE_ZOOM, function(e:TransformGestureEvent):void {
                                                                                
^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\Main.as(81): col74 ErrorType was not found or was not a compile-time constantTransformGestureEvent.

            
bar.addEventListener(TransformGestureEvent.GESTURE_ROTATE, function(e:TransformGestureEvent):void {
                                                                                  
^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\connectors\udp\OSCDatagramSocket.as(12): col41 ErrorThe definition of base class DatagramSocket was not found.

    public class 
OSCDatagramSocket extends DatagramSocket
                                           
^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(172): col43 ErrorCall to a possibly undefined method TouchEvent.

                
target.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_BEGINtruefalsetuioContainer.sessionIDfalselocal.xlocal.y000target as InteractiveObject));
                                                      ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(172): col67 ErrorAccess of undefined property TouchEvent in package flash.events.

                
target.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_BEGINtruefalsetuioContainer.sessionIDfalselocal.xlocal.y000target as InteractiveObject));
                                                                              ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(193): col44 ErrorCall to a possibly undefined method TouchEvent.

                    
target.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_MOVEtruefalsetuioContainer.sessionIDfalselocal.xlocal.y000target as InteractiveObject));
                                                          ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(193): col68 ErrorAccess of undefined property TouchEvent in package flash.events.

                    
target.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_MOVEtruefalsetuioContainer.sessionIDfalselocal.xlocal.y000target as InteractiveObject));
                                                                                  ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(219): col44 ErrorCall to a possibly undefined method TouchEvent.

                    
target.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_OVERtruefalsetuioContainer.sessionIDfalselocal.xlocal.y000target as InteractiveObject));
                                                          ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(219): col68 ErrorAccess of undefined property TouchEvent in package flash.events.

                    
target.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_OVERtruefalsetuioContainer.sessionIDfalselocal.xlocal.y000target as InteractiveObject));
                                                                                  ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(220): col44 ErrorCall to a possibly undefined method TouchEvent.

                    
target.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_ROLL_OVERfalsefalsetuioContainer.sessionIDfalselocal.xlocal.y000target as InteractiveObject));
                                                          ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(220): col68 ErrorAccess of undefined property TouchEvent in package flash.events.

                    
target.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_ROLL_OVERfalsefalsetuioContainer.sessionIDfalselocal.xlocal.y000target as InteractiveObject));
                                                                                  ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(229): col43 ErrorCall to a possibly undefined method TouchEvent.

                        
last.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_OUTtruefalsetuioContainer.sessionIDfalselocal.xlocal.y000last as InteractiveObject));
                                                            ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(229): col67 ErrorAccess of undefined property TouchEvent in package flash.events.

                        
last.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_OUTtruefalsetuioContainer.sessionIDfalselocal.xlocal.y000last as InteractiveObject));
                                                                                    ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(230): col43 ErrorCall to a possibly undefined method TouchEvent.

                        
last.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_ROLL_OUTfalsefalsetuioContainer.sessionIDfalselocal.xlocal.y000last as InteractiveObject));
                                                            ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(230): col67 ErrorAccess of undefined property TouchEvent in package flash.events.

                        
last.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_ROLL_OUTfalsefalsetuioContainer.sessionIDfalselocal.xlocal.y000last as InteractiveObject));
                                                                                    ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(245): col42 ErrorCall to a possibly undefined method TouchEvent.

                                
a.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_ROLL_OUTfalsefalsetuioContainer.sessionIDfalselastAncestorLocal.xlastAncestorLocal.y000a));
                                                                 ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(245): col66 ErrorAccess of undefined property TouchEvent in package flash.events.

                                
a.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_ROLL_OUTfalsefalsetuioContainer.sessionIDfalselastAncestorLocal.xlastAncestorLocal.y000a));
                                                                                         ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(269): col41 ErrorCall to a possibly undefined method TouchEvent.

                            
b.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_ROLL_OVERfalsefalsetuioContainer.sessionIDfalseancestorLocal.xancestorLocal.y000b));
                                                             ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(269): col65 ErrorAccess of undefined property TouchEvent in package flash.events.

                            
b.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_ROLL_OVERfalsefalsetuioContainer.sessionIDfalseancestorLocal.xancestorLocal.y000b));
                                                                                     ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(344): col43 ErrorCall to a possibly undefined method TouchEvent.

                
target.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_ENDtruefalsetuioContainer.sessionIDfalselocal.xlocal.y000target as InteractiveObject));
                                                      ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(344): col67 ErrorAccess of undefined property TouchEvent in package flash.events.

                
target.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_ENDtruefalsetuioContainer.sessionIDfalselocal.xlocal.y000target as InteractiveObject));
                                                                              ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(387): col45 ErrorCall to a possibly undefined method TouchEvent.

                        
target.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_TAPtruefalsetuioContainer.sessionIDfalselocal.xlocal.y000target as InteractiveObject));
                                                              ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\TuioManager.as(387): col69 ErrorAccess of undefined property TouchEvent in package flash.events.

                        
target.dispatchEvent(new flash.events.TouchEvent(flash.events.TouchEvent.TOUCH_TAPtruefalsetuioContainer.sessionIDfalselocal.xlocal.y000target as InteractiveObject));
                                                                                      ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\gestures\RotateGesture.as(33): col41 ErrorCall to a possibly undefined method TransformGestureEvent.

            
gsg.getTarget("A").dispatchEvent(new TransformGestureEvent(TransformGestureEvent.GESTURE_ROTATEtruefalsenull0000rotation)); ;
                                                 ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\gestures\RotateGesture.as(33): col63 ErrorAccess of undefined property TransformGestureEvent.

            
gsg.getTarget("A").dispatchEvent(new TransformGestureEvent(TransformGestureEvent.GESTURE_ROTATEtruefalsenull0000rotation)); ;
                                                                       ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\gestures\RotateGesture.as(4): col21 ErrorDefinition flash.events:TransformGestureEvent could not be found.

    
import flash.events.TransformGestureEvent;
                       ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\gestures\ZoomGesture.as(30): col42 ErrorCall to a possibly undefined method TransformGestureEvent.

                
gsg.getTarget("A").dispatchEvent(new TransformGestureEvent(TransformGestureEvent.GESTURE_ZOOMtruefalsenull00scalescale));
                                                     ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\gestures\ZoomGesture.as(30): col64 ErrorAccess of undefined property TransformGestureEvent.

                
gsg.getTarget("A").dispatchEvent(new TransformGestureEvent(TransformGestureEvent.GESTURE_ZOOMtruefalsenull00scalescale));
                                                                           ^

E:\Program Files (x86)\FlashDevelop\Projects\gesturesdemo\src\org\tuio\gestures\ZoomGesture.as(4): col21 ErrorDefinition flash.events:TransformGestureEvent could not be found.

    
import flash.events.TransformGestureEvent;
                       ^

Done(29)

Profile
 
 
Posted: 26 June 2011 09:09 AM   [ Ignore ]   [ # 68 ]
Avatar
Rank
Joined  2009-10-18
Total Posts:  41
New Member

mh this looks more like the wrong flash or air version to me, since all the errors are thrown for classes only available since flash 10.1 / air 2.0

I checked out you project and adding the path to my library with the /org in it gave me exactly you error. But removing the org/ worked for me and compiled without any errors. This is also understandable since the package org.tuio.* implies the folder structure /org/tuio/… but if you point the classpath to org/ the compiler will only see tuio/ and thinks the class doesn’t exist.  Although it is quite strange that the syntax checker seems to be able to find the classes.

Profile
 
 
Posted: 01 January 2012 05:30 AM   [ Ignore ]   [ # 69 ]
Avatar
RankRankRankRank
Joined  2008-02-12
Total Posts:  1102
Member

Hi Gimmix I’m trying to compile Getting started using the new 0.8 library
but i keep getting

C:\Users\Taha Bintahir\Code\AS3\as3TuioTest\src\Main.as(45): col35 ErrorType was not found or was not a compile-time constantTuioTouchEvent.

any ideas?

 Signature 

Company Website - Knode Research and Development
My Youtube

Profile
 
 
Posted: 03 January 2012 10:18 AM   [ Ignore ]   [ # 70 ]
Avatar
Rank
Joined  2011-11-18
Total Posts:  13
Moderator

Make 100% sure that all class paths are correct and check RSL settings if You use it .

 Signature 

as3 / flash platform developer

always ready for new projects and cooperation !

turbosqel.pl

Profile
 
 
Posted: 03 January 2012 11:54 AM   [ Ignore ]   [ # 71 ]
Avatar
RankRankRankRank
Joined  2008-02-12
Total Posts:  1102
Member

I managed to fix the issue had to move the location of the library to the internal location for Flash Develop Libraries the org. in the package is causing the problem.
Also atm i’m having problems with the Legacy Connector, i’ve downloaded the legacy touchlib framework thats been ported over for the new as3-tuio library i’m running a simple test pretty much the rotateablescaleable example from the wiki but it doesnt seem to be working.

 Signature 

Company Website - Knode Research and Development
My Youtube

Profile
 
 
Posted: 05 January 2012 01:59 PM   [ Ignore ]   [ # 72 ]
Avatar
Rank
Joined  2009-10-18
Total Posts:  41
New Member

Glad you could fix the import problem.
On your new problem: do you receive any tracking data? i.e. Are there debug circles in the flash window if there are touches registered by the tracker? If not make sure that the Connector has the right IP and port settings for your tracking setup. Which Tracker in what mode are you using?

Profile
 
 
Posted: 05 January 2012 05:45 PM   [ Ignore ]   [ # 73 ]
Avatar
RankRankRankRank
Joined  2008-02-12
Total Posts:  1102
Member

Yes if i add TuioDebug.init() i see the touches in Flash the only thing that they aren’t working with the Legacy Touch Events. the event listeners aren’t getting triggered

 Signature 

Company Website - Knode Research and Development
My Youtube

Profile
 
 
Posted: 09 May 2012 11:26 PM   [ Ignore ]   [ # 74 ]
Rank
Joined  2011-12-11
Total Posts:  37
New Member

Are there extra steps missing from the guides on the tuio as3 guide pages? Every step I try I get error messages, even the very first one, which sort of works at first and then soon I get a bunch of error messages while using it. I’d say I’m intermediate at as3, running flash cs5, and I have not gotten anything to work without errors and I’m essentially cutting and pasted the code into flash to test it out. I went through the whole ordeal of figuring out how to get the latest flex sdk working with flash, and then attempted to get the latest air publishing work, which I have yet to achieve, then found through reading comments on the site all of the import lines I need to make it publish. Finally after getting it published in air 2.0, it gives me this error over and over:

TypeError: Error #1034: Type Coercion failed: cannot convert org.tuio::TuioTouchEvent@4e96f61 to flash.events.TouchEvent.
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at org.tuio::TuioManager/handleAdd()[\rtest\org\tuio\TuioManager.as:204]
at org.tuio::TuioManager/addTuioCursor()[\rtest\org\tuio\TuioManager.as:728]
at org.tuio.adapters::AbstractTuioAdapter/dispatchAddCursor()[\rtest\org\tuio\adapters\AbstractTuioAdapter.as:225]
at org.tuio::TuioClient/acceptOSCMessage()[\rtest\org\tuio\TuioClient.as:247]
at org.tuio.osc::OSCManager/distributeOSCMessage()[\rtest\org\tuio\osc\OSCManager.as:135]
at org.tuio.osc::OSCManager/distributeOSCPacket()[\rtest\org\tuio\osc\OSCManager.as:119]
at org.tuio.osc::OSCManager/distributeOSCPacket()[\rtest\org\tuio\osc\OSCManager.as:123]
at org.tuio.osc::OSCManager/acceptOSCPacket()[\rtest\org\tuio\osc\OSCManager.as:106]
at org.tuio.connectors::UDPConnector/receiveOscData()[\rtest\org\tuio\connectors\UDPConnector.as:76]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at org.tuio.connectors.udp::OSCDatagramSocket/dataReceived()[\rtest\org\tuio\connectors\udp\OSCDatagramSocket.as:39]

Is the code not in a working state, or the guides out of date, or am I just too stupid for this kind of thing? I’m mainly a web designer that does some actionscripting so I don’t consider myself a programmer, but I thought I might be able to figure this stuff out. Just attempting to publish the second guide gives me nothing but undefined errors as well… sadface.. :(

Do others use this lib successfully?

Profile
 
 
Posted: 10 May 2012 01:24 AM   [ Ignore ]   [ # 75 ]
Avatar
Rank
Joined  2011-11-18
Total Posts:  13
Moderator

Its a wrong match o flash.events.TouchEvent as org.tuio::TuioTouchEvent , and looks like internal missmatch :] make sure that all classpaths are correct .

You can also try this lib : https://github.com/turbosqel/AS3TouchLib if You need to recive TUIO msg.

 Signature 

as3 / flash platform developer

always ready for new projects and cooperation !

turbosqel.pl

Profile
 
 
   
5 of 6
5