How to make a MovieClip from image thats loading from XML


how make movieclip image thats loading xml? , how put images in designated place on flash worksheet , , turn movie clip or button?

as3

var urlloader:urlloader = new urlloader();
urlloader.addeventlistener(event.complete,f);
urlloader.load(new urlrequest("images.xml"));

var ldr:loader = new loader();

function f(e:event){
    var xml = xml(urlloader.data);
    ldr.load(new urlrequest(xml.image.attribute("url")));
}

 

xml
<images>
<image url="image1.jpg"/>
</images>

@kglad

you can't turn loader movieclip can add loader movieclip parent using addchild:

 

var mc:movieclip=new movieclip();

 

function f(e:event):void{

mc.addchild(ldr);

}



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

Info.Plist

Catalog issues