PDA

View Full Version : Wierd issue with images not showing up when testing online



0L4F
December 8th, 2009, 09:24 AM
Hi Kirupians,

I'm running into a very strange issue when testing an application I'm building online: loaded images aren't showing.

When testing locally everything works fine.

I'm retrieving the images from an Adobe Scene7 server, and there's a crossdomain.xml in place there with the correct entries. I'm getting the right bytesLoaded and bytesTotal. I'm not getting an IOError Event.

What could be wrong?

Here's a piece of the offending code: (I replaced Event.COMPLETE with Event.INIT, hoping it might make a difference, but it doesn't)
loader.contentLoaderInfo.addEventListener(Event.IN IT, onImageComplete);
loader.contentLoaderInfo.addEventListener(IOErrorE vent.IO_ERROR, onIOError);

private function onImageComplete(event:Event):void {
loader.contentLoaderInfo.removeEventListener(Event .INIT, onImageComplete);
loader.contentLoaderInfo.removeEventListener(IOErr orEvent.IO_ERROR, onIOError);

bmp = event.target.content;
bmp.smoothing = true;
bmp.width = nWidth;
bmp.height = nHeight;
imageHolder.addChild(bmp);

TweenMax.to(imageHolder, 1, {alpha:1});

dispatchEvent(new Event("IMAGE_COMPLETE", true));
}

kadaj
December 8th, 2009, 01:21 PM
did you add the imageHolder to the stage

0L4F
December 8th, 2009, 07:17 PM
Hi jase21,

thanks for your reply.
As I said, the only difference is that things work locally, but not when deployed to a server. It turns out to be a problem with Flash ignoring the crossdomain.xml file. I seem to be doing something wrong there.

That's the reason I don't have direct access to Loader.content or Loader.contentInfo.content. I'll make a new thread about that...