|
-
Feb 24th, 2010, 01:57 PM
#1
Thread Starter
New Member
Play 2nd SWF
I am having no trouble playing a swf file in VB but how can a play a second SWF file AFTER the first has finished? How do I know when the first file is done playing? Tried 'isplaying' method in a while loop but can't get it to work.
Thanks for any help!
-
Feb 24th, 2010, 05:01 PM
#2
Re: Play 2nd SWF
the shockwave flash player control doesn't really give you a ton of control over what is going on.
One thing you could try, is to add a timer to your form, and check the CurrentFrame value to see if it is equal to the TotalFrames value, and if it is, that is an indication the video has finished running and you can load the next one.
-
Feb 25th, 2010, 09:28 AM
#3
Thread Starter
New Member
Re: Play 2nd SWF
I've tried variations of this, with no success:
vb Code:
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
The movie is playing fine but the msgbox isn't popping up at the end... Any ideas?
Thanks alot for your help!
-
Feb 25th, 2010, 11:55 AM
#4
Thread Starter
New Member
Re: Play 2nd SWF
Actually, I just found out that my 'movie' is only 1 frame so counting frames won't work. Is there a way to use the methods 'playing' or isplaying'?
Thanks
-
Feb 25th, 2010, 12:14 PM
#5
Re: Play 2nd SWF
Isn't it just a picture then, if its only 1 frame?
-
Feb 25th, 2010, 12:36 PM
#6
Thread Starter
New Member
Re: Play 2nd SWF
Sorry, I should have been more specific. I'm using a flash player control that allows me to play an .flv or .swf. The swfs use frames but I just realized that the flv video is only on one frame when it plays. It uses all of the same methods and functions as a normal swf. I've tried using a timer to check 'isplaying' method but don't think I'm doing it properly.
Thanks again.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|