mardi 21 février 2017

YouTube AS3 API (onReady doesn't work more ?)

YouTube AS3 API . This simple code was writed long time ago . and all was ok . But some days ago some problems. Early (up to 18th this month) all working OK. Flash player using AS3 API.

    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
{

}

is somebody know this issue , or how fix it ? Thx .

Aucun commentaire:

Enregistrer un commentaire