Use Array Batch to Load External Pictures

It is a little bit complex to load external pictures with loadmovie function. Using array batch can make it much easier.


Series: SWF Quicker 2.0

1. Prepared work: load all pictures in a new folder. Use "acdsee" to open this folder. Select all pictures and choose Rename in editing menu. As the following illustration shows, use the default options "use template to rename files", "use numbers to replace #'s", "start at", etc. All the pictures will be renamed according to "Rename Template".



2. Launch SWF Quicker 2.0. Set the size of the canvas as Width: 640; Height: 480.
Draw a rectangle and convert it into a new movie clip symbol, make seven copies of it. Why seven? Because we have eight pictures to load totally. Please lay them as follows:



Rename them as mc1, mc2……mc8.

Write following script in frame 1:

Code:
pic = new Array();
for (var i=1; i<9; i++) {
  pic[i] = "t"+i+".jpg";
  loadMovie(pic[i]£¬ "mc"+i);
}

Click arraybatch.rar (97.98 KB) to download the source code.

 

Back to Top >>

Home

Sothink is a trademark of SourceTec Software Co., LTD.
Flash is a trademark of Adobe.
Sothink Software: Flash to HTML5 Logo Maker

1234