# UI MovieClips, values stuck in scope

**URL:** <https://forum.kirupa.com/t/ui-movieclips-values-stuck-in-scope/305677>\
**Category:** flash\
**Created:** [March 1, 2010, 8:38pm UTC](https://forum.kirupa.com/t/ui-movieclips-values-stuck-in-scope/305677 "2010-03-01T20:38:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ibsen](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@ibsen](https://forum.kirupa.com/u/ibsen)\
**Post date:** [March 1, 2010, 8:38pm UTC](https://forum.kirupa.com/t/ui-movieclips-values-stuck-in-scope/305677/1 "2010-03-01T20:38:26Z")

</div>

I have an MC on stage containing user interface elements.

Within that MC, I have another MC with an onRelease event that calls to a function.

The function it’s calling sets/toggles a variable.

The problem is this: It’s setting the variable in a scope that’s available for the function and the MC within the user interface container, but I also need to make it available to \_level0 (to be written to a file via an existing CGI script we have). I’ve tried setting this from within the function, having a loop that copies all the values from that scope to \_level0, but I haven’t gotten it to work.

The existing software I’m creating this for is convoluted, and we’re stuck with it, so the goal is really just getting those variables into \_level0, and not something that might be cleaner or make more sense.
