# Create variable with another scope?

**URL:** <https://forum.kirupa.com/t/create-variable-with-another-scope/269526>\
**Category:** flash\
**Created:** [August 28, 2008, 4:13pm UTC](https://forum.kirupa.com/t/create-variable-with-another-scope/269526 "2008-08-28T16:13:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xohol](https://avatars.discourse-cdn.com/v4/letter/x/59ef9b/32.png) [@xohol](https://forum.kirupa.com/u/xohol)\
**Post date:** [August 28, 2008, 4:13pm UTC](https://forum.kirupa.com/t/create-variable-with-another-scope/269526/1 "2008-08-28T16:13:30Z")

</div>

How do i create a variable in another scope than the current one?

For example, say i have a MovieClip, mc

i want to create an object within that mc.

so instead of var obj:Object = new Object()

i want to do something this this effect:

var mc.obj:Object = new Object()

effectivly creating that object with the scope of the mc
