View Single Post
Old 08-03-2007, 08:47   #10 (permalink)
John Good
+
 
John Good's Avatar
 
Join Date: May 2005
Location: Tropical Networks
Posts: 1,585
HTML Code:
//create an objet to manage your links _global.LinksManager = new Object(); LinksManager = _global.LinksManager; //define a link to a stage LinksManager.root = this; // LinksManager.init = function(){ //make an array for your links and one for the buttons this.tableLinks = []; this.tableButtons = [/*your button 1,your button 2 etc.. */] //load the XML this.loadData(); }; LinksManager.loadData = function (){ var vXML = new XML(); vXML.refLM = this;//this makes a pointer to the links manager vXML.ignoreWhite = true; // vXML.onLoad = function () { this.refLM.initLinks(this); }; vXML.load ("linksList.xml"); }; // LinksManager.initLinks = function (aXML){ for(var i=0; i < aXML.firstChild.childNodes.length; i++){ aXML.refLM.tableLinks[i] = aXML.firstChild.childNodes[i].firstChild.nodeValue; } this.applyLinks(); }; // LinksManager.applyLinks = function(){ for(var i=0; i < this.tableButtons.length; i++){ this.tableButtons[i].url = this.tableLinks[i]; } }; LinksManager.activateButtons = function(){ for(var i=0; i < this.tableButtons.length; i++){ this.tableButtons[i].onRelease=function(){ getURL(this.url, '_blank'); } } }; // LinksManager.init();

I did NOT re-read my code, and I did not comment really, but the code is explicit.
think you can handle that ;-)
__________________
Fonts are like cologne: A bad choice speaks louder than a good one. Justin Feinstein
  Reply With Quote