# \_root.attachMovie

**URL:** <https://forum.kirupa.com/t/-root-attachmovie/320231>\
**Category:** flash\
**Created:** [March 17, 2011, 1:53pm UTC](https://forum.kirupa.com/t/-root-attachmovie/320231 "2011-03-17T13:53:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![12abhi12](https://avatars.discourse-cdn.com/v4/letter/1/9f8e36/32.png) [@12abhi12](https://forum.kirupa.com/u/12abhi12)\
**Post date:** [March 17, 2011, 1:53pm UTC](https://forum.kirupa.com/t/-root-attachmovie/320231/1 "2011-03-17T13:53:36Z")

</div>

Hi, I am trying to attach a movie to the swf when a function gets executed.  
Everything in the function except this is fine, but the movie is not attached.  
I used this line to attach the movie.

```auto

_root.attachMovie(loader,loader,depth - 1,{_x:(stage._width / 2), _y:(stage._height / 2)});

```

Here, loader is a variable containing the movie’s name which is to be loaded.  
I tried writing the movie’s mane instead of loader but still no luck.  
Can anyone tell me what is wrong?
