You can download the source code of this example here: swfslideshowscout_asp_net.zip
This page contains step by step tutorial how to create SWF flash animation file in ASP.NET using SWF SlideShow Scout library.
‘Put user code to initialize the page here
Dim SlideShow
Dim Size As Long
Dim MemoryImage As System.Array
SlideShow = CreateObject(“SWFSlideShowScout.SlideShow”)
‘ initialize library
SlideShow.InitLibrary(“demo”, “demo”)
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)
‘ get size of generated in-memory swf file
Size = SlideShow.BinaryImageSize
‘ create new buffer with size equal to generated swf file
Dim Buffer(CInt(Size)) As Byte
‘ get in-memory slideshow file as byte stream
MemoryImage = SlideShow.BinaryImage
‘ copy byte stream into buffer
Array.Copy(MemoryImage, Buffer, Size)
‘ clear http output
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=slideshow.swf”)
‘ write the buffer with swf file to the output
Response.BinaryWrite(Buffer)
Response.End()
‘ disconnect from library
SlideShow = Nothing