//To open a file named "example.fla" relative to the executing JSFL script, you simply say: //open a file named example fl.openDocument( 'file:///example.fla' ); //insert the V2 button components fl.componentsPanel.addItemToDocument({x:0, y:0}, "UI Components", "Button"); //delete the instance added to the stage document.deleteSelection();