Skip to main content
August 20, 2008
Question

swf authentication

  • August 20, 2008
  • 1 reply
  • 981 views
i use the following flash 8 file:

var nc:NetConnection=new NetConnection();
nc.onStatus=function(cStatus){
if(cStatus.code=="NetConnection.Connect.Success"){
infobox.text="success";
}else{
infobox.text="failure";
}
}
nc.connect("rtmp://myIP/auth");

where auth is a folder inside my applications folder.
The Application.xml file (inside the auth folder) has this tag:
<SWFVerification enabled="false">
i test the movie and "success" shows up in the textfield.

i copy the swf file to a "SWFs" folder inside the auth folder, change the Application.xml file so that
<SWFVerification enabled="true">, and restart the server (FMS3).
when i test the movie "failure" appears in the textfield.

What am i doing wrong?



    This topic has been closed for replies.

    1 reply

    August 25, 2008
    On Securing Flash Media Server by Will Law and Stefan Richter, i read that (pg 18): "swf authentication is only supported by Flash player 9.0.60.184 or higher". Using the CS3 actionscript:

    var nc:NetConnection=new NetConnection();
    nc.addEventListener(NetStatusEvent.NET_STATUS,netConnectionSuccess);
    function netConnectionSuccess(e:NetStatusEvent):void{
    if(e.info.code=="NetConnection.Connect.Success"){
    infobox.text="success";
    }else{
    infobox.text="failure";
    }
    }
    nc.connect("rtmp://myIP/auth");

    i got what i was looking for.