如何使用AxShockwaveFlash在vb.net中播放swf文件 [英] how can i play the swf file in vb.net using AxShockwaveFlash

查看:91
本文介绍了如何使用AxShockwaveFlash在vb.net中播放swf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AxShockwaveFlash1.Movie = Application.StartupPath&C:\Documents and Settings\Administrator\Desktop\Lib\\\
obel.swf

AxShockwaveFlash1.Play()





这是我使用的paly swf的代码,但它不起作用。

AxShockwaveFlash1.Movie = Application.StartupPath & "C:\Documents and Settings\Administrator\Desktop\Lib\nobel.swf"
AxShockwaveFlash1.Play()


this the code for paly swf which is used by me but it not work.

推荐答案

我不熟悉shockwave,但是在使用shell和使用命令行参数时我遇到过这种情况。似乎变量AxShockwaveFlash1.Movie包含查看器.exe路径和要显示的视频的名称。



由于文件的路径有空格,可以尝试用引号括起文件名。

此外,可执行文件和命令行参数之间应该有一个空格,在本例中是文件名。



您的代码将AxShockwaveFlash.Movie值设置为:



c:\ program Files \shockwave \sw.exeC: \Documents and Settings\Administrator\Desktop\Lib\\\
obel.swf



我的建议:

I'm not familiar with shockwave, but I've run into this when using shell, and when using command line arguments. It appears that the variable AxShockwaveFlash1.Movie contains the viewer .exe path and the name of the video to be displayed.

Since the path to the file has spaces, you can try enclosing the file name in quotes.
Also, there should be a space between the executable and the command line argument, in this case, the filename.

You're code sets the AxShockwaveFlash.Movie value to something like:

c:\program files\shockwave\sw.exeC:\Documents and Settings\Administrator\Desktop\Lib\nobel.swf

My suggestion:
dim q as string=chr(34) ' character 34 is a quotation mark
AxShockwaveFlash1.Movie = Application.StartupPath  & " " & q & "C:\Documents and Settings\Administrator\Desktop\Lib\nobel.swf" & q
AxShockwaveFlash1.Play()





现在的价值是:



c:\program files\shockwave\sw.exeC:\Documents and Settings \Administrator\Desktop\Lib\\\
obel.swf



希望这会有所帮助。



Now the value would be:

c:\program files\shockwave\sw.exe "C:\Documents and Settings\Administrator\Desktop\Lib\nobel.swf"

Hope this helps.


这篇关于如何使用AxShockwaveFlash在vb.net中播放swf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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