Skip to main content
January 16, 2013
Question

How do I frame seek playback of a flash video with visual basic.net i.e. with an inputbox?

  • January 16, 2013
  • 1 reply
  • 690 views

How do I frame seek playback of a flash video with visual basic.net i.e. with an inputbox? So far I know how to play a single clip but not how to input a time and have the player, play from that point.My code so far is below.


Code:


    Imports System.IO

    Imports System.Net.Sockets

    Public Class Form1

        Friend WithEvents AxShockwaveFlash1 As New AxShockwaveFlashObjects.AxShockwaveFlash

        Dim PlayingFlash As Boolean = False

        Dim PlaylistHidden As Boolean = False

        Dim SettingUseJwPlayer3_16 As Boolean = True

        Sub OpenFLV(ByVal strFile As String, ByVal AxShockWaveFlash As AxShockwaveFlashObjects.AxShockwaveFlash)

            Dim strPath As String

            Dim PlayerPath As String = My.Computer.FileSystem.SpecialDirectories.Temp & "\player.swf"

            If File.Exists(PlayerPath) Then File.Delete(PlayerPath)

            File.WriteAllBytes(PlayerPath, My.Resources.player)

            strPath = "file:///" & PlayerPath & "?file="

            strPath = strPath & strFile

            strPath = Replace(strPath, "\", "/")

            With AxShockWaveFlash

                .Stop()

                .Visible = True

                .Menu = False

                .FlashVars = "&showstop=true&showdownload=false&height=" & AxShockWaveFlash.Height.ToString & "&width=" & AxShockWaveFlash.Width.ToString & "&showplay=true&autoscroll=false&autostart=true&overstretch=true&showicons=1&searchbar=false&controlbar=0"

                .LoadMovie(0, strPath)

                .Play()

            End With

            PlayingFlash = True

        End Sub

        Sub PlayJwPlayer3_16(ByVal Vid As String)

            If Not AxShockwaveFlash1.IsDisposed Then AxShockwaveFlash1.Dispose()

            AxShockwaveFlash1 = New AxShockwaveFlashObjects.AxShockwaveFlash

            AxShockwaveFlash1.BeginInit()

            AxShockwaveFlash1.Name = "AxShockwaveFlash1"

            AxShockwaveFlash1.EndInit()

            Me.Controls.Add(AxShockwaveFlash1)

            AxShockwaveFlash1.Visible = True

            AxShockwaveFlash1.Location = Panel1.Location

            AxShockwaveFlash1.BringToFront()

            PlayingFlash = True

            Panel1.Visible = False

            OpenFLV(Vid, AxShockwaveFlash1)

        End Sub

   

        Private Sub Play_Click(sender As Object, e As EventArgs) Handles Play.Click

            PlayJwPlayer3_16("https://dp-geography.wikispaces.com/file/view/World+Cup+in+South+Africa+-+%28IB+Geography+Study+Sports%2C+Leisure+%26amp%3B+Tourism+%29.flv")

        End Sub

    End Class

This topic has been closed for replies.

1 reply

chris.campbell
Legend
January 16, 2013

Would you mind reposting this question over on the Flash Professional forums?  This forum is primarily for end users, the Pro forums will get you in touch with a wider developer audience.

Thanks,

Chris

January 16, 2013

Will do thanks