Tutorial: how to create slide show flash movie using SWF SlideShow Scout library and ASP (on ASP web-server) - ByteScout

Tutorial: how to create slide show flash movie using SWF SlideShow Scout library and ASP (on ASP web-server)

  • Home
  • /
  • Articles
  • /
  • Tutorial: how to create slide show flash movie using SWF SlideShow Scout library and ASP (on ASP web-server)

How to create SWF flash slideshow with effects with
SWF SlideShow Scout library installed on ASP web-server

“Hello, World!” example 

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

This page provides a quick tutorial for getting started with generating of SWF flash slide show animation movie using SWF SlideShow Scout library in ASP

 

IMPORTANT NOTE: To use SWF SlideShow Scout library generating slidshow movies “on-the-fly”on the web-server you have to have additional “Web License”
 
SWF SlideShow Scout is capable of generating slideshow movie and keep it in memory without using temporary files so generated slideshow file needn’t to be stored as a file on a hard drive and can be streamed directly to the browser window. 
  
1) Install SWF SlideShow Scout library on your computer and create “CreateSWFSlideShow.asp” file in the notepad. CreateSWSlideShow.asp will generate SWF file and return it as a stream. 
Insert the following code into “CreateSWFSlideShow.asp
<%
Set SlideShow = CreateObject(“SWFSlideShowScout.SlideShow”)

‘ initialize library
SlideShow.InitLibrary “demo”, “demo”

‘ set option to generate in-memory flash document movie
SlideShow.GenerateInMemoryFile = true

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

‘ get generated SWF as binary image
SWFImage = SlideShow.BinaryImage

‘ clear the output stream
response.Clear
‘ set the content type to SWF

response.ContentType = “application/x-shockwave-flash”

‘ add content type header

response.AddHeader “Content-Type”, “application/x-shockwave-flash”

‘ set the content disposition
response.AddHeader “Content-Disposition”, “inline;filename=HelloFlashPresentationDocument.swf”

‘ write the binary image to the Response output stream
response.BinaryWrite SWFImage
response.End

‘ disconnect from library
Set SlideShow = Nothing
%>

 
2) Now use Notepad to create HTML file that will display a flash movie animation, “HelloWorld.html“. Insert the following HTML code into “HelloWorld.html“:
 
<HTML>
<HEAD>
<TITLE>Hello, World!</TITLE>
</HEAD>
<BODY bgcolor=”#ffffff”>
<CENTER>
<OBJECT classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ 
codebase=”http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0″
ID=”SWF” WIDTH=”100%” HEIGHT=”100%” VIEWASTEXT>
<PARAM NAME=”movie” VALUE=”CreateSWFSlideShow.asp”>
<PARAM NAME=”quality” VALUE=”best”>
<PARAM NAME=”bgcolor” VALUE=”#ffffff”>
</EMBED>
</OBJECT>
</CENTER>
</BODY>
</HTML>
 
Place both “CreateSWFSlideShow.asp” and “HelloWorld.html” files into the same folder on web-server. (This folder is C:Inetpubwwwroot by default in IIS on Windows 2000 and XP)
 
3) Now open “http://localhost/HelloWorld.html” (or “http://<your_webserver_name>/HelloWorld.html“) in Internet Explorer browser. You will see the generated flash movie in a browser window:
 
 
 
You can download the source code of this example here: swfslideshowscout_asp.zip

Tutorials:

prev
next