I have a gallery of images inside a movieclip and I want to add an url for each instance using the titles of the images kept inside an array. Images instances are named image0, image1, image2…imagen. Code is not working as intended.
var characterNames = new Array("Image Title1", "Image Title2", ....,"Image Titlen");
String.prototype.replace = function(s, r) {
return this.split(s).join(r);
};
for (var i:Number = 0; i < imagesTitles.length; i++) {
imageLink* = imagesTitles*;
imageLink* = imageLink*.replace(" ", "-");
imageLink* = imageLink*.toLowerCase();
imageLink* = "http://www.mysite.com/" +imageLink* + "/";
trace (imageLink*); // outputs a list of valid urls each on a different line
gallery_mc["image" + i.toString()].onRelease = function(){
trace (imageLink*); // outputs nothing and when I click on an image it outputs undefined
getURL(imageLink*, "_blank");
};
}