FlashVars as Global Variables?

I’m trying to make my FlashVars global so that they can be accessed in all of my scripts. I have an external .as file called ‘globalvars.as’ and it has the following code:


package{
    import flash.display.*;
    public class globalvars extends MovieClip{
        //Declare FlashVars
        public static var code:int;
        public static var temp:String;
        public static var wind:String;
        public static var condition:String;
        
        public function globalvars(){
            code = root.loaderInfo.parameters.code;
            temp = root.loaderInfo.parameters.temp;
            wind = root.loaderInfo.parameters.wind;
            condition = root.loaderInfo.parameters.cond;
        }
    }
}

and in my main flash timeline I have the following code:


import globalvars;
new globalvars();

But I get the following error: Error #1009: Cannot access a property or method of a null object reference. The Flashvars are set right as I can access the variables in the main timeline, just not the external .as file. I’d like these variables to be accessible to other external .as files which is why I’m doing this. Any ideas on what I’m doing wrong?