function recursiveEmbed(container : DisplayObjectContainer) : void
{
for(var i: int = 0; i < container.numChildren; i++)
{
var child : DisplayObject = container.getChildAt(i);
if(child is DisplayObjectContainer)
recursiveEmbed(child as DisplayObjectContainer);
else if (child is TextField)
TextField(child).embedFonts = true;
}
}
//// You can use it like this on your root movieclip or Document Class or whatever: //// recursiveEmbed(this)