Flash Integration?

  • Thread starter Thread starter Kurt
  • Start date Start date
K

Kurt

Can anyone point me to an example of embedding a
Macromedia Flash .swf into a vb.net form?

tia

kurt
 
Hi Kurt,

Here are notes I wrote to myself when I finally figured out how to do this:

make a reference to the proper control by browsing for
c:\windows\system32\flash\swflash.ocx; once selected, it will immediately
check the Flash Factory Object; select it and it will become actually two
controls; drag the one called 'Shockwave' to the form (I actually have these
now as part of the Components tab in the toolbox); right click and set as
appropriate; I'm having a little trouble getting it to play, as the play
selection seems to continually drop, but I finally got it to lock in - some
of the other settings may have been interfering with it; finally, remember
that the timer in the splash screen may have to change if the movie runs
longer than you might expect; UPDATE: it's a flacky control, because
elements of it tend to disappear even after using 'apply', but be persistent
and it eventually will stick; also, the code doesn't even have the .swf
filename

Here's the timer code I use to autoclose the form:

Private Sub splash_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
AxShockwaveFlash1.Loop = False

AxShockwaveFlash1.Play()

Timer1.Start()

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick

alarmcounter += 1

If alarmcounter > 5 Then

Me.Close()

End If

End Sub

HTH,

Bernie Yaeger
 
-----Original Message-----
Hi Kurt,

Here are notes I wrote to myself when I finally figured out how to do this:

make a reference to the proper control by browsing for
c:\windows\system32\flash\swflash.ocx; once selected, it will immediately
check the Flash Factory Object; select it and it will become actually two
controls; drag the one called 'Shockwave' to the form (I actually have these
now as part of the Components tab in the toolbox); right click and set as
appropriate; I'm having a little trouble getting it to play, as the play
selection seems to continually drop, but I finally got it to lock in - some
of the other settings may have been interfering with it; finally, remember
that the timer in the splash screen may have to change if the movie runs
longer than you might expect; UPDATE: it's a flacky control, because
elements of it tend to disappear even after
using 'apply', but be persistent
and it eventually will stick; also, the code doesn't even have the .swf
filename

Here's the timer code I use to autoclose the form:

Private Sub splash_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
AxShockwaveFlash1.Loop = False

AxShockwaveFlash1.Play()

Timer1.Start()

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick

alarmcounter += 1

If alarmcounter > 5 Then

Me.Close()

End If

End Sub

HTH,

Bernie Yaeger




.
Thanks Bernie, I'll give it a whirl :-)
 
Back
Top