Hey all,

I thought using colons in code was old school Actionscript, and had been deprecated, but since Ive been using Flash 8 ive seen it popping up in AS examples everywhere.

Examples below.

var myCT:ColorTransform = new ColorTransform();
var mc:MovieClip = scope.createEmptyMovieClip("mc_" + depth, depth);
var myBitmapData:BitmapData = new BitmapData(100, 80, false, 0x00CCCCCC);

I have bolded the colons in question.

Why are they there??

For instance, couldnt we replace

var myCT:ColorTransform = new ColorTransform();


var myCT = new ColorTransform();

I tried it, and it works, why use the colons at all? is it better OOP convention??