How to convert flash to video with transparency SWF To Video SDK - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

How to convert flash to video with transparency SWF To Video SDK

  • Home
  • /
  • Articles
  • /
  • How to convert flash to video with transparency SWF To Video SDK
This sample source code shows how to convert flash movie with transparency into video (SWF to AVI) using Bytescout SWF To Video SDK in Visual Basic .NET or C#.

The SDK provides support for flash movies with transparency and conversion of these SWF files into 32-bit RGBA AVI video with transparency.

Visual Basic .NET :

Imports BytescoutSWFToVideoLib

Module Module1

    Sub Main()

        ' Create an instance of SWFToVideo ActiveX object
        Dim converter As New SWFToVideo()

        ' Set debug log
        'converter.SetLogFile("log.txt")

        ' Register SWFToVideo
        converter.RegistrationName = "demo"

        converter.RegistrationKey = "demo"

        ' Set RGBA Mode. IMPORTANT: Set .RGBAMode = True BEFORE calling .SetMovie()
        converter.RGBAMode = True

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

        ' Set output movie dimensions

        converter.OutputWidth = 640
        converter.OutputHeight = 480

        ' Run conversion
        converter.RunAndWait()

        ' Open the result movie in default media player
        Process.Start("result.avi")

    End Sub

End Module

Visual C# .NET :

using System.Diagnostics;
using BytescoutSWFToVideoLib;

namespace SwfTo32BitRgbaAvi
{
    class Program
    {
        static void Main(string[] args)

        {
            // Create an instance of SWFToVideo ActiveX object
            SWFToVideo converter = new SWFToVideo();

            // Set debug log
            //converter.SetLogFile("log.txt");

            // Register SWFToVideo
            converter.RegistrationName = "demo";

            converter.RegistrationKey = "demo";

            // Set RGBA Mode. IMPORTANT: Set .RGBAMode = True BEFORE calling .SetMovie()
            converter.RGBAMode = true;

            // Add SWF file and set its output filename
            converter.SetMovie("circles.swf", "result.avi");

            
            // Set output movie dimensions
            converter.OutputWidth = 640;
            converter.OutputHeight = 480;

            // Run conversion
            converter.RunAndWait();

            // Open the result movie in default media player
            Process.Start("result.avi");

        }
    }
}

Tutorials:

prev
next