Issue with MovieClipLoader - onLoadInit

hello.

i’ve come a accross an odd issue with the onLoadInit method of MovieClipLoader in the player version7 versus version8. i have a simple custom class that let’s me load in an image and change the url, etc. not too much more that a wrapper for loading an image.

what is odd is that it works fine on the version8 player but doesn’t work on version7 and however, all of the actionscript used is version7 compatable. i’ll post the code below and then explain what is happening.

[FONT=“Courier New”]import nl.artichoke.mxExtensions.*
import mx.transitions.Tween;
import nl.artichoke.uiElements2.*

class nl.artichoke.uiElements2.AImage extends nl.artichoke.uiElements2.ElementActive {

private var _image:MovieClip;
private var _overlay:ABox;
private var _imageURL:String;


public function AImage(parentClip:MovieClip, level:Number, name:String, imageURL:String, styleObj:Object)
{
	super(parentClip, level, name, "AImage", styleObj);
	_imageURL = imageURL;
	draw();
}

private function draw():Void
{
	drawOverlay(2)
	drawImage(1);
}

private function drawImage(level:Number):Void
{
	_image = _boundingBox.createEmptyMovieClip("_image", level);
	_image._alpha = 0;
	if (_imageURL != null) { this.imageURL =_imageURL; }
}

public function set imageURL(urlString:String):Void
{
	var ref:AImage = this;
	var background_listener:Object = new Object();
	background_listener.onLoadInit = function() 
	{
		ref.__imageWidth = ref._image._width;
		ref.__imageHeight = ref._image._height;
		var alphaTween = new Tween(ref._image, "_alpha", mx.transitions.easing.Regular.easeInOut, ref._image._alpha, 100, ref.__imageFadeTime, true);
		ref._overlay = ref.drawOverlay(2);
		ref.dispatchEvent({type: "onImageLoaded", target: ref});
	}
	var background_mcl = new MovieClipLoader();
	background_mcl.addListener(background_listener);
	background_mcl.loadClip(urlString, _image);
}


private function drawOverlay(level:Number):ABox
{
	var tempInit:Object = {boxBorderSize: 0, boxBorderColor: __imageBorderColor, boxFillColor: __imageOverlayColor, boxWidth: __imageWidth, boxHeight: __imageHeight };
	var box = new ABox(_boundingBox, level, "_overlay", tempInit)
	return box;
}

}[/FONT]

when the image loads, within the onLoadInit callback, the image width and height are unkown in version 7 for some reason, so i end up setting the image size to 0. It seems very odd.

if anyone has some insight into this, it would be greatly appreciated.

thank you,

aaron

hmm, anyone had any ideas about this? thx!