actionscript 3 - Is there really no interface class available for YouTube Chromless AS3 player? -
looking @ google's youtube api examples find things this:
// hold api player instance once initialized. var player:object; var loader:loader = new loader(); loader.contentloaderinfo.addeventlistener(event.init, onloaderinit); loader.load(new urlrequest("http://www.youtube.com/apiplayer?version=3")); // , inside according event handler: player = loader.content;
do expect use plain objects relying on dynamic binding, having no syntax highlighting, getting no compiler errors when mistype etc.?! c'mon should have made chromeless player implement simple interface , should have published class type our objects interface. seems didn't.
and that's not end of it...
function onplayerstatechange(event:event):void { // event.data contains event parameter, new player state trace("player state:", object(event).data); }
look @ event examples - casting object data
property without compiler error due dynamic binding? sad code.
so question has written wrapper class fix mess or missing interface(s)?
Comments
Post a Comment