Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More
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!
This page will teach how to use Visual C# and SWF SlideShow Scout library to create “Hello, World!” flash slideshow movie (.SWF) from JPG images
1) Install SWF SlideShow Scout library on your computer and run Microsoft Visual Studio.NET
Go to New menu and click Project… to create new Visual C# project
The New Project Wizard will appear. Select Windows Application in Visual C# Projects group:
2)Visual C# will create a new empty project:
3) To use SWF SlideShow Scout library in Visual C# application we should add the reference to SWF SlideShow Scout. Select Project in the main menu and then select Add Reference command:
Switch to COM tab and find SWF SlideShow Scout library in the list of available ActiveX/COM objects:
Click Select button to add the reference to SWF SlideShow Scout library and click OK:
4) Double-click on form Form1 to create the Form1_Load procedure (this procedure will be execute on Form1.OnLoad event):
The source code editor window will appear:
5) The following code snippet generates simple “Hello, World!” SWF flash movie and saves it into “c:shapes.swf” file:
SWFSlideShowScout.SlideShow SlideShow = new SWFSlideShowScout.SlideShow();
// initialize library
SlideShow.InitLibrary (“demo”, “demo”);
// start slide 320×240 show
SlideShow.BeginSlideShow (320, 240);
// slide #1, show with “stetMosaicLarge” effect, 1000 msec
SlideShow.AddSlideFromFileName (“Slide1.jpg”, SWFSlideShowScout.SlideTransitionEffectType.stetMosaicLarge, 1000);
SlideShow.AddDelay (1000);
// slide #2, show with “stetBlur” effect, 1000 msec
SlideShow.AddSlideFromFileName (“Slide2.jpg”, SWFSlideShowScout.SlideTransitionEffectType.stetBlur, 1000);
SlideShow.AddDelay (1000);
// slide #3, show with “stetZoomCircle” effect , 1000 msec
SlideShow.AddSlideFromFileName(“Slide3.jpg”, SWFSlideShowScout.SlideTransitionEffectType.stetZoomCircle, 1000);
SlideShow.AddDelay (1000);
// slide #4, show with “stetLiquid” effect, 1000 msec
SlideShow.AddSlideFromFileName(“Slide4.jpg”, SWFSlideShowScout.SlideTransitionEffectType.stetLiquid, 1000);
SlideShow.AddDelay (1000);
// slide #5, show with “stetShuttersBias” effect, 1000 msec
SlideShow.AddSlideFromFileName(“Slide5.jpg”, SWFSlideShowScout.SlideTransitionEffectType.stetShuttersBias, 1000);
SlideShow.AddDelay (2000);
// save to flash movie file
SlideShow.SaveToFile(“HelloWorld.swf”);
MessageBox.Show(“Slideshow saved to HelloWorld.swf file”);
Hint:
You can simply copy the source code from the snippet above and paste into Visual C# source code editor:
6) Press F5 to run the application (you can also use “Debug” | “Start” menu command) and Visual C#.NET will run the application:
The application will create “Hello, World!” flash slideshow animation movie from JPG images (slide1.jpg, slide2.jpg etc) and save it into “SlideShow.swf” flash file.
You can view generated flash animation using any application that can play flash movies: Internet Explorer, Mozilla Firefox or other flash compatible browser.