在 Flash Pro 中的现有 SWF 之上添加图层
我参与的一个项目有一个特定要求,即必须在现有 SWF 之上添加一个图层。 SWF 是通过使用 SWFTools pdf2swf 转换 PDF 创建的。该层将用于在 SWF 中的现有文本内容之上添加视频或声音等交互元素。
我的问题是,当我尝试将 SWF 导入 Flash Pro 时,它有点崩溃,并且无法正确查看 SWF 或其元素。
我尝试在导入后将 SWF 设为 MovieClip 元件,并调用其 play() 和 gotoAndPlay(i) 方法,但无济于事。使用带有加载程序的外部 SWF 是可行的,但 SWF 应该是内部的,这样整个项目就可以一次性编译到 iOS 和 Android。
是否有任何其他方法可以用来与 SWF 交互并使其在我的 FLA 项目中工作?
A project I'm involved in has a specific requirement where a layer must be added on top of an existing SWF. The SWF is created by converting a PDF using SWFTools pdf2swf. This layer will be used to add interactive elements like videos or sound on top of the existing text content in the SWF.
My problem is, when I try to import the SWF into Flash Pro, it sort of breaks up and it's not possible to see the SWF or its elements correctly.
I've tried making the SWF a MovieClip symbol after importing and called its play() and gotoAndPlay(i) methods to no avail. Using an external SWF with a loader works, but the SWF should be internal so the whole project can be compiled to iOS and Android in one go.
Are there any other methods I could use to interact with a SWF and make it work inside my FLA project?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的问题不在于Flash,而在于你将pdf转换为swf的方式。 pdf2swf 的默认参数将为以前版本的 Flash(确切地说是 6)导出 swf。因此,在转换为更高版本时,您需要显式设置 Flash 版本,以便可以将其导入到时间线中(假设您使用的是 AS3)。
使用此配置选项:
-T , --flashversion num 将 SWF 标头中的 Flash 版本设置为 num。
查看此了解更多信息:
http://wiki.swftools.org/index.php?title=Pdf2swf
http://wiki.swftools.org/index.php?title=Pdf2swf_-s_parameters
Your problem is not in Flash but the way you're transforming the pdf to swf. The default parameters of pdf2swf will export the swf for a previous version of Flash, 6 to be exact. So you need to explicitly set the flash version when converting to a later version so that you can import it in your timeline (assuming u're using AS3).
Use this config option:
-T , --flashversion num Set Flash Version in the SWF header to num.
View this for more information:
http://wiki.swftools.org/index.php?title=Pdf2swf
http://wiki.swftools.org/index.php?title=Pdf2swf_-s_parameters