YouTube AS3 API。這個簡單的代碼很久以前就被記錄下來了。一切都很好。 但前些日子有些問題。 早(本月18日)全部正常工作。 使用AS3 API的Flash播放器。YouTube AS3 API(onReady不適用更多?)
public function Main()
{
super();
Security.allowInsecureDomain("*");
Security.allowDomain("*");
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.SHOW_ALL;
this._loader = new Loader();
this._loader.contentLoaderInfo.addEventListener(Event.INIT,this._onLoaderInit);
this._loader.addEventListener(IOErrorEvent.IO_ERROR,this.errorHandlerIOErrorEvent);
this._loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,this.errorHandlerIOErrorEvent);
this._loader.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR,this.onUncaughtError);
this.loadTime = new Date();
this._loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3");
}
private function _onLoaderInit(param1:Event) : void
{
this.player = this._loader.content;
this.player.addEventListener("onReady",this.onPlayerReady);
this.player.x = 0;
this.player.y = 0;
addChild(DisplayObject(this.player));
this._loader.contentLoaderInfo.removeEventListener(Event.INIT,this._onLoaderInit);
this._loader = null;
}
function onPlayerReady(param1:Event) : void // start from 18th this month , onReady dont fired
{
}
是有人知道這個問題,或者如何解決它? Thx。
很久以前這不是貶值嗎? – quantomworks
感謝您的回覆。 –
現在我發現問題了。 –