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

Since version 1.40 SWF Scout provides an ability to use built-in ActionScript compiler to compile AS source code (requires optional AS License). However you can use the compiled bytecode without optional AS License

Download ZIP with source code (swfscout_keypress_as.zip, 3KB)

Generated flash movie:

' TO USE BUILT-IN ACTIONSCRIPT COMPILER YOU HAVE TO HAVE ADDITIONAL "AS LICENSE"

  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,0)
Text = Movie.AddText("Click on button to open web-site",0,0,0,255,Font, 0, 80, 170, 160)
Movie.PlaceText Text,Movie.CurrentMaxDepth ' place text
  Shape = Movie.AddShape
  Movie.SHAPE_Circle 0, 0, 40
  Movie.SHAPE_BeginRadialGradient
  Movie.SHAPE_AddRadialGradientColor 255,255,255,255
  Movie.SHAPE_AddRadialGradientColor 0,0,255,255
  Movie.SHAPE_EndRadialGradient 35,35
Sprite = Movie.AddSprite
Movie.SPRITE_PlaceShape Shape, 1
Movie.PlaceSprite Sprite, 2
Movie.PLACE_SetTranslate 200, 150

sCode = "onClipEvent(keyDown){switch (Key.getCode()){case Key.LEFT:{this._x -= 1;break;}case Key.RIGHT:{this._x += 1;break;}case Key.UP:{this._y -= 1;break;}case Key.DOWN:{this._y += 1;break;}}}"

MsgBox sCode

Movie.PLACE_CompileEvent sCode
MsgBox Movie.ASCompilerLog
Movie.ShowFrame 1
Movie.EndMovie

Movie.SaveToFile "KeyPress_AS.swf"

See also: How to implement and use complex actionscripts

Download ZIP with source code (swfscout_keypress_as.zip, 3KB)



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.