# Loaded swf with lockroot does not seem to work

**URL:** https://forum.kirupa.com/t/loaded-swf-with-lockroot-does-not-seem-to-work/243900
**Category:** Uncategorized
**Created:** [November 12, 2007, 1:43pm UTC](https://forum.kirupa.com/t/loaded-swf-with-lockroot-does-not-seem-to-work/243900 "2007-11-12T13:43:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pimsme](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@pimsme](https://forum.kirupa.com/u/pimsme)
#### Post date: [November 12, 2007, 1:43pm UTC](https://forum.kirupa.com/t/loaded-swf-with-lockroot-does-not-seem-to-work/243900/1 "2007-11-12T13:43:48Z")

</div>

## I have a swf that is being loaded into another swf without a “container” clip (which i am not quite sure how to implement). The loaded swf has \_root references so in the very first line of script i placed this:

## this.\_lockroot = true;

## and then followed up with this:

## \_root.menuleftopen1 = false; \_root.menuleftopen2 = false; \_root.menuleftopen3 = false; \_root.menuleftopen4 = false; \_root.menuleftopen5 = false; \_root.menuleftopen6 = false; \_root.menuleftopen7 = false; \_root.menuleftopen8 = false; \_root.menuleftopen9 = false; \_root.menuleftopen10 = false; \_root.menuleftopen11 = false; \_root.menuleftopen12 = false; \_root.menuleftopen13 = false; ; function setMenuClose() { for (z=0; z\<14; z++) { if (eval("/:menuleftopen"+z) == true) { eval(“menu.menu”+z).gotoAndPlay(“Swoop Up”); } } } stop();

I also have embedded MC that refer to this \_root script. So my problem is that the swf loads but the script which is supposed to close a menu when one menu is opened does not work, they just all stay open when i click other menus. Any suggestion on how to resolve this would be greatly appreciated. Thank you.
