# What path should for variables when the .swf will be loaded into another movieclip?

**URL:** <https://forum.kirupa.com/t/what-path-should-for-variables-when-the-swf-will-be-loaded-into-another-movieclip/260572>\
**Category:** Uncategorized\
**Created:** [May 16, 2008, 9:32pm UTC](https://forum.kirupa.com/t/what-path-should-for-variables-when-the-swf-will-be-loaded-into-another-movieclip/260572 "2008-05-16T21:32:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaunak84](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@shaunak84](https://forum.kirupa.com/u/shaunak84)\
**Post date:** [May 16, 2008, 9:32pm UTC](https://forum.kirupa.com/t/what-path-should-for-variables-when-the-swf-will-be-loaded-into-another-movieclip/260572/1 "2008-05-16T21:32:37Z")

</div>

Basically exactly what the title says. In a .swf, I create movie clip objects in a for loop like so:

```auto
  
_root.createEmptyMovieClip("box"+i,i); 
var newMC = eval("box"+i); 

```

I know, \_root is bad because now when I have a movieclip in another file that loads this .swf, it doesn’t draw the objects (I use newMC to draw the objects dynamically). I’m assuming this is because I’ve created the movieclip in \_root, and it’s trying to display within a movieclip, thus the info is inaccessible?

But how should I create the empty movie clip? I tried \_level0 and that didn’t work either.

---

<div class="post-metadata">

**Author:** ![shaunak84](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@shaunak84](https://forum.kirupa.com/u/shaunak84)\
**Post date:** [May 16, 2008, 9:37pm UTC](https://forum.kirupa.com/t/what-path-should-for-variables-when-the-swf-will-be-loaded-into-another-movieclip/260572/2 "2008-05-16T21:37:42Z")

</div>

lol, I didn’t know I could just type “createEmptyMovieClip()” without a prefix. That fixed it.

Can anyone point me in the right direction with regards to reading about when to use \_root., \_level0., etc?
