This repository was archived by the owner on Jan 18, 2023. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathProjectPanelAPISample.jsfl
More file actions
66 lines (57 loc) · 2.68 KB
/
Copy pathProjectPanelAPISample.jsfl
File metadata and controls
66 lines (57 loc) · 2.68 KB
1
function callMethod(p_panelName, p_function, p_param) { //Check for panels first l = fl.swfPanels.length; if (l == 0) { return 'false'; } //Find our panel, and call the method. for (i=0; i<l; i++) { if (fl.swfPanels[i].name == p_panelName) { if (p_param == null) { return fl.swfPanels[i].call(p_function); } else { return fl.swfPanels[i].call(p_function, p_param); } } } return 'false';}//var newName = prompt('Enter a new name for your Project.');//callMethod('Project', 'setName', newName);//var projRoot = fl.browseForFolderURL('Find Project Root');//callMethod('Project', 'createProject', projRoot+';New Project From JSFL;3');//var projURI = fl.browseForFolderURL('Find Project Root');//callMethod('Project', 'openProject', projURI);fl.trace('createQuickProject: ', callMethod('Project', 'createQuickProject'));//Modify Methods/*uri = 'file:///SOME_LOCATION;callMethod('Project', 'addToCompileList', uri + '/swcFile.swc');callMethod('Project', 'removeFromCompileList', uri);callMethod('Project', 'removeLocation', uri);callMethod('Project', 'addSourcePath', uri+ '/swcFile.swc');callMethod('Project', 'removeSourcePath', uri);callMethod('Project', 'addLocation', uri);callMethod('Project', 'setFlexSDKPath', uri);callMethod('Project', 'addLibraryPath', uri+ '/swcFile.swc');callMethod('Project', 'removeLibraryPath', uri);callMethod('Project', 'addExternalLibraryPath', uri+ '/swcFile.swc');callMethod('Project', 'removeExternalLibraryPath', uri);callMethod('Project', 'setURI', uri);callMethod('Project', 'setClassTemplate', uri);callMethod('Project', 'setSymbolClassTemplate', uri);*///fl.trace('runCompileList: ' + callMethod('Project', 'runCompileList'));callMethod('Project', 'setASVersion', 3);//Get Methodsfl.trace('getName: ' + callMethod('Project', 'getName'));fl.trace('getURI: ' + callMethod('Project', 'getURI'));fl.trace('getASVersion: ' + callMethod('Project', 'getASVersion'));fl.trace('getClassTemplate: ' + callMethod('Project', 'getClassTemplate'));fl.trace('getSymbolClassTemplate: ' + callMethod('Project', 'getSymbolClassTemplate'));fl.trace('getCompileList: ' + callMethod('Project', 'getCompileList'));fl.trace('getLocationNames: ' + callMethod('Project', 'getLocationNames'));fl.trace('getLocationURIs: ' + callMethod('Project', 'getLocationURIs'));fl.trace('getFlexSDKPath: ' + callMethod('Project', 'getFlexSDKPath'));fl.trace('getSourcePaths: ' + callMethod('Project', 'getSourcePaths'));fl.trace('getLibraryPaths: ' + callMethod('Project', 'getLibraryPaths'));fl.trace('getExternalLibraryPaths: ' + callMethod('Project', 'getExternalLibraryPaths'));fl.trace('getRecentProjectList: ' + callMethod('Project', 'getRecentProjectList'));