1 Reply Latest reply on Mar 17, 2008 7:06 AM by SujitG

    Access of undefined property

    TrAvIkK
      Hi ;)

      I'm getting this error, tho i have defined a variable!
      Look: (mxscript)

      import org.bytearray.remoting.*;
      import org.bytearray.remoting.events.*;

      var service:Service = new Service( "sample", "rtmp://localhost/app" );
      var rpc:PendingCall = service.getInt( );
      rpc.addEventListener( ResultEvent.RESULT, user.login );

      I got error of undefined variable at the last line.
      I don''t know what it is about, can you help me?

      (when I try it on Flash, it works fine!)
        • 1. Access of undefined property
          SujitG Level 2
          Hi,

          Is the code inside a function? i.e line 4 and 5. If it is inside a function, please ignore otherwise please move those lines of code inside a function, all the execution statements should be inside a function. If they are already inside a function, PLEASE ignore.

          import org.bytearray.remoting.*;
          import org.bytearray.remoting.events.*;

          var service:Service = new Service( "sample", "rtmp://localhost/app" );
          private function someFunction():void
          {
          var rpc:PendingCall = service.getInt( );
          rpc.addEventListener( ResultEvent.RESULT, user.login );
          }

          Hope this helps.