Home
We need your feedback!

SWF Scout

SWF Scout screenshot (click to enlarge)


Subscribe to Our Bi-Monthly Newsletter (tips, new releases, specials):
 Subscribe in a reader
 PRODUCTS  |  DOWNLOAD  |  PURCHASE  |  SUPPORT  |  TESTIMONIALS   |  NEWS  | 

SWF Scout ActiveX/NET library

Quick Guide: How to create SWF flash animation movie from VBScript ("Hello, World!"example)
 

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

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

 
Windows 98/2000/ME/XP have built-in VBScript support and all files with ".VBS" are recognized as VBScript files and can be executed by system.
 
1) Install SWF Scout library on your computer
 
2) Run Notepad
 
3) To create SWF flash animation movie in VBScript we have to write a very simple script:
 W = 640 ' width
 H = 480 ' height
 Set Movie = CreateObject("SWFScout.FlashMovie")
 Movie.InitLibrary "demo", "demo"
 Movie.BeginMovie 0, 0, W, H, 1, 12, 6
 Movie.SetBackgroundColor 255, 255, 255 ' set background color to white
 
 Font = Movie.AddFont("Arial", 18, True, False, False, False, 0) ' add font
 ' create and place text
 Text = Movie.AddText("Hello, World!", 0, 0, 0, 255, Font, 0, 100, 250, 160)
 Movie.PlaceText Text, Movie.CurrentMaxDepth ' place text into current depth
 Movie.PLACE_FadeOut 0.5 ' fade out text
 Shape = Movie.AddShape ' add new shape
 Movie.SHAPE_Rectangle 0, 140, 150, 285 ' draw rectangle
 Movie.SHAPE_SetSolidColor 50, 255, 50, True, 255 ' set solid fill for shape
 
 Movie.PlaceShape Shape, Movie.CurrentMaxDepth ' place shape into current depth
 Movie.ShowFrame 10 ' show 10 frames
 Movie.EndMovie ' end movie generation
 Movie.SaveToFile "shapes.swf" ' save file
 ' disconnect from library
 Set Movie = Nothing
 
Feel free to copy code from this page, paste into the notepad and save  as a "HelloWorld.VBS":
 
4) Double-click "HelloWorld.VBS" file from Explorer or from another file manager and script will be executed.
 
You can view generated flash file (.SWF) using Internet Explorer or another application that is capable of viewing and playing of  flash animations.
 
Flash movie created using VBScript and SWF Scout
 
You can download the source code of this example here: swfscout_vbscript.zip
 


HOME  |  CONTACT US

Copyright © ByteScout, 2003-2010. Privacy Statement
Microsoft®, Windows®, Windows 2000®, Windows Server®, Windows Vista®, Internet Explorer®, .NET Framework®, ActiveX®, Visual Basic®, Visual C#®, ASP®, ASP.NET®, Excel®, PowerPoint®, are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Adobe®, Flash® and Acrobat® are registered trademarks of Adobe Systems, Incorporated. Mozilla®, Firefox® and the Mozilla and Firefox Logos are registered trademarks of the Mozilla Foundation. Other product names or brandnames used herein are for identification purposes only and might be trademarks or registered trademarks of their respective companies. We disclaim any and all rights to those marks.