Script to Control Smoothing for Selected library assets in Flash IDE


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var promptVal = prompt("Allow Smoothing? (1=Yes, 0=No)", "1");
  2. var theLibrary = fl.getDocumentDOM().library;
  3. var selectedItems = theLibrary.getSelectedItems();
  4.  
  5. fl.outputPanel.clear();
  6.  
  7. for(var itemIndex=0; itemIndex < selectedItems.length; itemIndex++){
  8. var theItem = selectedItems[itemIndex];
  9. theItem.allowSmoothing = (promptVal=="1") ? (true) : (false);
  10. var itemName = theItem.name;
  11.  
  12. var enableDisable = (promptVal=="1") ? ("Enable") : ("Disable");
  13. var outputString = enableDisable + " smoothing on: " + itemName;
  14. fl.outputPanel.trace(outputString);
  15. }
  16.  
  17. fl.outputPanel.trace("Smoothing Complete!");

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.