Tutorial: how to create a flash slideshow from JPG images using SWF SlideShow Scout library in Javascript - ByteScout

Tutorial: how to create a flash slideshow from JPG images using SWF SlideShow Scout library in Javascript

  • Home
  • /
  • Articles
  • /
  • Tutorial: how to create a flash slideshow from JPG images using SWF SlideShow Scout library in Javascript
Quick Guide: How to create SWF flash slideshow animation
movie from JavaScript using SWF SlideShow Scout lib

“Hello, World!”example

 

You can download the source code of this example here: swfslideshowscout_javascript.zip

SWF SlideShow Scout library can be used in scripting languages that support ActiveX/COM objects: Javascript, VBScript, Visual Basic scripted language. This page will demonstrate how to make SWF slideshow flash animation movie using Javascript and SWF SlideShow Scout library.

 
Windows 98/2000/ME/XP provides built-in JavaScript support and all files with “.js” are recognized as JavaScript scripting files and can be executed by system by double-clickin on them in Explorer.
 
1) Install SWF SlideShow Scout library on your computer
 
2) Run Notepad
 
3) To create SWF flash animation movie in JavaScript we have to write a very simple script:

var SlideShow = WScript.CreateObject(‘SWFSlideShowScout.SlideShow’);

SlideShow.InitLibrary(‘demo’, ‘demo’);
SlideShow.BeginSlideShow (320, 240);

// slide #1, show with “stetMosaicLarge” effect (11 = stetMosaicLarge), 1000 msec
SlideShow.AddSlideFromFileName (‘Slide1.jpg’, 11, 1000);
SlideShow.AddDelay (1000);

// slide #2, show with “stetBlur” effect (6 = stetBlur), 1000 msec
SlideShow.AddSlideFromFileName (‘Slide2.jpg’, 6, 1000);
SlideShow.AddDelay (1000);

// slide #3, show with “stetZoomCircle” effect (29 = stetZoomCircle), 1000 msec
SlideShow.AddSlideFromFileName (‘Slide3.jpg’, 29, 1000);
SlideShow.AddDelay (1000);

// slide #4, show with “stetLiquid” effect (37 = stetLiquid), 1000 msec
SlideShow.AddSlideFromFileName (‘Slide4.jpg’, 37, 1000);
SlideShow.AddDelay (1000);

// slide #5, show with “stetShuttersBias” effect (16 = stetShuttersBias), 1000 msec
SlideShow.AddSlideFromFileName (‘Slide5.jpg’, 16, 1000);
SlideShow.AddDelay (2000);

// save slideshow to file
SlideShow.SaveToFile(‘HelloWorld.swf’);

 
Feel free to copy the code from this page, paste into the notepad and save  as a “HelloWorld.js”
4) Double-click “HelloWorld.js” file from Explorer or from another file manager and the script will be executed.
 
You can view the generated flash slideshow (.SWF) using Internet Explorer or another application that is capable of viewing and playing of  flash animations.
 
 
You can download the source code of this example here: swfslideshowscout_javascript.zip

Tutorials:

prev
next