3 Replies Latest reply on Jun 15, 2010 1:30 PM by chris.campbell

    why is compiler complaining about DatagramSocketDataEvent?

    magicmouse Level 1

      I am trying to use the new UDP datagram API's that come in AIR 2.  However when I try to compile sample code from the web, in a very short program, I get a compiler error.  First why is this error occurring, and how come the compiler doesn't show the new AIr 2 API's.  I have flash cs4, is there something I can do to update the syntax coloring part of the editor to recognize Air2 APIs?

       

      import flash.net.NetworkInfo;
          import flash.net.NetworkInterface;
          import flash.net.URLRequest;
          import flash.net.DatagramSocket;
          import flash.net.DatagramSocketDataEvent;

       

         private static function on_DatagramReceived (evt:DatagramSocketDataEvent) : void
         {
          trace(evt)
         }

       

      I get an error on the function definition, it says "DatagramSocketDataEvent" was  not a compile type constant.  I imported DatagramSocketDataEvent as a known class, why am I getting this error?