Home

SWF Scout

SWF Scout screenshot (click to enlarge)



SWF Scout ActiveX/NET library

How to replace movieclips in the existing flash movie to movieclips loaded from external SWF file using SWF Scout library

Download source code of this example (including source FLA and SWF files):
swfscout_replacing_movieclips_in_flash_template.zip
(200KB)

Source SWF template MyTemplate.swf (compiled from MyTemplate.fla):

Red square is a movieclip with a name "image1"

We will replace "image1" movieclip with SWF movieclip from shapes.swf file
We also will replace some text in text edits

Source code (ProcessSWFTemplate_ReplaceSprites.vbs):

Set Movie = CreateObject("SWFScout.FlashMovie")

Movie.InitLibrary "demo","demo"

Movie.BeginMovieFromTemplate "MyTemplate.swf",true

Movie.AddTemplateRule_Text "REPLACEME1","SUCCESSFULLY REPLACED",true
Movie.AddTemplateRule_Text "REPLACEME2","SUCCESSFULLY REPLACED TOO",true
Movie.AddTemplateRule_Image "image1","Shapes.swf", 4 ' 4 is a fit mode so movieclip will be fitted to rectangle of replaced image
i = Movie.ProcessTemplateRules

Movie.EndMovie

Movie.SaveToFile "ProcessedTemplate_ReplaceSprites.swf"

Produced file (ProcessedTemplate_ReplaceSprites.swf)

Download source code of this example (including source FLA and SWF files):
swfscout_replacing_movieclips_in_flash_template.zip
(200KB)


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

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