PDA

View Full Version : XML links



iMat
December 27th, 2004, 07:59 PM
I've modified Squirrel Finder (off Kirupa) a little to create a list that goes to various links.

Only problem is, the links for each button do not match, as I believe the linking function is not going through the loop.

I've included a FLA, so maybe you guys can help.

I need it so that the label goes to the URL specified in the XML. In this case, Google goes to http://www.google.com when clicked, and eBay goes to http://www.ebay.com when clicked.

Thanks

claudio
December 27th, 2004, 08:09 PM
You have to makle the variable link unique to each button.

item_mc.link = items[i].attributes.link;
item_mc.main_btn.onRelease = function() {
getURL(this._parent.link, "_blank");
};

iMat
December 27th, 2004, 08:18 PM
Thank you!

--iMat

claudio
December 27th, 2004, 08:19 PM
Welcome!