Aspose.Flash has introduced a new feature to convert an existing SWF file to an EXE (Projector) file. A new overload has been introduced for the Write method in FlashContainer class. This method requires two parameters: file name and path to the standalone player. The first parameter is the name of the output EXE file, whereas the second parameter requires a complete path to a standalone flash player (FlashPlayer.exe or SAFlashPlayer.exe). The standalone player will be used to create the executeable file.
You can use the following two steps to convert an SWF file to an EXE file:
- Create FlashContainer object and load input flash movie
- Save output EXE file using Write method of FlashContainer
[C#]
//create FlashContainer object and open SWF file
Aspose.Flash.Swf.FlashContainer flash = new Aspose.Flash.Swf.FlashContainer("test.swf");
//save output file as an executeable using the Flash Player
flash.Write("output.exe", @"D:\Software\flashplayer.exe");
[VB.NET]
'create FlashContainer object and open SWF file
Dim flash As New Aspose.Flash.Swf.FlashContainer("test.swf")
'save output file as an executeable using the Flash Player
flash.Write("output.exe", "D:\Software\flashplayer.exe")