Home

SWF Scout

SWF Scout screenshot (click to enlarge)



SWF Scout ActiveX/NET library

How to replace links in the existing SWF flash movie using SWF Scout library

SWF Scout library is capable of replacing text in actionscript string variables and values in existing flash movies. For example, this can be used to replace all links from one URL to another.

In this example we will take existing flash movie with button and will replace all links to http://www.myurl.com to http://www.bytescout.com/

IMPORTANT: clicking on button may not work on some browsers like Internet Explorer as they forbid opening a links in flash movies by default

Download source code of this example: swfscout_replacing_url_in_swf_template.zip(2KB)

Source flash movie (ButtonWithURL.swf) with button (with actionscript assigned to "press" event) and text edit (before replacement):

Source code of replacement a) links www.myurl.com in actionscript to www.bytescout.com; b) replacing www.myurl.com to www.bytescout.com in all text edit objects:

Set Movie = CreateObject("SWFScout.FlashMovie")

Movie.InitLibrary "demo","demo"

Movie.BeginMovieFromTemplate "PARSEACTIONS://ButtonWithURL.swf",true

Movie.AddTemplateRule_Text "www.myurl.com","www.bytescout.com (replaced)",false
Movie.AddTemplateRule_Text "VARINACTIONSCRIPT://http://www.myurl.com","http://bytescout.com",true
i = Movie.ProcessTemplateRules

Movie.EndMovie

Movie.SaveToFile "ButtonWithURL_ReplacedURL.swf"

Produced flash movie (ButtonWithURL_ReplacedURL.swf)

Download source code of this example: swfscout_replacing_url_in_swf_template.zip(2KB)

Download Free Trial Buy Now More Information

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