I would like to include .swf file in a vb 2005 program. I have no idea how and where to include the .swf file. It is inside the picture box? Please guide me, I am new in vb and have no idea how 2 do it. thx

Recommended Answers

All 18 Replies

no, its not inserted in picture box. to play swf file you must use shockwaveflash. find this component and add to your toolbox.
right click on your toolbox (or control + T) -> in tab controls find "shockwave flash" -> select it and it will shown on your toolbox control.
use this control on your form.
then add this code to play :

Private Sub Play_Click()
ShockwaveFlash1.Play
End Sub

Private Sub Pause_Click()
ShockwaveFlash1.StopPlay
End Sub

Private Sub Rewind_Click()
ShockwaveFlash1.Rewind
End Sub

Private Sub LoadMovies_Click()
Call ShockwaveFlash1.LoadMovie(0, "C:\Documents and Settings\Jerry\My Documents\Games Flash\ninja.swf")
End Sub
commented: i learning Here +1

when i try 2 place the "Shockwave Flash Object" from my toolbox into my design. The system prompt "Failed to import ActiveX control. Please ensure it is properly registered.". What does this mean? Since i am using vb2005, am i entering the wrong forum? vb2005 should b group into vb .NET?

yes, vb 2005 is group of .net and sorry for the post its for vb 6. ok. this i post an attachment of simple flash player.

Flash Player.zip


for activeX problem see this link : http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2535137&SiteID=1

uh ja i followed ur instructions and nothing happened?

im new at this and would realli appreciate ur help? where am i supposed to put the code u mentioned?

thanx!

hi thando..welcome to daniweb friend :).
what version of vb that u using to play flash??
vb 6 or vb.net cause derice use .net.
if u using vb.net, u can download the file for flash player using .net on my post above # 4, named "Flash Player.Zip"
what the problem that u facing now?error or what?
Post your code, so we can help u.

sorry, i 4gotten wat's the error/problem i faced but my frd have alrdy solved it. Anyway thx for helping=)

hi! thanx its gr8 2 b here!
um im using vb6, and the code i used was the one u posted uh 29 days ago, for vb6...
so wat im clueless about is where its supposed to go, bcuz i added the shockwaveflash component to my form and i dont realli kno wat to do from there?

ja i would realli appreciate it and all ...

thanx! all the best!

so u already added shockwaveflash on form. next move is write a code. u can see on this thread for second post (#2), there are code for play flash file (.swf)

so all i have to do is copy and paste this code on the form thingie, and change the directory file for my flash movie?

yes. just change the directory of flash file (.swf).

hi!
ja, i guess that's where my prob is nothing happens when i play my program? is it supposed to? what am i doing wrong?

Hi Thando...
i'll post the program to you.
i guest you don't load movies before.
see the program, and press load movies button to load flash file and play.

commented: Thanks man +1
commented: :) +1

thanx! much appreciated for ur help!

thanx! much appreciated for ur help!

its means your problem solved or not??

ja basically

but i have a problem, when i load the form, i get an error that says -

"method or data member not found" - relating to the loadmovie cmdbutton? i've changed the directory file?

wat 2 do?

are you copied the code or use my current project??

this is your project im using? ill try again and c wat happens

hi to all,,,have you downloaded the "flash player.zip"? how to convert it entirely with vb6.0?thanks..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.