fscommand('allowscale', false); fscommand('fullscreen', false); fscommand('showmenu', false); Stage.showMenu = false; stop(); myfmt = new TextFormat(); myfmt.font = 'Helvetica'; myfmt.size = 24; counter.embedFonts = true; counter.setTextFormat(); var lgFmt:TextFormat = new TextFormat(); lgFmt.font = 'CartoonLarge'; lgFmt.size = 16; lg_txt.embedFonts = true; lg_txt.autoSize = true; lg_txt.multiline = true; lg_txt.html = true; //var urlPath = ''; /*//////////////////////////////////////////////////////////// LOAD XML ////////////////////////////////////////////////////////////*/ count = new XML(); count.ignoreWhite = true; count.onLoad = function(success) { if (success) { trace("XML loaded..."); lg_txt.htmlText = count.firstChild.childNodes[0].attributes.label; lg_txt.setTextFormat(lgFmt); cStartTime = Number(count.firstChild.childNodes[0].attributes.start); cSpeed = count.firstChild.childNodes[0].attributes.speed; cUrl = count.firstChild.childNodes[0].attributes.url; startCounter(); } } count.load('typo3conf/ext/flash_counter_manager/counter.xml'); /*//////////////////////////////////////////////////////////// FUNCTIONS AND VARIABLES FOR THE COUNTER ////////////////////////////////////////////////////////////*/ var cCount = 0; // current count var intervalId:Number; if (cSpeed == undefined) { cSpeed = 10; } function executeCallback():Void { if(cCount == cSpeed) { cStartTime = Math.round(cStartTime + 1); counter.text = strSeperator(cStartTime,","); cCount = 0; } cCount++; trace(cCount); } myInterval = setInterval(executeCallback, 10); function startCounter() { counter.text = strSeperator(cStartTime,","); } function strSeperator (num,delimiter){ sign = num<0 ? '-' : ''; num=Math.abs(num).toString(); pos = (num.indexOf('.')==-1) ? num.length : num.indexOf('.'); while(pos>3){ pos-=3; n2=num.slice(pos,num.length); n1=num.slice(0,pos); num=n1+delimiter+n2; } return sign+num; } bg.onRelease = function() { getURL(cUrl); }