YouTube AS3 Wrapper for the ChromeLess Player

Hi Everyone,

I was toying around today to get a youtube video to play the “legal” way. Quite honestly using the little KeepVid client I made and FLVPlayer, it works fantastic.. but yeah, it isn’t legal.

So after a few hours, I found a wrapper that works.. You can see it in action here.

Read more…

YouTube AS3 API link..

Hi everyone,

I had all but forgotten about this post on the official Youtube docs.. I will spend some time in the near future on the API to clear up some confusion and write more examples; plus finish the implementation of the interactive part of the functionality.

In the meantime, here is the link to the article… http://code.google.com/apis/youtube/articles/youtube_actionscript3.html

:)

Martin

Tutorial - Creating Custom Components (Visual Controls) in pure AS3 - Part 1

Hi Everyone,

Looking back at the last 4-5 years I spent developing Flash widgets & applications (again, I do NOT participate in marketing efforts.. so no micro-sites or bogus games for me) I realize that one of the core abilities of a good Flash application developer is his ability to develop components from scratch. The better you get at this, the more valuable you become. At first you try to develop simple components: buttons, radio buttons, check boxes, thumbnail viewers; then move on to more difficult ones: accordeons, tooltips, tabbed panels, tree controls.

Imagine, whatever your client asks you, you say: “Yes I can do”. This ability is very precious, it takes years of efforts to develop properly but once you have acquired it, there is no limit to what you can do. W/o this ability, you are limited to what you can integrate from libraries or packages. You can compare this to the difference between a composer and a DJ. The DJ can only mix tracks, but the composer can actually make up any music he wants!

Last summer I had a big challenge while working for Adobe: rebuild the DataGrid to enable it to show multiple levels of data, with animated filtering. It works, however is hasn’t been integrated inside of the Verizon Wireless Media Store yet, maybe one day!

Since that challenge, my perspective changed; in fact the experience at Abode proved very instructive. I have to thank Paul, Josh, Dave, Tommy, and Bjorn for this.

In this article I will describe the foundation of most of the custom components I build, a simple class called BaseControl. The ideas behind this class come from a Tutorial I first read in 2004 from Joey Lott, which I implemented in AS2 and then migrated to AS3.
Read more…

TIP - Converting a textual HEX color value to int

Hi Everyone,

just a short tip today on how to convert values like this : #00FF00 from a config file, letsay, to something you can use inside of your AS3 code.

Here it is

Actionscript:
  1. function digestHexColor(color:String):Number
  2. {
  3.     var col:Number = parseInt(color.substr(1), 16);
  4.     if (isNaN(col))
  5.         col = 0xffffff;
  6.            
  7.     return col;
  8. }

Read more...

Tutorial - Implementing your own CallLater function is AS3 (Flash or Flex)

Hi Everyone,

Although I am not a big fan of the CallLater function in Flex's UIComponent, I must admit that it is sometimes handy. Here is how you can implement your own CallLater function, this code can be incorporated inside of any class, enabling you to add functions that are called after the current thread of execution has been depleted.

Read more...

Tutorial - addEventListener code completion in Flash Develop

Hi Everyone,

in one of the recent releases of FlashDevelop they added a wonderful feature which lets you see what events are dispatched by the objects you are using. This is done through some meta tags inside of the class declaration and the result is very valuable. It looks like this:

addEventListener auto-completion in Flash Develop
Read more...

AS3 - LineArt Filter - Experiments

Hi Everyone,

live from Bangkok!! lol. It's songkram here, if you don't want to get wet stay inside and write on your blog.

So I have to detect the location of an item on images for one of my project, I thought of using the LineArt filter to detect high contrast areas, enabling me to pinpoint the exact space on the image (in this case transparent png's), because they are sometimes not centered.

The code from the LineArt filter comes for a very good book called "Kickass Java Programming" published in 1998. I simply ported to AS3, which was trivial.

Read more...

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..
Read more...

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!)

Read more...