Home

SWF Scout

SWF Scout screenshot (click to enlarge)



SWF Scout ActiveX/NET library

Embedding SWF movieclip (sprite) from external SWF file

SWF Scout is capable of embedding existing SWF files into new SWF flash movies. To read the information about SWF file please check SWF file information reading example

This flash movie was generated using shapes.swf and transformations.swf

Download ZIP with source code (swfscout_externalswf.zip, 210 KB)

' External.vbs you can find source code of this example along with required files
' in "Examples\More Examples" sub-folder
  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)

'//////////////////////////
' External SWF
'/////////////////////////

Text = Movie.AddText2 ("External SWF",0,0,0,255,FontBig, W / 2, 60,2)
Movie.PlaceText Text,Movie.CurrentMaxDepth ' place text

ExtSWF= Movie.AddExternalSWF ("Shapes.swf", 3, true) ' 3 is a Sprite mode so external movie is added as sprite and returned value is a sprite index in sprite collection

Movie.PLACE_SetTranslate 0, 0 ' set new position
Movie.PLACE_SetScale 0.5, 0.5 ' we set scale to 0.5

Movie.PlaceSprite ExtSWF, Movie.CurrentMaxDepth

ExtSWF= Movie.AddExternalSWF ("Transformations.swf", 3, true) ' 3 is a Sprite mode so external movie is added as sprite and returned value is a sprite index in sprite collection

Movie.PLACE_SetTranslate W / 2 , 0 ' set new position
Movie.PLACE_SetScale 0.5, 0.5 ' we set scale to 0.5

Movie.PlaceSprite ExtSWF, Movie.CurrentMaxDepth

Movie.ShowFrame 1

Movie.EndMovie
Movie.SaveToFile "ExternalSWF.swf"

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

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