通过JSFL没有视频向导CS5.5导入视频 [英] CS5.5 import video through jsfl without video wizard

查看:393
本文介绍了通过JSFL没有视频向导CS5.5导入视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想有一个JSFL脚本导入视频到我的.fla项目和整个事情会自动导出为一个.swf是否有可能在导入视频时禁用视频向导?我讨厌不得不手动确认所有的选择每一次。该视频以.flv格式,如果有什么差别

I'm trying to have a jsfl script import a video into my .fla project and export the entire thing as a .swf automatically Is it possible to disable the video wizard when importing videos? I'd hate to have to manually confirm all the options every single time. The video is in .flv format if that makes any difference

推荐答案

AFAIK你不能直接绕过FLV导入对话框(使用JSFL API)。

AFAIK you can't bypass the FLV import dialog directly (using the JSFL API).

我已经试过自动使用 Sikuli 脚本的FLV导入向导。 该脚本可以从JSFL使用无证 FLfile.runCommandLine()运行。

I've tried automating the FLV import wizard using a Sikuli script. The script can be run from JSFL using the undocumented FLfile.runCommandLine().

我使用OSX所以我不知道这下一部分适用于Windows太多。 如果我运行sikuli +直接脚本:

I'm using OSX so I'm not sure if this next part applies for Windows too. If I run the sikuli + the script directly:

FLfile.runCommandLine("/Applications/Sikuli-IDE.app/Contents/MacOS/JavaApplicationStub /Users/george/Documents/sikuli/importFLV.skl");

Flash将会等待它来运行,然后继续导入这是一个问题的FLV。该Sikuli脚本会超时,因为导入FLV对话框将不会出现。

Flash will wait for this to run then continue importing the FLV which is a problem. The Sikuli script will timeout since the Import FLV dialog will never appear.

不过,我可以运行这样的:

Still, I can run this:

FLfile.runCommandLine("open -a /Applications/Sikuli-IDE.app/Contents/MacOS/JavaApplicationStub /Users/george/Documents/sikuli/importFLV.skl");

和这似乎打开应用程序的窗口和异步运行该脚本,这是伟大的。然后我运行导入。 该Sikuli脚本:

And this seems to open a window of the application and runs the script asynchronously, which is great. Then I run the import. The sikuli script:

  1. 等待淡出(聚焦)对话框
  2. 点击即可获得焦点
  3. 点击嵌入FLV的SWF并在时间轴中播放选项
  4. 在等待与正确的选项选择对话框
  5. 点击继续
  6. 在等待下一个屏幕
  7. 点击继续
  8. 在等待下一个屏幕
  9. 点击完成
  1. waits for the faded out(out of focus) dialog
  2. clicks to get focus
  3. clicks the Embed FLV in SWF and play in timeline option
  4. waits for the dialog with the proper option selected
  5. clicks Continue
  6. waits for the next screen
  7. clicks Continue
  8. waits for the next screen
  9. clicks Finish

另外,我的机器上,该脚本总是工作时,我曾SikuliIDE开放(无特定脚本),并最小化。

Also, on my machine, the script always worked when I had SikuliIDE open (with no particular script) and minimized.

完整的测试脚本导入的视频看起来是这样的:

The full test script to import a video looks like this:

var doc = fl.getDocumentDOM();
FLfile.runCommandLine("open -a /Applications/Sikuli-IDE.app/Contents/MacOS/JavaApplicationStub /Users/george/Documents/sikuli/importFLV.skl");
var path = FLfile.platformPathToURI('Users/george/Desktop/cuePointTest_1.flv');
doc.importFile(path);

您可以找到运行这里脚本的记录。当我运行JSFL脚本,在点击的其余部分由Sikuli处理。您也可以下载源脚本和的 Sikuli可执行脚本了解我的设置,但我想这将是对你的不同。 Sikuli易于使用:键入命令,去你的应用程序和preSS CMD /按Ctrl + Shift + 2抢到一个快照,并继续

You can find a recording of the script running here. After I run the JSFL script, the rest of the clicks are handled by Sikuli. You can also download the source script and the Sikuli executable script for my setup, but I imagine it will be different on yours. Sikuli is easy to use: type a command, go to your app and press CMD/Ctrl + Shift + 2 to grab a snapshot and continue.

如果这样做的工作你,那么你或许可以修改Sikuli脚本等待一段时间做的点击次数的序列中的下一个视频,而闪存加载一个新的文档。应该有其他的变通办法来管理视频列表,但是这是有道理的,如果这个解决方案适合你的设置。

If this does the job for your, then you can probably modify the sikuli script to wait for some time to do the clicks for the next video in the sequence, while Flash loads a new document. There should be other workarounds to manage a list of videos, but that makes sense if this solution works for your setup.

这篇关于通过JSFL没有视频向导CS5.5导入视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆