Hi Coders, I have this problem, I have this code for a viewer, some sort of slide show, everything works fine, but the part of the complete, I don't know but seems fine for me, when it come to that code, it can't add the child, why?

this is my code.

I hope you could help me out.


Gus:)

//hacemos los loaders//
var pic1:Loader= new Loader;
var pic2:Loader= new Loader;
var pic3:Loader = new Loader;
var pic4:Loader = new Loader;

//hacemos el request//
var pic1Req:URLRequest = new URLRequest("http:// fuentedeluzysalvacion.org/images/pic1.jpg"); var pic2Req:URLRequest = new URLRequest("http:// fuentedeluzysalvacion.org/images/pic2.jpg"); var pic3Req:URLRequest = new URLRequest("http:// fuentedeluzysalvacion.org/images/pic3.jpg"); var pic4Req:URLRequest = new URLRequest("http:// fuentedeluzysalvacion.org/images/pic4.jpg");


//leemos el request//
pic1.load(pic1Req);
pic2.load(pic2Req);
pic3.load(pic3Req);
pic4.load(pic4Req);


this.pic1.addEventListener(Event.COMPLETE, onComplete); // this is the part of the problem//
function onComplete(evt:Event):void{
//add el child//
this.addChild(pic1);
this.gotoAndPlay(2);
}

pic1.x=0;
pic1.y=0;




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

Reply via email to