I'm loading an external SWF (pre-made by an other department of the company I work for) using flash.display.Loader
. I then traverse the display list, register all objects and listen for added/removed events to handle future changes to the list.
var obj:DisplayObjectContainer = loadEvent.currentTarget.content as DisplayObjectContainer;
var count:Number = obj.numChildren;
for (var i:Number = 0; i < count; i++)
{
registerObject(obj.getChildAt(i));
}
obj.addEventListener(Event.ADDED, onChildAdded);
obj.addEventListener(Event.REMOVED, onChildRemoved);
The thing is I wonder what would happen if one of the developers of the original SWFs uses:
.visible = true / false;
Is there a way I can listen for changes to the .visible property? Or any other property (that doesn't fire a built-in event) for that matter?