Dynamic global variables inside a function

I’ve been beating myself over this one for 7 hours now.

I’m trying to import an XML file with a list of settings. These settings should overwrite the existing setting variables which may already have been defined in the actionscript itself. In the XML.onLoad function I’m trying to somehow dynamically set variables for each setting.

Here’s the code…

// Default ticker settings
var rssFeed:String = 'http://www.whatever.com/feeds/live/1.xml';
var dateFontFamily:String = 'Verdana';
var dateFontColor:String = '#000000';
var dateTextDecoration:String = 'none';
var titleFontFamily:String = 'Verdana';
var titleFontColor:String = '#A20405';
var titleTextDecoration:String = 'none';
var linkTarget:String = '_blank';
var bgColor:Number =  0xFFF9E6;
var bgImage:String = 'none';
var scrollNormal:Number = 1;
var scrollSlow:Number = .25;
var itemSpacing:Number = 15;
var initX:Number = 0;
var initY:Number = 0;
var initWidth:Number = 800;
var initHeight:Number = 20;

// Overrides default settings with settings from XML file.
var tickerSettings:XML = new XML();
tickerSettings.ignoreWhite = true;
tickerSettings.onLoad = function(loaded) {
    if (loaded) {
        currentSetting = this.firstChild.firstChild;
        while (currentSetting) {
            set('_global.' + currentSetting.attributes.name,currentSetting.firstChild.nodeValue);
            currentSetting = currentSetting.nextSibling;
        }
    }
}
tickerSettings.load('tickersettings.xml');

I’m trying to use a set statement to overwrite those individual variables that are set outside the onload function. No dice. I’ve already tried setting all the initial default variables to globals. Nothing. It manages to dynamically create the variables locally, but they don’t change the previously defined default variables. I gotta get these variables out of the onload function!!! Sorry. Any help would be appreciated.