# Load image into specific dimensions?

**URL:** <https://forum.kirupa.com/t/load-image-into-specific-dimensions/275563>\
**Category:** flash\
**Created:** [November 15, 2008, 11:38pm UTC](https://forum.kirupa.com/t/load-image-into-specific-dimensions/275563 "2008-11-15T23:38:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Katie\_Lee](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@Katie\_Lee](https://forum.kirupa.com/u/Katie_Lee)\
**Post date:** [November 15, 2008, 11:38pm UTC](https://forum.kirupa.com/t/load-image-into-specific-dimensions/275563/1 "2008-11-15T23:38:22Z")

</div>

How do I enable an image to be loaded from a server into specific dimensions at runtime?

This is what I’ve got, but it’s just loading it in the top right corner.

```auto

	uploadDisplay.load(new URLRequest(newURLString));
	uploadDisplay.contentLoaderInfo.addEventListener(Event.COMPLETE, contentComplete);
}

function contentComplete(event:Event):void{
	trace (uploadDisplay.content);
	test_txt.appendText(" in contentComplete: " + uploadDisplay.width);
	

	var w:Number = uploadDisplay.width;
	var h:Number = uploadDisplay.height;
	var bitmapDataA:BitmapData = new BitmapData(w/1, w/1);
	
	bitmapDataA.draw(uploadDisplay, new Matrix(), null, null, new Rectangle(0,0,w/1,w/1));
	var bitmapA:Bitmap = new Bitmap(bitmapDataA);
	addChild(bitmapA);
}

```
