Skip to main content
July 27, 2007
Question

Actionscript 3.0 and FMS2

  • July 27, 2007
  • 1 reply
  • 374 views
Can i use Actionscript 3.0 to connect to RMTP?
Because NetStatusEvent always return netConnection.Connect.Failed when i use :
my_nc.connect("rtmp://127.0.0.1/tutorial_hello")

Which works fine with Actionscript 2.0

ThaNKS.
    This topic has been closed for replies.

    1 reply

    Inspiring
    July 27, 2007
    I am asking the exact same question. Maybe it has to do with the following two points in the documentation:
    Loading and playing an audio or video file is not allowed if the calling SWF file is in a network sandbox and the file to be loaded is local.
    By default, loading and playing an audio or video file is not allowed if the calling SWF is local and tries to load and play a remote file. A user must grant explicit permission to allow this.

    There seems to be preciously little information on the web on using the AS3 NetConnection classes with FMS2.
    Inspiring
    July 27, 2007
    Found the answer here: AS3 to FMS 2.0 101 Just ad the following line before you create the NetConnection instance:
    quote:

    NetConnection.defaultObjectEncoding = ObjectEncoding.AMF0;
    The explanation is also in the help file:
    quote:

    By default, NetConnection.defaultObjectEncoding is set to use the ActionScript 3.0 format, AMF3
    FMS2 still uses the AMF0 format.