I have an xml calendar thing and im trying to understand these onRollOver functions and how its displaying this XML.
XML:
<?xml version="1.0" encoding="UTF-8"?>
<calendar>
<event date="2008.1.3" link="http://www.google.com">Off-Road Expo</event>
<event date="2008.1.21" link="http://www.google.com">Off-Road Expo</event>
<event date="2008.2.6" link="http://www.google.com">Off-Road Expo</event>
</calendar>
This function adds the dates and event to array:
function makearray(success) {
if (success == true) {
for (i = 0; i < myxml.firstChild.childNodes.length; i++) {
m[myxml.firstChild.childNodes*.attributes.date] = m[myxml.firstChild.childNodes*.attributes.date] + (myxml.firstChild.childNodes*.firstChild.nodeValue + "<br>");
l[myxml.firstChild.childNodes*.attributes.date] = myxml.firstChild.childNodes*.attributes.link;
}
}
makecalendar(month,year);
}
Here is the rollOver and onRollOut code:
dd.onRollOver = function() {
hover.startDrag([lockCenter]);
var theDay = this._name;
hover._visible = true;
hover.txt.text = m[year + "." + month + "." + this.text] + m[month + "." + this.text];
};
dd.onRollOut = dd.onDragOut = function() {
hover.stopDrag();
hover._visible = false;
hover.txt.text = "";
};
The problem is, the string its returning is “undefinedOff-Road Expoundefined” If I put the movie in AS1 and flash player 6 it just says “Off-Road Expo”, but I cant use that since the whole site is AS2 and FP9.
Here is a link to see what I am talking about: