# Why does this happen?

**URL:** https://forum.kirupa.com/t/why-does-this-happen/302398
**Category:** Uncategorized
**Created:** [December 29, 2009, 3:55pm UTC](https://forum.kirupa.com/t/why-does-this-happen/302398 "2009-12-29T15:55:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Navarone](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@Navarone](https://forum.kirupa.com/u/Navarone)
#### Post date: [December 29, 2009, 3:55pm UTC](https://forum.kirupa.com/t/why-does-this-happen/302398/1 "2009-12-29T15:55:28Z")

</div>

If I specify the width and height of my roomContainer, the image does not appear. If I comment out the width and height, the image appears. Why does this happen? The actual image size in pixels is 656 x 424.

```auto

stop();
//create a container to hold the large room images
var roomContainer:MovieClip = new MovieClip();

//set room location
roomContainer.x = 75;
roomContainer.y = 75;
//roomContainer.width = 559;
//roomContainer.height = 361;
addChild(roomContainer);

//add the default large room
var defaultRoom:String = "rooms/bedroom_1.png";
var defaultLoader:Loader = new Loader();
defaultLoader.load(new URLRequest(defaultRoom));
defaultLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, defaultLoaded, false, 0, true);

function defaultLoaded(event:Event):void {    
    roomContainer.addChild(event.target.content);    
}

```
