Flex 2's NetConnection object is not dynamic. You need to use the
"client" property with an object that has the proper methods attached
or extend NetConnection to have the specific method.
You can see this in the FMSConnection class that I created for the
Basic Red5 Chat example I created.
http://renaun.com/blog/2006/10/13/113/
Also in the article I wrote for WDDJ called, Video Conference with Flex
& FMS, it examples a little about Flex 2 and the two changes (AMF0
and the non dynamic NetConnection/NetStream classes)
http://mxdj.sys-con.com/read/295379.htm
Renaun
John Kirby wrote:
Yes...
Here is what I get for the connection:
Not sure what the async error is about?
about to connect to: rtmp://infinitymedialabs.com:873/oflaDemo
asyncErrorHandler:code: ReferenceError: Error #1069: Property onBWDone
not found on flash.net.NetConnection and there is no default value.
Connection:netStatusHandler:Success: connected:
Here's my connection logic.
public function connectVideoSession():void{
NetConnection.defaultObjectEncoding =
ObjectEncoding.AMF0;
SharedObject.defaultObjectEncoding =
ObjectEncoding.AMF0;
nc = new NetConnection();
nc.addEventListener( "success",
connectionSuccessHandler );
nc.addEventListener( AsyncErrorEvent.ASYNC_ERROR,
asyncErrorHandler );
nc .addEventListener( IOErrorEvent.IO_ERROR,
ioErrorHandler );
nc.addEventListener(NetStatusEvent.NET_STATUS,
connectionStatusHandler);
trace("about to connect to: " + connectionUrl);
nc.connect( connectionUrl);
}
In the connectionStatusHandler() I call fetchVideos() (below) but
don't get anything back?
Dan Rossi said the following:
Interesting, thats awesome.
im assuming you did this for the netconnect aswell ?
SharedObject.defaultObjectEncoding =
ObjectEncoding.AMF0;
I posted ages ago a helper class for netconnect which may be helpful
dont know.
John Kirby wrote:
I am almost done with a Flex 2 version of oflademo. I looked at the
flash version (AS2) and I'm stuck on how to invoke the demoService
getListOfAvailableFLVs to return the array?
This is what I'm trying with not result?
private function fetchVideos():void{
//res = new Responder(listResponder);
aResult = new Array();
trace("Making call");
SharedObject.defaultObjectEncoding =
ObjectEncoding.AMF0;
/*
trace ("URI: " + nc.uri);
soVideoList = SharedObject.getRemote(
"demoService.getListOfAvailableFLVs", nc.uri);
soVideoList.addEventListener( NetStatusEvent.NET_STATUS,
netStatusHandler );
soVideoList.addEventListener( AsyncErrorEvent.ASYNC_ERROR,
asyncErrorHandler );
soVideoList.addEventListener( SyncEvent.SYNC,
sharedObjectSyncHandler );
soVideoList.client = this;
soVideoList.connect( nc );
soVideoList.send(aResult);
*/
nc.call("demoService.getListOfAvailableFLVs", null,
aResult);
trace ("RESPONSE2: " + aResult.length);
}
As soon as this works I'll post. I 'm adding a proxy server
configuration as well as a "auto sizing" video display to show wide HD
format (does it automatically).
Thanks.
.j
--
quote
Whether you think that you can, or that
you
can't, you are usually right.
- Henry Ford
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org
--
quote
Whether you think that you can, or that you
can't, you are usually right.
- Henry Ford
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org
|
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org