Re: How to insert a flash animation (.swf) on a VB6 form
If you have shockwave onyour system then get it from your toolbox
Then add it to a form then just do:
command1_Click()
ShockwaveFlash1.Movie = "http://www.miniclip.com/games/samurai-sam/en/samuraisam.swf"
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders
Re: How to insert a flash animation (.swf) on a VB6 form
Originally Posted by jmsrickland
I have Flash9b.ocx. What's the difference between that and swFlash.ocx and how do you use it?
Add it to your toolbox and put it on a form. I also use Flash9b.ocx., don't know about the other one. Then run the code i showed before:
command1_Click()
ShockwaveFlash1.Movie = "http://www.miniclip.com/games/samurai-sam/en/samuraisam.swf"
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders
Re: How to insert a flash animation (.swf) on a VB6 form
Originally Posted by jmsrickland
I have Flash9b.ocx. What's the difference between that and swFlash.ocx and how do you use it?
I have Flash.ocx, Flash9d.ocx and SwFlash.ocx on my system and they all work the same. Its just the version of ShockWave you have installed. I have 6, 7, 8 and 9 installed.
Anyway to play a swf movie you can use a CommonDialog to find the movie or just use this.
Code:
Private Sub cmdPlay_Click()
ShockWave1.LoadMovie 1, App.Path & "\Your.swf"
ShockWave1.Movie = App.Path & "\Your.swf"
'ShockWave1.GotoFrame 1 'not really needed here
End Sub
'Menu item for play and pause
Private Sub mnuPlay_Click()
Select Case mnuPlay.Caption
Case "&Play"
ShockWave1.Playing = True
mnuPlay.Caption = "&Pause"
Case "&Pause"
ShockWave1.Playing = False
mnuPlay.Caption = "&Play"
End Select
End Sub
You can always search on here. This as been talked about many times.
Keith
I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
Re: How to insert a flash animation (.swf) on a VB6 form
I am reviving this thread for a good reason...
I am currently trying to learn how to play a SWF animation file, but I have encountered some problems:
The actual images are supposed to show, but instead all I get is a white background. Is there any way for the animation to function properly with no problems?
I am attaching the file folder. If somebody could let me know where I went wrong, please let me know.
Re: How to insert a flash animation (.swf) on a VB6 form
I can't even save the project. BTW: The name of the shock player is incorrect.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
Re: How to insert a flash animation (.swf) on a VB6 form
No, I don't have the slightest idea why but I have another project that has the same exact control on it and I have no problems saving it and it plays as well as this project.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
Re: How to insert a flash animation (.swf) on a VB6 form
I even tried loading a new copy of the control. Same problem. It must be the control if you try to add another (like a button) control to the project.
As a matter of fact, any changes code or adding buttons will cause it to error out upon save
Last edited by jmsrickland; Jun 15th, 2011 at 02:21 PM.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
Re: How to insert a flash animation (.swf) on a VB6 form
It's definitely the OCX.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.