开发者_如何学运维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
精彩评论