So what I am trying to do is have icons that are loaded from an xml document also contain urls to go to different pages when they are clicked on. Here’s my code so far.
XML FILE
<icons>
<icon image=“images/icon1.png” tooltip=“Information concerning different degree programs and career paths.” url=“degreeMatters.html” />
<icon image=“images/icon2.png” tooltip=“Stories from students concerning their college experience.” url=“studentsTale.html” />
<icon image=“images/icon3.png” tooltip=“Tips and tricks for building resume that will get you noticed.” url=“yourResume.html” />
<icon image=“images/icon5.png” tooltip=“Our collection of video and audio stories, as well as blogs.” url=“mediaArchives.html” />
<icon image=“images/icon6.png” tooltip=“Helpful links to outside sources. Tell em EvoU sent ya!” url=“links.html” />
<icon image=“images/icon4.png” tooltip=“Info about the members of EvoU’s team and a way to contact us.” url=“contact.html” />
</icons>
var numOfItems:Number;
var radiusX:Number = 400;
var radiusY:Number = 250;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.01;
var perspective:Number = 130;
var home:MovieClip = this;
theText._alpha = 0;
var tooltip:MovieClip = this.attachMovie(“tooltip”,“tooltip”,10000);
tooltip._alpha = 0;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
for(var i=0;i<numOfItems;i++)
{
var t = home.attachMovie(“item”,“item”+i,i+1);
t.angle = i * ((Math.PI2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = nodes.attributes.tooltip;
t.url= nodes*.attributes.url;
t.icon.inner.loadMovie(nodes*.attributes.image);
t.r.inner.loadMovie(nodes*.attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}
function over()
{
home.tooltip.tipText.text = this._parent.toolText;
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
home.tooltip._alpha = 100;
}
function out()
{
delete home.tooltip.onEnterFrame;
home.tooltip._alpha = 0;
}
function released()
{
//NEED HELP HERE!
}