""//clear out the text fields head_fld.text= ""; subhead_fld.text = ""; //list of all locales that require double-byte settings doubleByteLocales = ["ko", "ja","zh_tw", "zh_cn"]; //simple method to loop through above array to tell us if we're in a double-byte locale isDoubleByteLocale = function(){ var retVal = false for (var i = 0; i< doubleByteLocales.length; i++){ if(doubleByteLocales[i] == lang ) retVal = true; } return retVal; } //determine the default font name // // only works in latin-based locales getDefaultFontName = function(){ // set the correct font name and size var name; if(isDoubleByteLocale()){ name = null; } else { name = (plat == "mac" ? "Lucida Grande" : "Tahoma"); } return name } /** * method to determine if this is the local or remote version */ isRemoteVersion = function(){ var urlStr = new String(this._url); var isRemote = urlStr.indexOf("http://") > -1; return isRemote } loadXML = function(fileName){ this.contentXML = new XML(); this.contentXML.ignoreWhite = true; this.contentXML.controller = new Object(); this.contentXML.controller = this; this.contentXML.onLoad = function(success){ myTrace("xml load successful? " + success) this.controller.parseXML(success, this); } //where is the content? if we're in the dynamic swf, point to the current directory var urlStr = new String(this._url); if(_root.plat == "mac"){ var xmlLoc = (isRemoteVersion() ? urlStr.substring(0 ,urlStr.indexOf("/", 7)) +"/startpage/" + fileName : "Assets/" + fileName); } else { var xmlLoc = ( isRemoteVersion() ? urlStr.substring(0,urlStr.lastIndexOf("/") + 1) + fileName : "Assets/" + fileName); } myTrace("xml file is -- " + xmlLoc) this.contentXML.load(xmlLoc); } parseXML = function(success, contentXML){ if(success){ //var nd = _level0.contentXML.firstChild; //find the correct node for this language //while (nd.attributes.lang != lang){ //nd=nd.nextSibling; //} var nd; var foundNode = false; var len = contentXML.childNodes.length; for(var i = 0;i -1 ? true : false) tf.italic = (new String(propertyObj.style).toLowerCase().indexOf("italic") > -1 ? true : false) tf.underline = (new String(propertyObj.style).toLowerCase().indexOf("underline") > -1 ? true : false); tf.size = propertyObj.size; return tf; } //var $debug=true; if($debug){ _root.createTextField("debug",1050,Stage.width - 305,0,300,79); _root.debug.background=true; _root.debug.border=true; } myTrace = function(str){ if($debug)_root.debug.text +=str +"\n"; else trace(str) } myTrace("-----------------------------"); myTrace("url is" + this._url); //begin loading content loadXML(productName + "_content.xml"); stop();