>
> What's the error?
>
> No image appearing? (You haven't used addChild() anywhere.)
Well, what I have my main class, PondoShow that extends Sprite. In here I
instantiate a Slide object, passing in a bunch of parameters:
slides = new Array(4);
slides[0] = new Slide("This is a test", "this is only a test",
"img/food_array.jpg", "Click here to find out more", "more.html", 100, 100,
50, 50, 200, 200);
slides[1] = new Slide("This is a test", "this is only a test",
"img/food_array2.jpg", "Click here to find out more", "more.html", 100, 100,
50, 50, 200, 200);
Inside the slide object constructor I instantiate the variables and then,
still inside the constructor of the Slide object:
this.imagePath = new URLRequest(this.imagePathString);
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT,
imageLoaded);
loader.load(this.imagePath);
}
private function imageLoaded(ev:Event):void {
trace("inside imageLoaded function");
imgload = true;
}
My PondoShow class does this:
while(true) {
if (slides[slideCounter].imgload) {
addChild(slides[slideCounter].loader.content);
break;
}
}
but in the loop, the if statement is never true, and the imageLoaded
function never gets called in the Slide class and eventually the loop times
out or I kill it.
>
> imageLoaded() never getting called? (Probably a red herring, but you
> really should add the listener _before_ you call load()).
>
Good idea. Certainly more readable at the very least. Unfortunately
changing this did not solve my issue though.
>
> Give us some more info, then we might be able to help.
>
> Ian
>
Thanks for any help.
Kevin
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders