2016-02-11 109 views
0
// AS3 
var myTimer:Timer = new Timer(1000);     // 1 second 
myTimer.addEventListener(TimerEvent.TIMER, runMany); 
myTimer.start(); 

function runMany(event:TimerEvent):void { 
trace("runMany() called @ " + getTimer() + " ms"); 
} 

预期输出:计时器延迟

runMany() called @ 1000 ms 

生成的输出:

runMany() called @ 12823 ms 
runMany() called @ 25603 ms 
runMany() called @ 38404 ms 

这是由于一些短期的软件问题的? I copied this easy code from Adobe Site但它不工作。

on left AS3 code is written and in Output box undesired output is given

+0

你的代码看起来应该可以工作。你的swf中还有其他的处理过程吗? – Brian

+0

此图像之前未显示,确实很奇怪。你在用什么系统? – Aaron

+0

@Brian感谢编辑,我没有看到 – null

回答

0

相同的代码工作在闪存CS6的ActionScript 3.0(给了意想不到的O/P在CS4),所以我觉得这个问题可能是软件。它表示将安装,一些功能不能正确安装,我忽略它.......无论如何,谢谢所有。