# Unloadmovie on root

**URL:** <https://forum.kirupa.com/t/unloadmovie-on-root/265745>\
**Category:** flash\
**Created:** [July 11, 2008, 9:10pm UTC](https://forum.kirupa.com/t/unloadmovie-on-root/265745 "2008-07-11T21:10:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottboarder](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@scottboarder](https://forum.kirupa.com/u/scottboarder)\
**Post date:** [July 11, 2008, 9:10pm UTC](https://forum.kirupa.com/t/unloadmovie-on-root/265745/1 "2008-07-11T21:10:27Z")

</div>

Hi,  
I have a movie at root frame 2 which is loaded from an AS file see code below

var dockTemplate = {layout: 0, icon\_size: 127, icon\_min: 60, icon\_max: 110, icon\_spacing: 2, items: [{id: “home”, label: “home”}, {id: “about”, label: “about”}, {id: “services”, label: “services”}, {id: “sales”, label: “sales”}, {id: “find”, label: “find”}, {id: “contact”, label: “contact”}], span: null, amplitude: null, callback: this.dockActions};  
this.attachMovie(“Dock”,“menu\_mc”,1,dockTemplate);  
this.menu\_mc.\_x = Stage.width / 2;  
this.menu\_mc.\_y = Stage.height;

stop ();

So what i want to do is unload this movieclip or otherwise hide it, as im loading a different movie clip over the top.

i want to unload it from from within a movie clip on root called Pages

so on Pages on actionscript on a frame i have  
unloadMovie(“menu\_mc”);

but it does not work. if I put unloadMovie(“menu\_mc”); at root it works, can anyone tell me how I can reference the movie from another movie to unload/remove/hide it

Thanks  
Scott

---

<div class="post-metadata">

**Author:** ![stringy](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stringy](https://forum.kirupa.com/u/stringy)\
**Post date:** [July 11, 2008, 9:25pm UTC](https://forum.kirupa.com/t/unloadmovie-on-root/265745/2 "2008-07-11T21:25:03Z")

</div>

```auto
_parent.menu_mc.unloadMovie()

```

---

<div class="post-metadata">

**Author:** ![scottboarder](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@scottboarder](https://forum.kirupa.com/u/scottboarder)\
**Post date:** [July 11, 2008, 9:26pm UTC](https://forum.kirupa.com/t/unloadmovie-on-root/265745/3 "2008-07-11T21:26:15Z")

</div>

thanks  
just as you posted this i found that  
unloadMovie("/menu\_mc");  
works too.

---

<div class="post-metadata">

**Author:** ![krilnon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/krilnon/32/34_2.png) [@krilnon](https://forum.kirupa.com/u/krilnon)\
**Post date:** [July 11, 2008, 9:56pm UTC](https://forum.kirupa.com/t/unloadmovie-on-root/265745/4 "2008-07-11T21:56:56Z")

</div>

[QUOTE=scottboarder;2357133]thanks  
just as you posted this i found that  
unloadMovie("/menu\_mc");  
works too.[/QUOTE]  
Not that it really matters, but I’m pretty sure that that works because of the Flash 3/4 syntax that was replaced by the style that stringy’s post uses. It’s actually pretty funny that it works when publishing for Flash 8.
