/ Published in: ActionScript 3
URL: http://www.senocular.com/flash/actionscript.php?file=ActionScript_3.0/TopLevel.as
Expand |
Embed | Plain Text
package { import flash.display.DisplayObject; import flash.display.MovieClip; import flash.display.Stage; /* * TopLevel class * have all document classes extend this * class instead of Sprite or MovieClip to * allow global stage and root access through * TopLevel.stage and TopLevel.root */ public class TopLevel extends MovieClip { public static var stage:Stage; public static var root:DisplayObject; public function TopLevel() { TopLevel.stage = this.stage; TopLevel.root = this; } } }
You need to login to post a comment.
