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));
}
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));
}