How do I handle incremented varibles inside of URLRequest()
I am trying to set up a series of URL links inside a cycling button. However, when I try to use the variable, the link sends me to the variable name instead of the URL. Below is a snippet of the code:
//URL variables
var lk1="http://www.firstlink.com";
var lk2="http://www.secondlink.com";
var lk3="http://www.thirdlink.com";
//
var myCount:Number=1;
//
navigateToURL(new URLRequest(lk[myCount]);
//
if I use the above code I get the error "Error #1010: A term is undefined and has no properties."
navigateToURL(new URLRequest(lk+[myCount]);
If I use this code I get the error "1120: Access of undefined property lk."
navigateToURL(new URLRequest("lk"+[myCount]);
And if I use this code it links me to "lk1" rather than the variable value of the link.
What is the proper code to get an incremented variable to work inside of the URLRequest ????