Last active
December 20, 2015 03:39
-
-
Save paulovera/6065311 to your computer and use it in GitHub Desktop.
CHECK NUMBER OF PARENTS OF A LOADED SWF OR MOVIECLIP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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