Changing a global variable

I need your help: I have a variable anima, so when myFunction1() is execulted, it will be set to another value. So when I execute myFunction2(), switch case will work accourding to the value that was set on myFunction1(), and than set anima to another value again.