Problem when changing source file

.NET Edition of the F-IN-BOX
Dnx
Posts: 16
Joined: Wed Sep 20, 2006 9:20 am

Problem when changing source file

Postby Dnx » Mon Sep 25, 2006 9:10 am

Hi,

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


Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Re: Problem when changing source file

Postby Softanics » Mon Sep 25, 2006 9:27 am

I can suggest you the following modification:

Code: Select all

        With Me.FlashPlayer
            .FlashProperty_Movie = "_none_" ' <-- add this line
            .FlashProperty_Movie = SrcFile
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

Dnx
Posts: 16
Joined: Wed Sep 20, 2006 9:20 am

Postby Dnx » Mon Sep 25, 2006 9:52 am

now i see the video loaded on the player but i have the same problem sometimes it start to play sometimes not...
i have to click again on the row to play the movie, i don't know what happen...

regards

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Mon Sep 25, 2006 3:07 pm

Do you forget to call EndEnvoke after BeginInvoke?...
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html


Return to “.NET Edition”

Who is online

Users browsing this forum: No registered users and 12 guests

cron