How to globalize variables in flash

I usually program in c++, but I’ve been using flash lately and I can’t seem to find out how to globalize a variable to use throughout my program. does anyone know how?