connecting jsfl array with swf
guys, I need some advice about how can I connect my jsfl array (for example "all movie clips in the library") with Actionscript and then show it in the "List" in swf panel like in code below but with an array of names of library items
//var my_array:Array = new Array();
//my_array = MMExecute("fl.getDocumentDOM().library.items.name");
var dp:DataProvider = new DataProvider();
dp.addItem( { iconSource:RedBox, label:"Item 1" } );
dp.addItem( { iconSource:RedBox, label:"Item 2" } );
dp.addItem( { iconSource:RedBox, label:"Item 3" } );
dp.addItem( { iconSource:RedBox, label:"Item 4" } );
var list:List = new List();
list.iconField = "iconSource";
list.dataProvider = dp;
addChild(list);
I want to do with array something as I did with simple texts update in swf (count of movie clips "myItems")
function callMeFromJavascript(arg:String):void
{
try {
var name:String = String(arg);
myTextField.text = name;
var numLibItems = MMExecute("fl.getDocumentDOM().library.items.length");
myItems.text = numLibItems;
} catch (e:Error) {
}
}
ExternalInterface.addCallback("callMySWF", callMeFromJavascript);
MMExecute("fl.runScript( fl.configURI + \"WindowSWF/fileOp.jsfl\" );");
MMExecute("fl.trace(\"AS3 File Status Panel Initialized\");");
