简体   繁体   English

Flex / AIR:致电JSFL

[英]Flex/AIR: call JSFL

I've written a JSFL file to publish some fla's, and now I'd like to call that script from a flex / AIR application. 我已经编写了一个JSFL文件来发布一些fla,现在我想从flex / AIR应用程序中调用该脚本。

So the user should browse to the JSFL-file and select it. 因此,用户应浏览到JSFL文件并选择它。 After selecting the JSFL-file should run and do whatever is described in the JSFL. 选择JSFL文件后,应运行并执行JSFL中描述的任何操作。 If I run the JSFL, no problems occur and everything goes fine. 如果我运行JSFL,则不会出现任何问题,一切都会顺利进行。 However, I can't seem to call the file from my flex/AIR application. 但是,我似乎无法从我的flex / AIR应用程序中调用该文件。

I've tried writing a flash AS3.0 file and call the JSFL from there but that doesn't work either. 我试过编写一个Flash AS3.0文件,然后从那里调用JSFL,但这也不起作用。

The function I use is MMExecute but still nothing ... Searched for it quite some time now and I'd really like to do this. 我使用的函数是MMExecute,但什么也没有。。。搜索了一段时间,我真的很想这样做。 Anyway, here's some code... 无论如何,这是一些代码...

//ABOVE IS THE SELECT EVENT
jsflpath = evt.target.nativePath;
MMExecute('fl.runScript("'+filePath+'" );');

George is exactly right. 乔治是完全正确的。 With AIR 2.0+, you could use NativeApplication to launch the script file directly in Flash. 使用AIR 2.0+,您可以使用NativeApplication直接在Flash中启动脚本文件。

More on NativeApplication here: 有关NativeApplication的更多信息,请参见

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM