3 Replies Latest reply on Dec 1, 2011 5:24 PM by Flex harUI

    mxmlc 3.6 Socket.timeout undefined property




      I decided to dive into and get dirty with Flex and ActionScript. Downloaded flex_sdk_3.6.0.16995A.zip from Adobe site, extracted it, added to my path and started coding away.


      I am trying to compile an ActionScript class with mxmlc in Linux (Ubuntu 10.04).


      In my class I use a socket, and I try to set the timeout property, however it gives me a compile error.



      Here is the class that's giving me the problem (I have left only the relevant code for clarity):


        import flash.net.*
        import flash.events.*
         public class Socks4Sock
              private var sock: Socket;
              public function Socks4Sock(host:String, port:int):void
                sock = new Socket();
                sock.timeout = 5000;


      I get the following error during compilation:


      mxmlc Socks4Sock.as 
      Loading configuration file /opt/flexsdk/frameworks/flex-config.xml
      /var/www/example/Socks4Sock.as(14): col: 16 Error: Access of possibly undefined property timeout through a reference with static type flash.net:Socket.
                sock.timeout = 5000;


      I am not sure what I am doing wrong. It seems according to the documentation, that timeout property is supported in AS3.


      http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/Socket.html#t imeout


      This is the mxmlc version I am using:


      mxmlc -version

      Version 3.6.0 build 16995



      Any help would be greatly appreciated!