开发者

ActionScript Flash Predefined Global Variables

开发者 https://www.devze.com 2023-02-20 06:31 出处:网络
开发者_如何学运维Can anyone send me a link, or list all of the global variables that are predefined by Flash ActionScript 3? For example, like the current time, or the current frame, etc.?

开发者_如何学运维Can anyone send me a link, or list all of the global variables that are predefined by Flash ActionScript 3? For example, like the current time, or the current frame, etc.?

Thanks, Thommy


Im not too sure if there is any. Generally you would use the stage or main movieClip object.

trace("frame: " + myMovieClip.currentFrame);

var now:Date = new Date();
trace("time: " + now.getTime());

I usually use a singleton pattern if i need global variables.


Your best bet is the language reference: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/all-index-Symbols.html

If by global variables, you mean Top Level classes/functions etc, you can check out: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/package-detail.html

0

精彩评论

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