# Setting width on movieclip with image loaded

**URL:** https://forum.kirupa.com/t/setting-width-on-movieclip-with-image-loaded/237627
**Category:** flash
**Created:** [September 1, 2007, 9:03am UTC](https://forum.kirupa.com/t/setting-width-on-movieclip-with-image-loaded/237627 "2007-09-01T09:03:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![phantz](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@phantz](https://forum.kirupa.com/u/phantz)
#### Post date: [September 1, 2007, 9:03am UTC](https://forum.kirupa.com/t/setting-width-on-movieclip-with-image-loaded/237627/1 "2007-09-01T09:03:49Z")

</div>

Hey,

I am trying to load an image into a movieclip and then change the width of the movieclip. The problem I am having is that when I do this the image is no longer visible.

Any help is greatly appreciated

```auto

import flash.display.*;
import flash.net.URLRequest;
import flash.events.Event;
var container:MovieClip = new MovieClip();
addChild(container);
var pictLdr:Loader = new Loader();
var pictURL:String = "image.jpg"
var pictURLReq:URLRequest = new URLRequest(pictURL);
pictLdr.load(pictURLReq);
pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded); 
function imgLoaded(event:Event):void
{
    container.addChild(pictLdr.content); 
}

//change the width
//If I comment out this line I can see the image fine.
container.width = 100;

```
