PPT TO FLASH

Create Flash From Power-Point in C#

DOWNLOAD SOURCE HERE

Introduction:

In this article we will learn how to convert powerpoint slieds to flash movie.

Background:

Today we lot need flash content on our website for design. We can develop such content using flash technologies also but if we got our powerpoint slides as flash then we can develop our flash as our wish.

To do this task I’m using iSpring SDK which will convert our powerpoint slides to flash. Before starting our work just download iSpring SDK and install it. Spring SDK is a high performance solution providing web sites and online applications with automatic PowerPoint to Flash conversion facilities. It is optimized for multithreaded processing and performs fast batch conversion of thousands of PowerPoint presentations into compact and web-friendly Flash movies. For converting our powerpoint to flash follow the step given bellow.

Precaution Before Installing iSpring Setup:

1)    Close all IDE ex.(Visual Studio, C ++ IDE etc…).

2)    Install Flash player.

3)    Now start installing iSpring.

Step 1:

Create new Windows Form Application using C#. Add reference to iSpring Object Library 5.0 from Com tab and design form like bellow.

Step 2:

Import namespace iSpring. In global declearation section of our application declare variables for assigning values in various events of our form option.

string _inputfile, _outputfile, _licensename, _audiofile, _password;

bool _zipoutput, _exeoutput, _fullscreenmode, _flashmenu, _printing, _raster, _smartprocess, _savechart, _pwd, _resolution;

int _width, _height, _screenwidth, _screenheight, _swfversion;

string _backgroundcolor;

Maximum values are collected in bool and string as well as int and this values are collected from the checkbox_CheckChanged, textbox_TextChanged events of our form option. I’ll not explain each and every event here but in attachment you can find out all the option.

Step 3:

iSpring provides different types of flash creation ex. Solid Presentation, Compound Presentation, Stand Alon Presentation etc… With respect to selected presentation we have given different selection option through RadioButtons. Now write following code in Convert button Click event to convert the powerpoint slides to flash movie.

private void btnconvert_Click(object sender, EventArgs e)

{

PresentationConverter converter = new PresentationConverter();

try

{

if (_inputfile != “” && _outputfile != “”)

{

converter.OpenPresentation(_inputfile);

converter.LicenseName = _licensename;

converter.Presentation.SlideWidth = _width;

converter.Presentation.SlideHeight = _height;

converter.Settings.ZipOutput = _zipoutput;

converter.Settings.GenerateExe = _exeoutput;

//converter.Settings.Appearance.BackgroundColor = Convert.ToUInt32(_backgroundcolor);

converter.Settings.Appearance.OptimizeImagesForScreenResolution = _resolution;

if (_resolution == true)

{

converter.Settings.Appearance.ScreenWidth = _screenwidth;

converter.Settings.Appearance.ScreenHeight = _screenheight;

}

else

{

converter.Settings.Appearance.ScreenWidth = 1024;

converter.Settings.Appearance.ScreenHeight = 740;

}

converter.Settings.Appearance.FullScreen = _fullscreenmode;

converter.Settings.Appearance.DisableMenu = _flashmenu;

converter.Settings.Appearance.DisablePrinting = _printing;

converter.Settings.SwfVersion = _swfversion;

if (rbdjpegpng.Checked == true)

{

converter.Settings.Media.ImageQuality = 0;

converter.Settings.Media.JpegImageQuality = 75;

converter.Settings.Media.GifImageQuality = 75;

}

else if (rbdpngonly.Checked == true)

{

converter.Settings.Media.ImageQuality = 0;

converter.Settings.Media.GifImageQuality = 75;

}

converter.Settings.Media.RasterizeChartsAndGraphs = _raster;

converter.Settings.Media.AdvancedSmartArtProcessing = _smartprocess;

converter.Settings.Media.SaveSmartArtObjectsAsPNG = _savechart;

if (_audiofile != null)

{

converter.Presentation.BackgroundAudio.SourceFile = _audiofile;

}

if (_pwd == true)

{

converter.Settings.Protection.AllowDomain = _password;

}

// For solid presentation

if (rbdsolid.Checked)

{

converter.GenerateSolidPresentation(_outputfile +

“Presentation.exe”, “”, “”);

MessageBox.Show(“File Conversion Done”);

}

//For compound Presentation

else if (rbdcompound.Checked)

{

converter.GenerateCompoundPresentation(_outputfile + “Presentation.exe”, “nullskin”, “”);

MessageBox.Show(“File Conversion Done”);

}

// For Stand Alone Presentation.

else if (rbdstandalone.Checked)

{

converter.GenerateStandaloneSlides(_outputfile + “Presentation”, “slide”, “”);

MessageBox.Show(“File Conversion Done”);

}

// For Thumbnails only.

else if (rbdthumbnails.Checked)

{

converter.Presentation.Slides.SaveThumbnails(_outputfile + “Presentation”, “thumb”, ImageFileType.IFT_JPG, 720, 540, 75);

MessageBox.Show(“File Conversion Done”);

}

else

{

MessageBox.Show(“Select Convertion Type”);

}

}

else

{

MessageBox.Show(“Select File”);

}

}

catch (Exception ex)

{

MessageBox.Show(“Error\n Ensure Input File & Output Files Are Specified\n” + ex.Message.ToString());

}

}

private void btnclose_Click(object sender, EventArgs e)

{

this.Close();

}

}

Conclusion:

Using iSpring API we can create flash movies from our powerpoint presentation.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s