Three questions
Hi there,
I was suggested to redirect a JSFL guestion to here.
I finally got "Flash.exe myjsfl.jsfl" to work. Below is what in myjsfl.jsfl
var flaname = "file:///G:/bk/working/trunk/testproj/utilts/as/myobj.fla";
var pfname ="file:///G:/bk/working/trunk/testproj/utilts/as/tt41004.xml";
if(FLfile.exists(flaname) && FLfile.exists(pfname))
{
var doc = fl.openDocument(flaname);
fl.getDocumentDOM().importPublishProfile(pfname);
fl.getDocumentDOM().publish();
fl.closeDocument(doc);
} else
{
fl.trace("not exist: " + pfname + ".");
}
The tt41004.xml contains the target location of swf file,
<flashFileName>G:\bk\working\trunk\testproj\file s\ swf\tt41004.swf</fl ashFileName>
There are four problems,
1. The Flash IDE will be launched (can I launch flash.exe in background/without gui?), and whatever publish setting in myobj.fla will override above <flashFileName>...</flashFileName> setting in the profile. Can I prevent it from overriding?
2. How can I close the Flash IDE? if I don't do so and reissue another "Flash.exe myjsfl.jsfl", a exception will occur.
3. I'm using an external myclass.as file. In myobj.fla, I referred the class as "import com.testproj.myclass;" then created an instance of the class. How can I change as3 code in the *.fla file, for instance change above import to "import com.testproj.tt41004" and all class names thereafter before running the JSFL programmatically (using string replace for instance)?
TIA
-s
|