Hi!
well that's pretty easy.
first specify the urls at the xml (data/xmlMenu.xml)
mine finished was like this
Code:
<?xml version="1.0" encoding="utf-8" ?>
<projects>
<TC NAME="//Large">
<CT name="ATH" url="http://www.michako.com"></CT>
<CT name="MHG" url="http://www.mywetcalvin.com" ></CT>
<CT name="SDF" url="http://www.skolix.gr/beta"></CT>
<CT name="JYT" url="http://www.flepstudio.org"></CT>
</TC>
<TC NAME="//Medium">
<CT name="MEL" url="http://www.michako.com"></CT>
</TC>
<TC NAME="//Small">
<CT name="MRN" url="http://www.michako.com"></CT>
<CT name="BOX" url="http://www.michako.com"></CT>
<CT name="ALX" url="http://www.michako.com"></CT>
</TC>
</projects>
and then to call each url when you hit the buttons
at the CLICK function, which in this case its
ctClick
you call the corresponding url by tracing which button was pressed by the event targets name.
line 190
Code:
//click the subcat. - do whatever you want here
private function ctClick(event:MouseEvent):void
{
for each (var xmlInfo:XML in xmlData.TC.CT)
{
if(xmlInfo.attribute("name") == event.target.name)
{
var url_str:String = xmlInfo.attribute("url");
if (ExternalInterface.available)
{
ExternalInterface.call( "window.open", url_str, "_blank" );
} else
{
var urlRequest:URLRequest = new URLRequest(url_str);
navigateToURL(urlRequest,"_blank");
}
}
}
}
of course you have to import the needed classes
at the beginning
Code:
//new imports needed for the url call
import flash.net.URLRequest;
import flash.external.ExternalInterface;
import flash.net.navigateToURL;
if you want a preview go here
xmlMenuExample
and if you want the source here
http://www.michako.com/xmlMenu/XMLMenu+url.rar
cya