2 Replies Latest reply on May 7, 2010 9:39 AM by lite_As_AIR

    Flash CS5 + Adobe AIR2 class error

    exerter

      As you all know, Flash CS5 is now released. It is confusing me as AIR2.0 is still in beta. so is the air2 in flash cs5 stable or not?

       

      I tried to use DatagramSocket class in Flsh CS5 but failed

       

      import flash.net.DatagramSocket

       

      Up to this point, everythings ok

       

       

       

       

      var ds:DatagramSocket = new Datagramsocket()    

       

      FAILED.VerifyError: Error #1014: Class flash.net::DatagramSocket could not be found.

       

          at runtime::ContentPlayer/loadInitialContent()
          at runtime::ContentPlayer/playRawContent()
          at runtime::ContentPlayer/playContent()
          at runtime::AppRunner/run()
          at global/runtime::ADLEntry()

       

      I tried replacing the air2 beta 1,air2 beta 2 as stated in the release note but it still fialed..

       

      Any idea anyone?

        • 1. Re: Flash CS5 + Adobe AIR2 class error
          donkermedia

          Hey mate you're not alone - I bought Flash CS5 and having been using it for a couple of days now, When I made a new AIR app, I can't install it because it says (in the installer window):

           

          "This application requires an update to Adobe AIR that is not available for your system.

          Please view the system requirements for Adobe AIR and update your system accordingly."

           

          Yet when I click on the system requirements link it would appear my PC has everything needed to install the app. I have since updated AIR to AIR2 beta 2. No change.

           

          Pardon the french but what the hell? Flash CS5 only creates AIR2 apps, no option for AIR1 exports, and AIR2 isn't even properly released yet... ADOBE FAIL!!!

          • 2. Re: Flash CS5 + Adobe AIR2 class error
            lite_As_AIR

            (File -> New -> Adobe Air 2.0).. DatagramSocket Class works for me even shows the intellisense in AS3.0 editor inside of (Adobe Flash CS 5)

             

            import flash.net.DatagramSocket;
            import flash.utils.ByteArray;
            import flash.events.DatagramSocketDataEvent;
            
            
            //-------Server-------//
            var server:DatagramSocket = new DatagramSocket();
            server.addEventListener(DatagramSocketDataEvent.DATA,onDataRecieve)
            server.bind(120,"127.0.0.1");
            server.receive();
            
            function onDataRecieve(e:DatagramSocketDataEvent){
                trace(e.data.readUTFBytes(e.data.bytesAvailable));
            }
            
            //-------Client----------//
            var byteArray:ByteArray = new ByteArray();
            byteArray.writeUTFBytes("hello flash cs 5");
            var socket:DatagramSocket = new DatagramSocket();
            socket.send(byteArray,0,byteArray.length,"127.0.0.1",120);

             

            cheers!