Hello all you fine people!
I have a big problem with uploading smooth images.

What I do is, i load XML file, parse it loop through it, create movieclips,
and load images into thos movieclips (if image is specified in xml)

for(var k:Number=1; k<=itemNr; k++){
usrNr++;
var walker1:MovieClip = new walker();
walker1.x = k*150+ Math.random()*40;
//walker1.y = Math.random()*5;
walker1.name = "walker"+k;
walker1.i = i;
walker1.k = k;
this["row"+i].addChild(walker1);
var walkerMc:MovieClip = this["rad"+i].getChildByName("walker"+k) as
MovieClip;
if(xml..epic[usrNr-1].text()!= undefined){
//upload picture
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);
}else{
//show random face
walkerMc.figure.head.faces.gotoAndStop(xml..spic[brukerNr-1].text());
}

}



function handleComplete(event:Event){
var ldr:Loader = LoaderInfo(event.currentTarget).loader as Loader;
ldr.contentLoaderInfo.content.width=43;
ldr.contentLoaderInfo.content.height=43;


var image:Bitmap = Bitmap(ldr.contentLoaderInfo.content);
image.smoothing = true;

}



I get to load images, but they are not allways smooth :(
What am i doing wrong :(

Thanks in advance
Irene
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to