Skip to content

Instantly share code, notes, and snippets.

@paulovera
Last active December 20, 2015 03:39
Show Gist options
  • Save paulovera/6065311 to your computer and use it in GitHub Desktop.
Save paulovera/6065311 to your computer and use it in GitHub Desktop.
CHECK NUMBER OF PARENTS OF A LOADED SWF OR MOVIECLIP
function checkParent() {
var container:DisplayObjectContainer = this;
var level:uint = 0;
while ( container.parent != null ) {
container = container.parent;
trace( 'parent in level'+ level +' : ' + container );
level++;
}
trace(level+' níveis para atingir o stage');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment