Internet Explorer 6 is not supported.
Upgrade to view this site.

Blog Archive

Results for May, 2009.

Vimeo Player and the Secret API

I am working on a project that is going to have an API that allows the user to insert video. The API is basically an ActionScript class that attaches a property when the user publishes their SWF. When the SWF is loaded into the main SWF program, it has access to the special functions in the SWF file. First, I just used the FLVPlayback and a registry function so the app would have access to it’s functions. That’s fine, but the user has to host an FLV for this to be effective. Not everyone has a server at their disposal, so this is the reason to build on existing video sites. Also, your not shit as a dev guy unless your mashable Web 2.0 savvy.

Fortunately, the popular sites have APIs out there ready and available to get content and media. A developer is expected to know what they have available to them and what will make the job easier for them. Being in the know about Facebook shit is actually a job requirement.

So, first one I thought of was the giant, YouTube. YouTube’s player is AS2 and to use it in an AS3 project you need to wrap it in an AS3 SWF and use LocalConnection to interface with it. There are a few solutions out there but in the end it is a band aid, until YouTube puts together an alternative player API. After fumbling with this, and saving the failing code to my repository for later, I went to Vimeo.

Vimeo has a pretty cool player and the thing that puts it over the top for my app is that it is written in ActionScript 3. But, as with everything, it isn’t perfect. YouTube has a good API page, and some decent forums, and support of the widespread dev community. Vimeo does not. Their API page is nothing short of pathetic, to say the least. They have one example and it doesn’t work. I found a working example on their fourm. At the top of the API page (as of this posting) they have a blurb that says this: You may have noticed that there are some inaccuracies in this documentation. We working on improving it. How about now? In the time it took to put up that asinine message you could of updated the code. That is annoying. Also, there is no public functions to be seen what so ever. Searching on the forums, someone found play, load and unload, which kind of works like stop. I also needed an event at the end of the video. Pretty standard stuff as far as a video API goes. Looks like I am going to have to Sherlock Holmes this shit. Read more …

Before I Knew About Flex Libraries

I wanted to find a way to make my ActionScript library files into a SWC file for easy distribution. There are definitely ways to go about it, but I wanted to find a way that wouldn’t open a Pandora’s box of workarounds, learning curves, and bullshit. So, time for research.

First, I found the rather insane way of going about it by manually writing every single import statement into a document class. In this guy’s defense he is only doing one class and he is making a MXP out of it, so it’s different than what I was looking for.

I’ve heard about ANT tasks, now that I am a Eclipse and Flex user. So, I did some research on this and it seemed closer to what I was looking for. I found one or two places with some stuff to get me started. So I modified this one. After the learning curve blues, I got it to work, minus compiler warnings and a problem with the Vector class not in the Flex 3 SDK. It’s cool that ANT build files are XML so it feels familiar, but it’s a whole world to learn about. Read more …