PDA

View Full Version : Fms 2 And As 3



cosmicloverocks
August 9th, 2007, 01:29 AM
i am trying to lear fms 2 with as3 i am trying to make a simple connection ..

here is the code:


package {
import flash.display.Sprite;
import flash.net.NetConnection;
import flash.events.NetStatusEvent;
import flash.text.TextField;

public class FmsTest extends Sprite
{
public function FmsTest()
{
var nc:NetConnection = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, netHandler);
nc.connect("rtmp:/FMStest");

}
private function netHandler(e:NetStatusEvent):void {
var connect_txt:TextField = new TextField();
stage.addChild(connect_txt);
connect_txt.width=300;
connect_txt.selectable = false;
connect_txt.text = e.info.code;
}
}
}




and it give me this NetConnection.Connect.Failed

what am i doing wrong?