I'm trying to iterate through all the objects in the stage and I'm not sure how to do it.
It's kind of improvised through my previous experience with C# and javascript.
- First I need the correct list/array with all the stages children.
- I need to check their type. I have a special custom class which extends Sprite with some additional properties only.
Someone proficient in actionscript 3.0 who can show the proper way to do?
for(var obj:DisplayObject in DisplayObjectContainer) {
if(typeof obj == "Pic") {
Best Answer
The easiest would be to use the "is" operator to accertain the object's class.
An example: