This is what I want:
User hits button, goes to the next calendar month with all the bells and whistles from my XML file. Everything works fine up until there is no file for that month, then Flash starts getting cranky with me.
Basically I’ve been trying different variations of this.
function nextClick (e:MouseEvent):void
{
myDate.setmonth(myDate.month+1);
try
{
myLoader.load(new URLRequest("Calendar/"+monthsOfYear[myDate.month]+myDate.fullYear+".XML"));
} catch(e:IOErrorEvent)
{
URLRequest("Calendar/blank.XML"));
}
}
Basically it set myDate to the next month then loads the appropriate XML, “January2008.xml” for example. But then the next month comes along and there is no “February2008.xml” then its supposed to load “blank.xml” but I’m still getting the errors. Even with catch(e:Error) it doesn’t seem to be firing off.