# \_global variables question

**URL:** <https://forum.kirupa.com/t/-global-variables-question/278869>\
**Category:** programming\
**Created:** [January 6, 2009, 9:22pm UTC](https://forum.kirupa.com/t/-global-variables-question/278869 "2009-01-06T21:22:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaxGhost](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@MaxGhost](https://forum.kirupa.com/u/MaxGhost)\
**Post date:** [January 6, 2009, 9:22pm UTC](https://forum.kirupa.com/t/-global-variables-question/278869/1 "2009-01-06T21:22:30Z")

</div>

I’m making a simple pong game, with 3 difficulty modes… easy medium and hard. I’m making a variable with \_global.textmode = “EASY”; and so on… My problem is that when I hit the back button on the mode selection frame of the game and back to the mode selection menu, it reverts dynamic text I’m using to display the current mode to “NONE” which is what I put in the text box physically. I tried fixing this with \_root.onLoad = function(){ \_root.mode\_txt.text = textmode; } but that didn’t work either… what am I doing wrong?
