Click here to Skip to main content
15,946,342 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 9-Aug-13 0:26am
v2
Comments
[no name] 9-Aug-13 7:54am    
"it not work" probably because you would need to supply a valid path and filename for it to play.

1 solution

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:
VB
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()


Now the value would be:

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

Hope this helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900