# attachMovie and removeMovieClip

**URL:** <https://forum.kirupa.com/t/attachmovie-and-removemovieclip/201624>\
**Category:** flash\
**Created:** [September 23, 2006, 3:31am UTC](https://forum.kirupa.com/t/attachmovie-and-removemovieclip/201624 "2006-09-23T03:31:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lacus](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@Lacus](https://forum.kirupa.com/u/Lacus)\
**Post date:** [September 23, 2006, 3:31am UTC](https://forum.kirupa.com/t/attachmovie-and-removemovieclip/201624/1 "2006-09-23T03:31:25Z")

</div>

Hi,  
I have been trying to solve this problem for times but still unable to solve it…\>.\<

I have placed an empty Movie Clip with instance as emptybg

```auto

  if (empty1.hitTest(_xmouse,_ymouse,false))
  {
   emptybg.attachMovie("bg1","blue",1);
   setBackground = 1;
  }

```

but when i wanna clear the attached movie clip,  
I typed

```auto

on(press)
{
 setBackground = 0;
 emptybg.removeMovieClip();
}

```

but still unable to work \>.\<  
Thanks in advance for the help offered…

Regards,  
Lacus
