Skip to content

Instantly share code, notes, and snippets.

@eqdw
Created August 25, 2010 15:25
Show Gist options
  • Save eqdw/549709 to your computer and use it in GitHub Desktop.
Save eqdw/549709 to your computer and use it in GitHub Desktop.
function AddLink(item)
{
if(item.linkageExportForAS)
{
fl.outputPanel.trace(item.name + "-> currently linked");
return;
}
// split the string at the . to remove .png
// and replace all spaces with underscores
var className = item.name.split('.')[0].replace(' ', '_');
var baseClassName = "flash.display.BitmapData";
item.linkageExportForAS = true;
fl.outputPanel.trace(item.linkageClassName);
fl.outputPanel.trace(item.linkageBaseClass);
item.linkageClassName = className;
item.linkageBaseClass = baseClassName;
fl.outputPanel.trace(item.name + " -> link created");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment