# How to set custom height and width for image loaded with loadClip

**URL:** <https://forum.kirupa.com/t/how-to-set-custom-height-and-width-for-image-loaded-with-loadclip/329283>\
**Category:** flash\
**Created:** [August 8, 2012, 11:42pm UTC](https://forum.kirupa.com/t/how-to-set-custom-height-and-width-for-image-loaded-with-loadclip/329283 "2012-08-08T23:42:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bnair](https://avatars.discourse-cdn.com/v4/letter/b/e95f7d/32.png) [@bnair](https://forum.kirupa.com/u/bnair)\
**Post date:** [August 8, 2012, 11:42pm UTC](https://forum.kirupa.com/t/how-to-set-custom-height-and-width-for-image-loaded-with-loadclip/329283/1 "2012-08-08T23:42:34Z")

</div>

AS2 Experts,

I am new to flash. I have the following code that loads a png image into a MovieClip. When the image is rendered, it seems to me that the width and height is set to that of the png image. What I want is to be able to control the image width and height and set values specified in a different resource file. How would I do that. My intial tries to set the target.\_width and height is not helping.

var imageLoader:MovieClipLoader = new MovieClipLoader();  
var listener:Object = new Object();  
listener.owner = this;

```
	listener.onLoadInit = function(target:MovieClip) {
		trace (" ****** Inside onLoadInit: width/height " + target._width + " / " + 
                    target._height ); 
			
		
	}

	imageLoader.addListener(listener);
	imageLoader.loadClip(source, target);
```
