# Problem with attachMovie and mc width

**URL:** <https://forum.kirupa.com/t/problem-with-attachmovie-and-mc-width/228249>\
**Category:** flash\
**Created:** [June 6, 2007, 1:36pm UTC](https://forum.kirupa.com/t/problem-with-attachmovie-and-mc-width/228249 "2007-06-06T13:36:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marws](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@marws](https://forum.kirupa.com/u/marws)\
**Post date:** [June 6, 2007, 1:36pm UTC](https://forum.kirupa.com/t/problem-with-attachmovie-and-mc-width/228249/1 "2007-06-06T13:36:52Z")

</div>

Hy guys, this should be something simple to solve, but i am not sure what I am missing

I am using this code to attach a mc into another mc in runtime

```php

on (release) {
 _root.holder.attachMovie("q3", "q3_mc", this.getNextHighestDepth());
_root.container._alpha = 0;
 _root.container._width = _root.container.holder.p5_mc._width;
 _root.container.close._x = _root.container._width;
 _root.fade();
}

```

this is the fade function

```php

function fade() {
    _root.container.onEnterFrame = function() {
        this._alpha += 7;
               if (this._alpha>90) {
            this._alpha = 100;
            delete this.onEnterFrame;
           }
    };
}

```

It does what it is supposed, but not always, sometimes the holder mc does not “stretchs”  
to the size of the mc being loaded, causing distortions, this happens pretty ramdomly.

Anyone could help me out?

thanks
