Hi,
I am a Python programmer(Maya),very new to flash,Friend asked one script from flash,Which renames selected items from Library.I googled it and i found some info.This is the script(After small changes).
If i run this from script editor.I am getting errors like "Access to undefined property fl" and "undefined method alert".Code:var addText; myButton.addEventListener(MouseEvent.CLICK, clickButtonHandler); var selectedItems = fl.getDocumentDOM().library.getSelectedItems(); function clickButtonHandler(e:MouseEvent) { if (selectedItems.length == 0) { alert("Please select 1 or more symbols in the library."); } else if (selectedItems.length >= 1) { addText = myText.text; changeLibraryNames(); } } function changeLibraryNames() { var i; if (addText == null) { } else { for (i = 0; i < selectedItems.length; i++) { selectedItems[i].name = selectedItems[i].name + addText; } } }
I think i need to include some headerfile stuff ???
Please explain me some detailed way(Bcoz i am very new to flash-First time i am using flash).
Thanks.


Reply With Quote


Bookmarks