setKeepAS3MetadataLinkerSetting(linkSettings);
for (int i = 0; i < unLinked.getFrameCount(); ++i)
{
SWFFrame unlinkedFrame = unLinked.getFrameAt(i);
SWFFrame resultFrame = new SWFFrame();
if( unlinkedFrame.getName() != null )
resultFrame.setName(unlinkedFrame.getName(), unlinkedFrame.hasNamedAnchor());
LinkedList<DoABCTag> accumulatedABC = new LinkedList<DoABCTag>();
for (ITag unlinkedTag : unlinkedFrame)
{
if (unlinkedTag instanceof DoABCTag)
{
final DoABCTag abcTag = (DoABCTag)unlinkedTag;
accumulatedABC.add(abcTag);
}
else
{
if (!accumulatedABC.isEmpty())
{
try
{
addLinkedABCToFrame(resultFrame, accumulatedABC, linkSettings);
}
catch (Exception e)
{
return unLinked;
}
accumulatedABC.clear();
}
if (!(unlinkedTag instanceof IManagedTag))
{
resultFrame.addTag(unlinkedTag);
}
else if( unlinkedTag instanceof SymbolClassTag )
{
SymbolClassTag s = (SymbolClassTag)unlinkedTag;
for( String symbol_name : s.getSymbolNames() )
{
resultFrame.defineSymbol(s.getSymbol(symbol_name), symbol_name);
}
}
}
}
if (!accumulatedABC.isEmpty())