How to convert SWF flash movie into AVI video in Visual Basic 6 using SWF To Video SDK

  • Home
  • /
  • Articles
  • /
  • How to convert SWF flash movie into AVI video in Visual Basic 6 using SWF To Video SDK

The sample code shows how to convert swf (flash movie) file into AVI (video file) using Bytescout SWF To Video SDK for developers in Visual Basic 6 (classic VB).

The conversion SDK works as ActiveX COM object (for x86 and x64 Windows systems), its methods and properties are designed to run the SWF To AVI conversion in sync or async way.

Private Sub Command1_Click()

    ' Create an instance of SWFToVideo ActiveX object
    Set converter = CreateObject("BytescoutSWFToVideo.SWFToVideo")

    ' Set debug log

    'converter.SetLogFile "log.txt"

    ' Register SWFToVideo
    converter.RegistrationName = "demo"
    converter.RegistrationKey = "demo"

    MsgBox App.Path

    ' Add SWF file and set its output filename
    converter.SetMovie "SlideShowWithEffects.swf", "result.avi"

    ' Set output movie dimensions
    converter.OutputWidth = 640
    converter.OutputHeight = 480

    ' Run conversion
    converter.RunAndWait

    ' Open result in default media player
    Set shell = CreateObject("WScript.Shell")

    shell.Run "result.avi", 1, false
    Set shell = Nothing

    Set converter = Nothing

End Sub

prev
next