# "this" to .as

**URL:** <https://forum.kirupa.com/t/this-to-as/252641>\
**Category:** flash\
**Created:** [February 21, 2008, 11:48pm UTC](https://forum.kirupa.com/t/this-to-as/252641 "2008-02-21T23:48:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mleep](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@mleep](https://forum.kirupa.com/u/mleep)\
**Post date:** [February 21, 2008, 11:48pm UTC](https://forum.kirupa.com/t/this-to-as/252641/1 "2008-02-21T23:48:27Z")

</div>

if i have the following actionscript on frame1 inside a movieclip with the identifier name “inventory”

```auto
var container_mc:MovieClip = this.createEmptyMovieClip("container_mc", this.getNextHighestDepth());

```

and i want to use it in an external .as file instead. what would i change “this” to? i tried using \_root.createEmptyMovieClip and \_root.inventory.createEmptyMovieClip. i get no errors but i also do not get the text to show up in the code that follows. ( it DOES show up if i leave it embedded in the movie clip instead of putting it into the .as file )
