# Please help on (root) - variable

**URL:** <https://forum.kirupa.com/t/please-help-on-root-variable/330441>\
**Category:** flash\
**Created:** [January 22, 2013, 3:50pm UTC](https://forum.kirupa.com/t/please-help-on-root-variable/330441 "2013-01-22T15:50:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eggblade](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@eggblade](https://forum.kirupa.com/u/eggblade)\
**Post date:** [January 22, 2013, 3:50pm UTC](https://forum.kirupa.com/t/please-help-on-root-variable/330441/1 "2013-01-22T15:50:51Z")

</div>

Can I call a function (variable) with a deep nested button?

```auto

var sushi:Number = 1;

```

and then from a deep deep nested button within some movie clips :

```auto

button.addEventListener(MouseEvent.CLICK, sushiset);
function sushiset (event:MouseEvent):void{
    (root).sushi = 2;
}

```

recently I tried changing a movieclip just like this and it works with this code:

```auto

MovieClip(root).sushiMC.gotoAndPlay(1);

```

How will I do it \*\*in variables? \*\*Is it possible to **create a globally-used variable?**  
Thank you.
