AS3 Error 1069
See AS3 onBWDone error Flash Media Server with Amazon CloudFront for reference.
The error:
Error #1069: _netConnection.client = new NetConnectionClient;
package com.skinnygeek.media.video {
import com.skinnygeek.logging.Logger;
/**
* <code>NetConnectionClient</code> added
* to solve Error #1069.
*
* @langversion ActionScript 3.0
* @Flash Player 9.0.28.0
* @author Goliat One
* @url http://www.enjoy-mondays.com
* @version 1.0
*/
public class NetConnectionClient {
private var _logger:Logger = Logger.instance( NetConnectionClient );
/**
* <code>NetConnectionClient</code>
* com.skinnygeek.media.video.NetConnectionClient
*/
public function NetConnectionClient() {}
/**
*
* @param ...rest
* @return
*/
public function onBWCheck(...rest):Number {
return 0;
}
/**
*
* @param ...rest
*/
public function onBWDone(...rest):void {
var p_bw:Number;
if (rest.length > 0){
p_bw = rest[0];
}
_logger.warn("bandwidth = " + p_bw + " Kbps.");
}
}
}
Also, 1069 stands for onMetaData
in flash.net.NetStream
.
package com.skinnygeek.media.video {
import com.skinnygeek.media.video.events.CuePointEvent;
import com.skinnygeek.media.video.events.MetadataEvent;
import com.skinnygeek.media.video.events.VideoPlayerEvent;
import com.skinnygeek.media.video.Metadata;
import flash.events.EventDispatcher;
/**
* <code>NetStreamClient</code>.
*
* @langversion ActionScript 3.0
* @Flash Player 9.0.28.0
* @author Goliat One
* @url http://www.enjoy-mondays.com
* @version 1.0
*/
public class NetStreamClient extends EventDispatcher {
/**
* <code>NetStreamClient</code>
* com.skinnygeek.media.video.NetStreamClient
*/
public function NetStreamClient() {}
/**
*
* @param data
*/
public function onMetaData ( data:Object ):void {
var metadata:Metadata = new Metadata( data );
dispatchEvent( new MetadataEvent( MetadataEvent.ON_METADATA, metadata ) );
}
/**
*
* @param data
*/
public function onCuePoint ( data:Object ):void {
var e:CuePointEvent = new CuePointEvent( VideoPlayerEvent.CUEPOINT, null, data );
dispatchEvent( e );
}
}
}