i have a little problem
i use the beginInvoke with 2 sub (one calling the Sub Sync)
it works nicely, the player is "linked" to a datagridview
when i click on a row, it plays the selected file, but when i click on the same row, sometimes the player doesn't play the selected file (link)
or sometimes when i click on a row, a process convert some files in SWF format and detect when it is finished, so when it is done, i call the flash player to play the new file, sometimes it plays, sometimes not...
Code: Select all
Private Sub PlayMovie(ByVal SrcFile As String)
If Not (System.Threading.Thread.CurrentThread.ManagedThreadId = mainThreadID) Then
Dim del As New SyncDelegateMovie(AddressOf PlayMovieSync)
Me.FlashPlayer.BeginInvoke(del, New Object() {SrcFile})
Else
Me.PlayMovieSync(SrcFile)
End If
End Sub
Private Sub PlayMovieSync(ByVal SrcFile As String)
With Me.FlashPlayer
.FlashProperty_Movie = SrcFile
.Visible = True
.FlashMethod_Rewind()
.FlashProperty_Loop = 0
.FlashProperty_Quality = 1
.FlashMethod_Play()
End With
End Sub