使用 Flash 按钮启动外部 .pps 文件
我有一个 Flash 应用程序,其中有一个按钮。单击该按钮后,应播放 pps 文件。我所做的是以投影仪格式(.exe)发布 flash 文件,创建一个名为“fscommand”的文件夹并将 pps 文件放入该文件夹中,并尝试使用以下命令从该 flash 文件启动位于该文件夹中的文件代码:
on (release) { fscommand ("exec", "file.pps"); }
我尝试的另一种方法是: 创建了一个名为 launch.bat 的 .bat 文件,将其放入该文件夹中 &尝试使用以下代码通过此 .bat 文件启动 pps 文件:
Actionscript 代码:
on (release) { fscommand ("exec", "launch.bat"); }
“launch.bat”文件代码:
START "file.pps"
但仍然无法正常工作。请帮助我哪里错了。
I have a flash application in which there is a button. On clicking that button, a pps file should play. What I did is published the flash file in a projector format (.exe), created a folder named 'fscommand' and put the pps file inside that folder, and tried to launch the file lying inside that folder from this flash file by using following codes:
on (release) { fscommand ("exec", "file.pps"); }
Another way I tried which I found is:
created a .bat file named launch.bat, put it in that folder & tried to launch the pps file via this .bat file using following codes:
Actionscript code:
on (release) { fscommand ("exec", "launch.bat"); }
'launch.bat' file code:
START "file.pps"
But still it's not working. Please help where am I wrong.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您双击 PPS(即在 Windows 资源管理器或 Finder 中)时会发生什么?
如果它没有以幻灯片模式启动演示文稿,则表明计算机上的文件关联存在问题,或者未安装 PPT/查看器,因此无法播放该文件。
如果双击的 PPS 文件按预期播放,则可能是路径问题。我不知道 Flash 的行为如何,但在某些应用程序中,您不能总是假设路径将设置为当前文档或 app/exe 文件的路径。
作为测试,尝试在 EXE 中硬编码 PPS 的路径。
What happens when you doubleclick the PPS (ie, in Windows Explorer or the Finder)?
If it doesn't launch the presentation in slideshow mode, there's something amiss with the file associations on the computer or PPT/the viewer isn't installed so there's nothing to play the file.
If doubleclicked PPS files play as expected, then it might be a path issue. I don't know how Flash behaves, but in some apps you can't always assume that the path will be set to the path of the current document or app/exe file.
As a test, try hardcoding the path to the PPS in your EXE.