# How to change image proporties by XML loading?

**URL:** https://forum.kirupa.com/t/how-to-change-image-proporties-by-xml-loading/299260
**Category:** flash
**Created:** [November 2, 2009, 9:27am UTC](https://forum.kirupa.com/t/how-to-change-image-proporties-by-xml-loading/299260 "2009-11-02T09:27:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![qRTe](https://avatars.discourse-cdn.com/v4/letter/q/dfb087/32.png) [@qRTe](https://forum.kirupa.com/u/qRTe)
#### Post date: [November 2, 2009, 9:27am UTC](https://forum.kirupa.com/t/how-to-change-image-proporties-by-xml-loading/299260/1 "2009-11-02T09:27:25Z")

</div>

I want to load an image, and then change widht and height of this .jpg. So I’m making something like this:

```auto

_imageSprite = new Sprite();
            
var imgRequest:URLRequest = new URLRequest( "data/image.jpg" );

var imgLoader = new Loader();

_imageSprite.addChild( imgLoader );

imgLoader.load( imgRequest );
imgLoader.addEventListener( IOErrorEvent.IO_ERROR , function( e:IOErrorEvent ):void { trace( e ); } );  

stage.addChild( _imageSprite );

```

Then when I try to change \_imageSprite .x or .y properties it’s working. But when I change width or height, the image is hiding? It’s just not in the screen.

Even if I try to get \_imageSprite.widht, I’m getting 0? Why?

Maybe I’m doing something wrong? Because I need to get width and height of this image. Also to change this properties.
