Home
Suggestion or Comment?

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

See also: How to implement and use complex actionscripts

Important: since version 1.40 SWF Scout library provides support for built-in ActionScript compiler to compile AS source code (requires optional AS License). Check example

Generated flash movie:

' ActionScript.vbs

 
  W = 640
  H = 480
  Set Movie = CreateObject("SWFScout.FlashMovie")
  Movie.InitLibrary "demo","demo"
 
' Movie creating and setting parameters
 
  Movie.BeginMovie 0,0,W,H,1,12,6
  Movie.Compressed = true
  Movie.SetBackgroundColor 255,255,255
 
 Font = Movie.AddFont( "Arial",12,true,false,false,false,0)
 FontBig = Movie.AddFont("Arial",40,true,false,false,false,DEFAULT_CHARSET)
 
'================
' ACTIONS
'=================
' Moving ball responds on click
 
 
 Text = Movie.AddText ("Click on moving ball using mouse! Click count: ",0,0,0,255,Font, 0, 70, 600, 160)
 Movie.PlaceText Text,Movie.CurrentMaxDepth ' place text
 
 Text= Movie.AddTextEdit ("EditText","0",255,100,0,255,Font,450,70,500,120)
 Movie.TEXT_ReadOnly= false
 Movie.TEXT_NoSelect= false
 Movie.PlaceText Text,Movie.CurrentMaxDepth
 
 Shape = Movie.AddShape
 Movie.SHAPE_Circle 0, 0, 20
 Movie.SHAPE_BeginRadialGradient
 Movie.SHAPE_AddRadialGradientColor 255,255,255,255
 Movie.SHAPE_AddRadialGradientColor 102,102,102,255
 Movie.SHAPE_EndRadialGradient 35,35
 
 Button = Movie.AddButton (false,true)
 Movie.BUTTON_AddShape Shape,0
 Movie.BUTTON_AddShape Shape,2
 Movie.BUTTON_AddShape Shape,3
 Movie.BUTTON_AddShape2 Shape,1,1,1,0,0,0,0,0,0,100,0,0,255,true
 
 Action= Movie.AddScript
 
 Movie.SCRIPT_Push "EditText"
 Movie.SCRIPT_GetVariable "EditText"
 Movie.SCRIPT_AddAction 75 ' sacttToInteger action ID is 45
 Movie.SCRIPT_Push 1
 Movie.SCRIPT_AddAction 1 ' sacttAdd2 action ID is 1
 Movie.SCRIPT_AddAction 59 ' sacttSetVariable action ID is 59
 
 Movie.BUTTON_SetScriptOnEvent 3,Action ' set action on button Release
 
 Movie.PlaceButton Button,Movie.CurrentMaxDepth
 Movie.PLACE_SetTranslate 200,200
 Movie.PLACE_Name = "but"
 
 Movie.ShowFrame 1
 
 Action= Movie.AddScript
 
 Movie.SCRIPT_Push 1
 Movie.SCRIPT_Push "but"
 Movie.SCRIPT_Push 0 ' PosX property ID is 0
 Movie.SCRIPT_Push "but"
 Movie.SCRIPT_Push 0  ' PosX property ID is 0
 Movie.SCRIPT_AddAction 28 ' sacttGetProperty action ID is 28
 Movie.SCRIPT_Random 7,15
 Movie.SCRIPT_AddAction 1 'sacttAdd2 action ID is 1
 Movie.SCRIPT_AddAction 57 'sacttSetProperty action ID is 57
 
 Movie.SCRIPT_Push "but"
 Movie.SCRIPT_Push 1 ' PosX property ID is 1
 Movie.SCRIPT_Push "but"
 Movie.SCRIPT_Push 1 ' PosX property ID is 1
 Movie.SCRIPT_AddAction 28 ' sacttGetProperty action ID is 28
 Movie.SCRIPT_Random 7,15
 Movie.SCRIPT_AddAction 1 'sacttAdd2 action ID is 1
 Movie.SCRIPT_AddAction 57 'sacttSetProperty action ID is 57
 
 
 Movie.SCRIPT_GotoFrame2 true,0
 
 Movie.SetFrameActions Action
 
 Movie.ShowFrame 1
 
 Movie.EndMovie
 

 Movie.SaveToFile "ActionScript.swf"

See also: How to implement and use complex actionscripts



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.