dear all
i have create a simple class ABC
package {
class ABC extends MovieClip {
private var _id:Number;
public function ABC() {
this._id = 0;
}
public function setID(in_id:Number):void {
this._id = in_id;
}
public function getID():Number {
return this._id;
}
}
}
and a loop for assigning the ID
for (var i=0; i<10; i++) {
var a:ABC = new ABC();
a.name = "a" + i;
a.setID(i);
addChild(a);
}
what is the syntax, if i would like to retrieve the 3rd ID (that is MovieClip “a2”)
a2.getID(); // seems not working
MovieClip(root).a2.getID(); // not working as well
THANKS ~~