# Constrain a container

**URL:** <https://forum.kirupa.com/t/constrain-a-container/308974>\
**Category:** flash\
**Created:** [May 4, 2010, 1:49pm UTC](https://forum.kirupa.com/t/constrain-a-container/308974 "2010-05-04T13:49:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DK1120](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@DK1120](https://forum.kirupa.com/u/DK1120)\
**Post date:** [May 4, 2010, 1:49pm UTC](https://forum.kirupa.com/t/constrain-a-container/308974/1 "2010-05-04T13:49:27Z")

</div>

Hi All

would someone beable to explain/help how to constrain a container that loads in external swf/images.

I think its something to do with resizer events ? this is the script I use with the container which is called ‘loader\_mc’

```auto
 
var loader_mc : Loader = new Loader();
var urlRequest : URLRequest = new URLRequest("images.swf"); 
loader_mc.load(urlRequest); 
addChild(loader_mc);

my_button.addEventListener(MouseEvent.CLICK, buttonClick)
function buttonClick(e:MouseEvent):void
{
     try{
loader_mc.unloadAndStop();
} catch(e:Error) {
}

```

. . . anythougths on an easy way to do this?  
thanks for your help!
