TUTORIAL – Creating AS3 Components using fl.core.UIComponent

Hi Everyone,

Just a short link, for those who want to create components that will appear in the Components panel and respect styling rules as per the Flash CS3 / CS4 component architecture. Here is how to create them!! This text is LENGTHY and should help people of all levels.

http://www.adobe.com/devnet/flash/articles/creating_as3_components.html

Cheers!

Martin

Custom Filters in AS3

Hi Everyone,

Well, this is a short post; I know I have been busy lately (have been teaching AS3 quite a bit, which is fun, at Loto Québec and Canoe.ca) + work on the regular contracts. Anyhow, this to say that I have a lot of material I wish to write about, and hopefully next month I will get time to breathe and write again.

In the meantime, today I wanted to create a custom filter in AS3; namely a StrokeFilter. To my great disappointment the filter functionality on DisplayObjects is not extensible, so no way to create custom filter classes..
Continue reading

Tutorial – Google Analytics (Event) Tracking for Flash / Flex

Hi Everyone,

as of sometime in November, Google has released a AS3 module that enables communication directly with Google Analytics, w/o the constraints of passing through Javascript. This combined with the imminent public deployment of Event Tracking, makes for a very exciting combination indeed!

This post is a follow-up to a previous post: Using Google Analytics to track activity inside of a Flash or Flex AS3 application, I suggest reading it as it will give you in-depth details on how google analytics works.

There are a few situations where you would like to use the AS3 module instead of the Javascript API to track activity in your flash application. For example:

  • Your app is distributed using Gigya, ClearSpring, WidgetAvenue or other distribution platform.
  • Your app is hosted on a different host than the html page it is contained in (which would cause cross-scripting nightmares)
  • Your app is an AIR app, hence no HTML around it
  • You are a developer and don’t want to have to embed your app inside of HTML to know if event tracking works! (my favorite!)

Continue reading

Tutorial – AS3 & REST web services with RESTProxy – Part 1

Hi Everyone,

[UPDATE Jan 19th, 2008]
I’ve just modified RESTProxy.php to handle gzip encoding from the client-side. It was quite simple. I was trying to consume web services on Discogs.com and it requires that you accept gzip encoding..

a while back, almost a year ago now, I published a little package of code called RESTProxy. This proxy is accessed from Flash AS3 code through AMFPHP to process HTTP requests otherwise not possible because of cross-domain limitations or because flash.net.URLLoader doesn’t allow the operation. True in Flex you have HTTPService which allows you the full spectrum of REST web service calls, however not so in flash.

In this tutorial I’ll cover when to use RESTProxy, guide you through it’s installation then show you a few examples.

URLLoader vs. RESTProxy

The following chart explains the advantages of using RESTProxy over URLLoader.

RESTProxy versus URLLoader

However, it is possible all you want is to consume webservices using POST and GET, on a host with a valid cross-domain.xml file; in which case you do not need RESTProxy. I developed RESTProxy to consume the more advanced data services from the YouTube GData Web Services.
Continue reading

Last.fm Web Services v2 & YouTube GData Web Service & KeepVid Mashup

Hi Everyone,

I whipped up a little application that finds an artist on Last.fm, gathers his top tracks. Then you can select a track from the list and it will play the first video that matches the search on YouTube. It was just for fun, again proof-of-concept for a much more interactive application I have in mind. You can try it below. Full source code + explanations to follow tomorrow.

[UPDATE 29.12.2008]
Sorry no source code yet, but I did add thumbnails for the videos found on YouTube in the right hand side + now if you click on the video you’ll get redirected to the YouTube page. I’ll post the code + explanations tomorrow (hopefully!).

[OTHER UPDATE]
KeepVid.com is down sometimes. If this happens you will get the list of videos on the right but if you click them nothing happens…

Ooops, looks like the flash app is too wide for this wordpress theme! lol.

Cheers!

Martin

Using FLVPlayer & KeepVidClient together

Hi Everyone,

here is a sample for these posts:

Simply paste the URL of a “watch” page on Vimeo or YouTube (browse to the video you like, copy the URL from the browser’s address bar, and paste it into this widget). The video will play, outside of the context of the site. This sample uses the FLVPlayer from the Tutorials I wrote a while ago + the KeepVidClient from yesterday’s post. It’s not exciting per say, but I was asked to post working samples of the work, so here is my first go!

Continue reading

Library to get direct access to YouTube & Vimeo FLV’s in AS3

Hi Everyone,

this is a … hrmm … not very legal thing to do. However I need this for a personal proof of concept so I thought I would make it available to the public. Basically I am using KeepVid‘s website to grab a URL to the FLV’s from Vimeo and YouTube. This means you can stream those FLVs directly into your own player, no need to show the UI from Vimeo & YouTube. This client gathers both the low-def & high-def (when available) urls.
Continue reading

Tutorial – Creating Custom Flex Components – Skins & CSS Styles

Hi Everyone,

over the span of the next 6 weeks I will be creating 2 custom flex components for Verizon Wireless’ MediaStore. One will be a data grid which is meant to be faster and custom fitted to their needs, and another one is to display search results.

Right now, I am at the exploration stage of building things from the ground up. These components need to be skinnable, meaning I need to offer css styling that I will use to draw the respective component’s UI. Continue reading

Tutorial – Playing FLV video in plain AS3 – Part 3 (Updated)

Hi Everyone,

it’s been a while.. a long while. I have been selling my time to Adobe, doing Flex work with a great team in NYC; we are working on the MediaStore for Verizon Wireless since July 21st? I forget.. NYC is nice, but not for me. I’m a nature lover!

A few people posted comments on the second part of this tutorial, kudos to you! You’re partly to blame for this late evening blog post ;)

For those who didn’t read them already, I strongly suggest starting by reading the first parts of this tutorial :

Continue reading