flash on 2012-4-14
♥0 |
Line 19 |
Modified 2012-04-14 20:36:48 |
MIT License
archived:2017-03-20 20:11:53
ActionScript3 source code
/**
* Copyright poepoemix ( http://wonderfl.net/user/poepoemix )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/dy0p
*/
package {
import flash.events.NetStatusEvent;
import flash.net.NetConnection;
import flash.display.Sprite;
public class FlashTest extends Sprite {
private var nc:NetConnection;
public function FlashTest() {
// write as3 code here..
nc = new NetConnection;
nc.addEventListener(NetStatusEvent.NET_STATUS, function(event:NetStatusEvent):void{
trace(event.info.code);
switch(event.info.code) {
case "NetConnection.Connect.Success":
nc.call("Send", null, ["test"]);
}
});
nc.connect("rtmp://localhost/test/aet");
}
}
}