Flash As3 Streaming player - onBWDone

I got this error when tring to implement a streaming connection with meta information

Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetConnection was unable to invoke callback onBWDone. error=ReferenceError: Error #1069: Property onBWDone not found on flash.net.NetConnection and there is no default value. at SS4uOpenplayer_fla::MainTimeline/frame2()

I implemented the onBWDone function as

meta.onBWDone=function(meta:Object){

}

meta.onMetaData = function(meta:Object)
{
}

But I get the same error

+3
source share
2 answers

You must attach the client object to the NetConnection instance. The client contains links to the necessary callback functions.

var nc:NetConnection = new NetConnection();

nc.client = { onBWDone: function():void{} };
+9
source

or you can write onBWDone in the same class if you do this

nc.client = this

+1
source

Source: https://habr.com/ru/post/1733527/


All Articles