PDA

Click to See Complete Forum and Search --> : Incorporate Shockwave Flash Into Visual Basic



plprakash
11-20-2000, 03:43 AM
Using flash generated shockwave file in VB 6:

The idea of incorporating a shockwave file in VB 6 is possible becoz, there is a component available which can be used in VB 6 for this purpose. The name of the component is “ShockwaveFlash”.

I got this component from the list of available components thro’ the pull down menu Projectsŕ Components and included the shockwaveflash component (swflash.ocx) in my form.

The following are the code which I wrote in the form:

ShockwaveFlash1.EmbedMovie = True
ShockwaveFlash1.LoadMovie 1, "bag.swf"
ShockwaveFlash1.Base = "bag.swf"
ShockwaveFlash1.Play

I am not able to get any help regarding this from the Microsoft Help / MSDN as this is a third party control. Assuming that the “BASE” property is used to assign the swf file to the component, I tried executing the code. The program didn’t generate any error, but it displayed nothing on the component, which I had placed on the form.

How do I proceed with this ?

schmicknick
11-29-2000, 05:53 PM
. Hi,

. I've got mine working. First I will respond to your post with knowledge which I recall and then I will look for any links to add where I found information ( yeah, there weren't alot).

. My code:

Private Sub Form_Load()
PlayFlashMovie (CurDir$ & "\swfname.swf")
frmSplash.Visible = True
tmrSplash.Enabled = True
End Sub

Public Function PlayFlashMovie(Filename As String)
With shk1
.Movie = Filename
.Play
End With
End Function

Private Sub tmrSplash_Timer()
If shk1.FrameNum = 108 Then
'this fires the code in the [begin} button click event
'which unloads the splash among other things
cmdBegin_Click
End If
End Sub

. ok, so I haven't messed much with "embedding" the movie. Also you might choose to load from the App.path if you are familiar with that. At any rate, I felt loading it from my programs directory structure was fine. When you load, you will need to specify an entire path. The CurDir$ and App.path return the value of the path where the .exe is being run from.

. I dunno what the shk1.base whould even refer to. (?) The base encoding of something or something? do you know?

well, there is alot that can be done with API calls and misc. classes, but that is beyond my instruction ability today.

ok links:

Sorry I don't have more precise ones, you'll have to look. Try looking around at:
http://www.vbcode.com
http://www.PLANETSOURCECODE.com
http://codeguru.earthweb.com/vb/
http://www.oneseek.com/dstart.htm

There is also, around, a .zip called FlashandVB.zip made by a fellow named Newmann.

Good luck.

Yours truly,
~M

kirill
12-09-2000, 04:19 PM
Hi! I got mine to work too, to learn I used a simple example that came with my flash 4 CD I put the zip up on my web server for you http://www.nadysev.fsnet.co.uk/flashvbdemo.zip

remember to change the location to whatever it is on your hard drive and to embed it :)

schmicknick
12-09-2000, 04:43 PM
. Hi,

. Here is the link at Planet Source Code for Newman's tutorial/example.


link to newman's zip
http://www.planet-source-code.com/xq/ASP/txtCodeId.11581/lngWId.1/qx/vb/scripts/ShowCode.htm

. I thought I would add it to the thread.

. Yours truly,
. ~M