hey everybody! :)
the first chapter of the oreilly fcs book has a helloVideo app that works.
it's pretty much what i want to do with my app so i'm learning by taking the
code and pasting it into my own AS2 class MVC framework.
only it's not working therein. i've simplified and simplified but still the
server cannot pick up a basic NetStream. the oreilly code that i have cut down
plus my own is at the bottom of this post. it's more or less identical so i
really can't see how it would fail. but it does.
the server side code is identical btw. its the oreilly code
oreilly netstreams = 1. my netstreams = 0;
any ideas?
code follows:
oreilly code:
myID = "";
nc = new NetConnection();
nc.setID = function(id){
ns = new NetStream(nc);
}
connectButton.addEventListener("click", this);
function click(ev) {
nc.connect("rtmp:/helloVideo", userNameInput.text);
}
my code:
class com.packageName.Model implements IModel {
private var _nc :NetConnection;
etc...
private function onLoginSuccess ():Void
{
connect();
}
private function connect ():Void
{
_nc = new NetConnection();
_nc.setID = function(id) {
var ns = new NetStream( this );
}
_nc.connect( "rtmp:/myApp", _user.name );
}
}