Hi all

 

I am using Loadermax to load an array of swf files into a Gaia project file,
this all works fine but I would like to know how I would go about creating a
link for each swf file and adding other information externally such as
captions? Here is my code

 

 

                //create an array of image file names

                                                var urls:Array =
["brakes.swf",

 
"hp_xmas.swf",

 
"drambuie.swf",

 
"ftfe.swf",

 
"hillbillyAnim.swf"

 
];

 


 


                                                

                                                //create the LoaderMax queue
into which we'll put the ImageLoaders

                                                _queue = new
LoaderMax({name:"childQueue", requireWithRoot:this.root, maxConnections:1,
onChildComplete:_childCompleteHandler});

                                                

                                                //loop through the file
names, create an SWFLoader and place it on the stage using special
properties like x, y, width, height, etc. The images will also be scaled to
fit within the width/height defined.

                                                for (var i:int = 0; i <
urls.length; i++) {

 
_queue.append( new SWFLoader(urls[i], {

 
container:this,

 
x:(i % 4) * 240, 

 
y:int(i / 4) * 180 + 60, 

 
width:220, 

 
height:160, 

 
bgColor:0x141414}) );

                                                }

                                                

                                                

                                                

                                                //prepend all of the urls in
the LoaderMax instance with "assets/swf"

 
_queue.prependURLs("assets/swf/");

                                                

                                                //start loading

                                                _queue.load();

                                }

                                

//---- EVENT HANDLERS
----------------------------------------------------------------

                                

                                function
_childCompleteHandler(event:LoaderEvent):void {

                                                TweenMax.to(event.target,
0.5, {delay:1, ease:Circ.easeInOut});

                                                trace("loaded" +
event.target);

                                }

 

 

 

Many thanks in advance!

 

 

Marco Terrinoni - Director
MULARAM  PRODUCTIONS
web design // animation // illustration
uk: +44 7876 652 643
e:  <mailto:ma...@mularam.com> ma...@mularam.com  
w:  <http://www.mularam.com/> www.mularam.com 

 

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to