Getting Started in ASP.NETBytescout SWF To Video SDK

SWF To Video SDK can be used from ASP.NET. This sample for ASP.NET shows how to convert SWF into video (.AVI or .WMV) using SWF To Video SDK.

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
using System.Diagnostics;
using System.IO;

using BytescoutSWFToVideoLib;

namespace Simple
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            String inputSwfFile = Server.MapPath("SlideShowWithEffects.swf");
            String outputAviFile = Path.GetTempPath() + "result.avi";

            // 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 input SWF file
            converter.InputSWFFileName = inputSwfFile;

                // set output AVI video filename
                converter.OutputVideoFileName = outputAviFile;

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

            // Run conversion
            converter.RunAndWait();

            // Show filename of result file

            Response.Clear();
            Response.ContentType = "text/html";

            Response.Write("Result video file:  <b>" + outputAviFile + "</b>");

            Response.End();
        }
    }
}