Right now I have a static way that I set the url’s to 5 buttons, here’s a sample of what I am doing:
Object(root).grid_slider.links.twitter.addEventListener(MouseEvent.CLICK, fl_ClickToGoToTwitter);
Object(root).grid_slider.links.facebook.addEventListener(MouseEvent.CLICK, fl_ClickToGoToFacebook);
function fl_ClickToGoToFacebook(event:MouseEvent):void
{
navigateToURL(new URLRequest("http://www.facebook.com"), "_blank");
}
function fl_ClickToGoToTwitter(event:MouseEvent):void
{
navigateToURL(new URLRequest("http://www.twitter.com"), "_blank");
}
I’m kindof noob to flash I kinda gave up on it after Flash MX but now I was asked to make just a quick slider(which of course I recommened jquery but they wouldn’t have it). I have everything working fine but I have been asked that the url’s are loaded from a xml file instead of static. Not quite sure where to go from here..I’ve read how to read from xml but do I need to set the values in global variables?
Your XML:
You load this xml to a myLinks variable: