Make money with AIR applications by using Sharify

I just discovered Sharify, an interesting service which goal is to provide AIR developers the tools for create shareware (sellable) applications.
It seems also very easy to use, the steps are: register to the site, create an application id, integrate the sharify library (an swf file) into the application and choose a payment method (like paypal). The service unfortunately is not free, but require the 3% of each license sold… however I find the percentage very reasonable (if the service is valid and secure as I expect).
I didn’t try it yet, but I think I’ll do in the future :)

Actionscript Vector class initialization with a source Array

What you maybe already know:

Vector class is a powerful class introduced with flash player 10. It is fundamentally a special typed array into which all elements must be the same type and it is faster than a normal Array.

What you maybe don’t know:

It’s possible to initialize a Vector with an Array or another Vector as a source but you must use the Vector function not the class constructor. The class constructor in fact has the following signature:

Vector(length:uint = 0, fixed:Boolean = false)

Vector function instead has this:


So, rather than using such approach:

var vector:Vector.<String> = new Vector.<String>();
vector[0] = "value1";
vector[1] = "value2";
vector[2] = "value3";
// ...and so on

We can do the following (Notice the absence of “this” keyword):

// create a vector with an inline Array as source
var vector:Vector.<String> = Vector.<String>(["v1", "v2", "v3"]);

// create a vector with an inline Vector as source
var vector2:Vector.<String> = Vector.<String>(vector);

// Testing (both trace will print the same string)