You should have a custom movieclip (component) that does all that automatically.
So instead of doing:
var loader:Loader = new Loader();
walkerMc.figure.head.imgholder.addChild(loader);
loader.load(new URLRequest(theURL+"img/"+xml..epic[usrNr-1].text()));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleComplete,false,
0, true);
you could have:
var img:SmoothImage = new SmoothImage();
img.source = "path_to_image.jpg";
img.width = 45;
img.height = 45;
walkerMc.figure.head.addChild(img);
where SmoothImage is a custom component that loads the image and once loaded, creates a Bitmap copy (with smoothing) and removes the
loaded image.
regards,
Muzak
----- Original Message -----
From: "Irene Johansson" <[EMAIL PROTECTED]>
To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com>
Sent: Monday, February 04, 2008 1:28 PM
Subject: Re: [Flashcoders] Dynamic upload of bunch of images
withautomaticsmooth.
Thank you for replies BUT. :)
If i use mr. Muzaks code, i dont know how can i add my new image into right
movieclip
I need to add child to walkerMc.figure.head.imgholder.
The handleComplete is triggered when an image is loaded.
I am parsing the XML file, looping through nodes, some have images, some
dont, some pictures are bigger(load slower), some smaller(load faster).
How can i add the new child to right target?
Hope you can understand what i am talking about :)
Thanks Irene
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders