When I define an image tag and use ( xlink:href="myimage.png" ) as an attribute, the resulting image is not positioned correctly according to the x and y specified in the tag.
I briefly reviewed the code (SVGImage.as) and added the x and y positioning as follows:
public function loadURL(url:String):void
{
if (_loader != null)
{
content.removeChild(_loader);
_loader = null;
}
if (url != null)
{
_loader = new Loader();
_loader.x = int(svgX); // ADDED
_loader.y = int(svgY); // ADDED
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
loadError);
_loader.load(new URLRequest(url));
content.addChild(_loader);
}
}
This does appear to correct the issue, but is it the right solution?
When I define an image tag and use ( xlink:href="myimage.png" ) as an attribute, the resulting image is not positioned correctly according to the x and y specified in the tag.
I briefly reviewed the code (SVGImage.as) and added the x and y positioning as follows:
This does appear to correct the issue, but is it the right solution?