23 March 2012

AS3 Load external flash SWFs into a queue to play in a consecutive sequence

This script imports a text file from the local directory and imports all swfs listed in the text file to play on the stage sequentially, i.e. one after another. Its very useful for banner ads and other animations when you need to be able to slot new ads into the sequence.

You dont need to understand or edit the code at all to use this so I'm not going to post the actual code. Just a download link with some instructions:
  1. Open the bannercontrol.fla and change the stage dimensions to the size you need.
  2. Open swfsequence.swf and add any filenames you need to the sequence
  3. Place any files you want to import into the same folder as the other files and let her rip!

Please see my note in the right hand pane before downloading the files >>>

4 comments:

Unknown said...

Note:
On a Windows Machine, line 11 in the FLA file needs to be:
swfsequence = e.target.data.split("\r");
While on a linux machine, line it needs to be:
swfsequence = e.target.data.split("\n");

Anonymous said...

it is playing when rendering through flash but later when opening through the generated swf, only the first file is playing but not continuing with other swf's

Alexa Alba said...

Very unique and reliable blog. Thanks for sharing your valuable thoughts with us.

eligibility for medicare

Perris W4M said...

Great blog

Post a Comment

Cron Design Studio: Dublin based web design & software development