Assembled Variable Problem: How do I get the contents out?

I’m having trouble getting an ‘assembled’ variable to return the variable contents.

On movieclip release I would like to put the content of a pre-defined variable into a getURL, but I can only get it to return the name of the URL and not the contents.

Thanks for any help.

See below.

//Variables defined
var button1URL:String = “/home”;
var button2URL:String = “/welcome”;
var button3URL:String = “/quiz”;
// this trace works, it returns the string I want. ex: “/home”
trace(button1URL);

// Build Nav Button Actions // (this is much simplified)
for (var i = 1; i<=3; i++) {
tempButtonName = “button”+i+“_mc”;
buttons_mc[tempButtonName].hitArea_mc.onRelease = function() {
var buttonURL = this._parent._name.slice(0, 7)+“URL”;
// Here I build the variable over again based on which button is clicked
trace(buttonURL);
// **** this returns the right variable, but I can’t remember how to make it return the VALUE of the variable.
// EX: it returns button1URL not “/home”
getURL(buttonURL);
};
}

var button1URL:String = "/home";
var button2URL:String = "/welcome";
var button3URL:String = "/quiz";
for (var i = 1; i <= 3; i++) {
 tempButtonName = "button" + i + "_mc";
 buttons_mc[tempButtonName].hitArea_mc.onRelease = function() {
  var buttonURL = this._parent._parent._parent[this._parent._name.slice(0, 7) + "URL"];
  getURL(buttonURL);
 };
}

Oh my, I never would have figured that out. I’m glad I asked. Thanks so much! –
PM