Page 1 of 1

Play 2nd SWF

Posted: Thu Feb 25, 2010 4:00 pm
by dagelmyster
I'm trying to play a second swf file AFTER the first one is done play. I've tried isplaying method and comparing current frame to total frames it's not working (vb.net). Can someone help or is there an easier way to do this? Thanks!

Code: Select all

FLVPlayer.FlashMethod_Play()
FLVPlayer.Show()
IsPlayingTimer.Enabled = True
Do While IsPlayingTimer.Enabled = True
   Application.DoEvents()
Loop
MsgBox("DONE")

Private Sub IsPlayingTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles IsPlayingTimer.Tick
    If FLVPlayer.FlashMethod_CurrentFrame = FLVPlayer.FlashProperty_TotalFrames Then
         IsPlayingTimer.Enabled = False
    End If
End Sub

Posted: Thu Feb 25, 2010 4:42 pm
by Softanics
Hello,

May be the first movie has single frame only?

Thank you.

Posted: Thu Feb 25, 2010 4:49 pm
by dagelmyster
Yes, I think you're right... so how then can I determine when the movie is finished playing?

Posted: Thu Feb 25, 2010 6:03 pm
by Softanics
dagelmyster wrote:Yes, I think you're right... so how then can I determine when the movie is finished playing?


Unfortunaly, there is no a common solution.

Also I've noticed that you compare:

Code: Select all

FLVPlayer.FlashMethod_CurrentFrame = FLVPlayer.FlashProperty_TotalFrames


but you should:

Code: Select all

FLVPlayer.FlashMethod_CurrentFrame = FLVPlayer.FlashProperty_TotalFrames - 1


Thank you.

Posted: Thu Feb 25, 2010 6:41 pm
by dagelmyster
Thanks anyways.