PDA

View Full Version : Making a new test movie script


clinch
01-25-2006, 08:39 PM
Hi.
I am just diving into JSFL for the first time. I'm trying to make a new "test movie" script that will allow me to export an swf and run it, very similar to how the normal "Test Movie" runs when I hit CTRL+Enter..

However, I would like to use exportSWF, so I can override the location that the SWF gets published to, regardless of what is configured in the FLA file.

So essentially, I would like to have the following:


fl.getDocumentDOM().exportSWF(path);
codeToLaunchSWF(path);


However, I've searched and can't find the "codeToLaunchSWF". Can some one tell me how to achieve this?

Please and thank you. I know there aren't many JSFL programmers out there, so I'm grateful for your help.

hangalot
01-26-2006, 02:06 AM
this will do the trick

FLfile.runCommandLine("c:/ads.swf");

where i got this information
http://www.asvguy.com/2004/07/undocumented_fl.html
note that this will leave open a batch command window

jjbilly
01-26-2006, 08:39 AM
An alternative would be to load in publish settings specifying the output directory, then call testMovie().

clinch
01-26-2006, 12:50 PM
this will do the trick

FLfile.runCommandLine("c:/ads.swf");

where i got this information
http://www.asvguy.com/2004/07/undocumented_fl.html
note that this will leave open a batch command window

That didn't work for me. I also checked the documentation in Flash 8 and do not see a method called "runCommandLine" in the FLfile class.

I will try the method of overwriting the publish settings.

BZZR
02-04-2006, 06:49 PM
FileSystem.executeDocument() will do the trick.

It opens the specified file with its
associated application.

You can find the documentation here:
http://www.flashguru.co.uk/extensions/

Enjoy.

hangalot
02-04-2006, 06:55 PM
that dll only runs on winnt and above on no other OS