function argbtohex(a:Number, r:Number, g:Number, b:Number)
{
return (a<<24 | r<<16 | g<<8 | b)
}

This function receives 4 parameters: alpha, red, green and blue, each has it’s values between 0-255.

Usage:
color = argtohex(255,255,0,0); //red, full alpha

For 100% alpha use the value: 255 and for 0% alpha use 0.

And finally,

The usual happy coding:D