开发者

Flash getTimer() not working in Flash Builder 4.5

I've been following some tutorials and they use the function getTimer() in the actionscript code, but when I use it, it gives me: 1180: Call to a possibly undefined method getTimer.

I'm using Flash Builder 4.5 for PHP and Flash CS5.5. The settings for my FLA file are set at Player v9 and ActionScript 3.0

I'm calling the funcion in this class:

package main.tutorials.ch1
{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;

public class CollisionTest extends Sprite
{
  ....
    public function CollisionTest()
    {
      .... 

        trace(getTimer());
    }
}
}

I don't think it's the imports.. It's probably a missing library in Flash Builder, but I'm new and I don't know where or which library would开发者_运维知识库 be missing. I also changed it to extends MovieClip but it still won't work.


Googling, i found the following: http://www.actionscript.org/forums/showthread.php3?t=158893 It says you should add the following import.

import flash.utils.getTimer;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜