If google rules teh search, youtube rules teh vidz
Saturday, November 1st, 2008 by Kiz | | personal vendettas | No Comments |
Print This Post
So my new employer has a client that wants to implement the slide player API. “No prob” I say, with confidence since I see that there is an AS3 version….”It’s gotta plug right in if it’s written in AS3…”
Well…two days into it and I’m stumped. I can get the slide video player to load my AS3 chromeless player but cant get the stupid throbber to stop….Read the API you say? Well, its based on the youtube AS2 API and it contains an event listener that was listening for onStateChange. There’s no !@#@! onStateChange in AS3!..and to add insult to injury, Google came up nada!
…so what the !@#$ is that supposed to mean?
Well, I finally read the fine print and figured out I needed to send event calls thru the root object ( in my case, a movieclip which the document class extended) when the video state changed:
switch (ns.state) {
case “unstarted” :
this.dispatchEvent(new Event(“onStateChange”,0));
break;
…and voila! All is well in the world….for now….I have a few more events to dispatch.
Find
Currently
There are no events to show at this time.