Monday, June 29th, 2009
Update: keep up to date with my latest code on my Github.
I’ve recently had an article on the YouTube Player API for Actionscript 3 published on the Flashtuts+ network. However, some people are having issues getting to grips with loading another video in-situ, so here’s a slight change to the code:
Once you read the tutorial, you will finish with two important files:
- YouTubePlayerWrapper.swf – The AS2 wrapper
- App.as – The AS3 class files
(more…)
Tags: Actionscript 2, Actionscript 3, api, APIs, as2, as3, code, flashtuts, player, tube, you, youtube
Posted in APIs, Actionscript 2, Actionscript 3, Development |
44 Comments »
Wednesday, June 3rd, 2009
Now it may come as no surprise that even the most well oiled machine has it’s flaws, that being said YouTube isn’t an exception to the rule. Unfortunately sometimes users and videos get lost amongst the mass of videos being uploaded to YouTube.
(more…)
Tags: api, APIs, error, gdata, google, video, you, youtube
Posted in APIs, Development |
No Comments »
Wednesday, May 27th, 2009
I’m in the middle of creating a new YouTube gadget and part of the specification is that it allows the user to see the videos on a time-line. The idea behind it is that companies can then have a simple and sleek gadget that allows them to display their videos, whether they’re viral or community influenced (much like Sprite’s Green Eyed World), in a simple time-line sort of format.
So using the MVC code I created for my other gadgets I was able to easily adapt it, create a new 2D carousel and then was left with the task of creating the visual time-line control and also sorting the videos by their date. Now the YouTube GData API allows you to pass a parameter called “orderby” with the value “published” which returns the entries according to when they were uploaded, the latest first.
(more…)
Tags: Actionscript 3, api, APIs, brand, carousel, feed, gadget, gadgets, gdata, google, playlist, playlists, search, videos, you, youtube
Posted in APIs, Actionscript 3, Development, XML |
No Comments »
Thursday, May 21st, 2009
Following my tutorial how to use PureMVC on Flashtuts+, I got a few comments about an error that Flash Debug Player throws when loading an image from Flickr:
SecurityError: Error #2122: Security sandbox violation: LoaderInfo.content: http://flashtuts.s3.amazonaws.com/ 026_PureMVC/App.swf cannot access http://farm3.static.flickr.com/2472/ 3549227972_7e6bd4d79a_t.jpg. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.
at flash.display::LoaderInfo/get content()
at com.flashtuts.view.component::ImagesView/handleLoaderComplete()
Now there are two ways around this:
- Using a PHP Proxy
This is the sneaky way as you’ll be loading images from Flickr and then putting them on your server. It’s not the best way, but it does have a great  advantage being that because the images are on your server, you won’t have to wait for the Flickr service (as it can get slow) nor will it effect the band width usage on your account.
- Using ‘LoaderContext‘ in AS3
This is the proper way as you’re not putting the images on your server, but there are times when Flickr does get busy and this often causes issues with your Flash file if you haven’t put in the proper ‘try’ and ‘catch’ statements.
(more…)
Tags: Actionscript 3, api, APIs, cache, caching, crossdomain, flickr, loader, loadercontext, policy, proxy, security
Posted in APIs, Actionscript 3, Development, PHP |
1 Comment »
Monday, May 11th, 2009
Recently while working at Google I’ve been asked to built some YouTube products, essentially brand channel gadgets built on the Google Gadgets API. YouTube has two main gadgets that they sell:
- YouTube Full-width Carousel
This is a simple carousel that allows the user to shuffle through some YouTube videos. It can work with both the GData API (so playlists, search and so on) and the YouTube Contest API (it’s a “closed” format at the moment, so information is only available on a “need to know” basis). It’s not the prettiest thing and there are a few things I don’t really like about it. But it works and that’s the main thing. You can see an example on the YouTube Live Channel.
- YouTube Full-width and Normal-width Contest
YouTube contests are a great way to engage the YouTube and web community. They provide a simple interface and API that allows you to register votes and views for certain videos. Good examples of this are the Davos Debates, Sprite’s Green Eyed World (although the developers missed a tricked and used Facebook comments rather than YouTube’s). You’ll notice that both the contest examples have custom gadgets rather than YouTube’s product. A good use of YouTube’s contest gadget would be the recent Barclaycard Create compeition. It’s a nice format, but again, the aesthetics of the template let it down and a lot can be done to improve and make it look and work much better.
(more…)
Tags: actionscript, Actionscript 2, Actionscript 3, api, APIs, carousel, contest, Flash, gadgets, gdata, google, papervision, pv3d, youtube
Posted in APIs, Actionscript 3, Design, Development, Flash |
No Comments »