import flash.filters.DropShadowFilter; import flash.filters.GlowFilter; var labelGlow:GlowFilter = new GlowFilter(0x000000, .30, 4, 4, 3, 3); var labelShadow:DropShadowFilter = new DropShadowFilter(1, 45, 0x000000, 1, 1, 1, 1, 100); var labelFilters:Array = [labelGlow,labelShadow]; // // Global Text Format // txtFormat = new TextFormat(); txtFormat.align = "center"; txtFormat.bold = true; txtFormat.color = 0xAFFF00; txtFormat.font = "Tahoma"; txtFormat.size = 12; // // Create Text Fields // _root.createTextField( "btnHome_Text", 1, 0, 5, 75, 24 ); btnHome_Text.text = "Home"; btnHome_Text.selectable = false; btnHome_Text.setTextFormat(txtFormat); btnHome_Text.filters = labelFilters; _root.createTextField( "btnForums_Text", 2, 75, 5, 75, 24 ); btnForums_Text.text = "Forums"; btnForums_Text.selectable = false; btnForums_Text.setTextFormat(txtFormat); btnForums_Text.filters = labelFilters; _root.createTextField( "btnChannels_Text", 3, 150, 5, 75, 24 ); btnChannels_Text.text = "Channels"; btnChannels_Text.selectable = false; btnChannels_Text.setTextFormat(txtFormat); btnChannels_Text.filters = labelFilters; _root.createTextField( "btnUsers_Text", 4, 225, 5, 75, 24 ); btnUsers_Text.text = "Users"; btnUsers_Text.selectable = false; btnUsers_Text.setTextFormat(txtFormat); btnUsers_Text.filters = labelFilters; _root.createTextField( "btnIRCops_Text", 5, 300, 5, 75, 24 ); btnIRCops_Text.text = "IRCops"; btnIRCops_Text.selectable = false; btnIRCops_Text.setTextFormat(txtFormat); btnIRCops_Text.filters = labelFilters; _root.createTextField( "btnQuotes_Text", 6, 375, 5, 75, 24 ); btnQuotes_Text.text = "Quotes"; btnQuotes_Text.selectable = false; btnQuotes_Text.setTextFormat(txtFormat); btnQuotes_Text.filters = labelFilters; /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// // // XML Navigation // Written By: Wiccaan // Written On: July 23, 2007 // // Loads an XML file to be parsed containing // the URLs for the navigation system. Used // to easily edit the link locations for the // given buttons. // // Thanks To: // - www.kirupa.com // - www.actionscript.org // ////////////////////////////////////////////////////////////////// // Global Link Variables ////////////////////////////////////////////////////////////////// _global.urlHome = 0; _global.urlForums = 0; _global.urlChannels = 0; _global.urlUsers = 0; _global.urlIRCops = 0; _global.urlQuotes = 0; ////////////////////////////////////////////////////////////////// var xmlLoader:XML = new XML(); Init_XMLFile(); // // Function: Init_XMLFile(...) // // Loads the given XML file above into // the parseLinks function to be parsed. // function Init_XMLFile() { xmlLoader.ignoreWhite = true; xmlLoader.onLoad = function(success){ if( success ) parseXML(this); else trace("Error loading XML file."); } xmlLoader.load("links.xml"); } // // Function: parseXML(...) // // Parses the XML file to retrieve // link names and URLs for navigation. // function parseXML( xmlFile ) { var linkNames = new Array(); var linkURLs = new Array(); var arrPosition = 0; var currItem = xmlFile.firstChild.firstChild; do { linkNames[arrPosition] = currItem.childNodes[0].firstChild.nodeValue; linkURLs[arrPosition] = currItem.childNodes[1].firstChild.nodeValue; arrPosition++; } while( currItem = currItem.nextSibling ); createLinks(linkNames, linkURLs); } // // Function: createLinks(...) // // Iterates through the given arrays to // locate known link names and creates // variables to be used in button events. // function createLinks(lnkNames:Array,lnkURLs:Array) { for( var i:Number = 0; i