0 Replies Latest reply on Jul 9, 2010 4:10 AM by fermo111

    DatagramSocket: Type was not found

    fermo111 Level 1

      I have downloaded and installed the latest SDK: flex_sdk_4.1.zip

       

      $ mxmlc --version

      Version 4.1.0 build 16076

       

      When I try to compile a program that uses the DatagramSocket class, I get the following error:

       

      Error: Type was not found or was not a compile-time constant: DatagramSocket

       

      For instance, given the following file 'test.mxml':

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
          <mx:Script>
              <![CDATA[
                  import flash.net.DatagramSocket;
                  public var datagramSocket:DatagramSocket;
              ]]>
          </mx:Script>
      </mx:Application>

       

      $ mxmlc test.mxml

      Loading configuration file /home/user/flex_sdk/frameworks/flex-config.xml
      /home/user/test.mxml(6):  Error: Type was not found or was not a compile-time constant: DatagramSocket.

       

                  public var datagramSocket:DatagramSocket;