-
[RESOLVED] [F8] Determine Number of MC in a MC
Is it possible to determine the mount of MC objects that are nested in another MC?
-
OOP is one letter from OOPS
function countChildClips(tarMc:MovieCliip){
var numOfChildren:Number = 0;
for (var mc in tarMc){
if (typeOf(mc) == "movieclip"){
numOfChildren++
}
}
return numOfChildren;
}
//call it as such
trace(countChildClips(targetClipInstanceName))
Check my syntax, but that is the general idea.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|