AS and Windows programing

In actionscript you can create objects wich are somewhat like classes in C++. I’ve been trying to recreate the Windows class in AS… the problem is that to my knowledge an object cant be reused so to say- create as many windows as i like, all with different attributes(some based on user input). am i wrong?

dynamically create objects?


function createObj (objName) {
	this[objName] = new Object();
};

//example:
for(i=0; i<10;i++){
	createObj("objnum"+i);
}

‘this’ refers to the current timeline