Home

SWF Scout

SWF Scout screenshot (click to enlarge)



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)


Products  |  Download  |  Purchase  |  Support  |  Contacts  |  Testimonials |  

ByteScout, 2003-2008. All other company and product names may be trademarks of their respective companies. Privacy Statement