So bascially you want the picture to load and if you click it, it'll go to a link you've specified in the XML?
Ok, first change your xml by adding an url (let's call it "link") attribute so your first XML node would look something like this:
Code:
<icon image="astarte.jpg" link="http://www.astarte.com">
Do that to all the nodes.
Next, the actionscript!
Add the following AS to your onLoad function:
Code:
xml.onLoad = function() {
var parent = this.firstChild
var nodes = parent.childNodes;
numOfItems = nodes.length;
for(var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
var picPath = parent.childNodes[i].attributes.url
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.ref.inner.loadMovie(nodes[i].attributes.image);
t.icon.inner.onRelease = function() {
getURL(picPath, _blank);
}
}
}
Look into the getURL method for opening it into the same frame vs. another window etc... As I've written it, it opens in a new window. To open in a specific frame, change the "_blank" to the frame's name.
Bookmarks