| Revision 284,
578 bytes
checked in by pablo, 4 years ago
(diff) |
|
Static root reference
|
| Line | |
|---|
| 1 | package com.longtailvideo.jwplayer.utils { |
|---|
| 2 | import flash.display.DisplayObject; |
|---|
| 3 | import flash.display.Stage; |
|---|
| 4 | |
|---|
| 5 | /** |
|---|
| 6 | * Maintains a static reference to the stage and root of the application. |
|---|
| 7 | * |
|---|
| 8 | * @author Pablo Schklowsky |
|---|
| 9 | */ |
|---|
| 10 | public class RootReference { |
|---|
| 11 | |
|---|
| 12 | /** The root DisplayObject of the application. **/ |
|---|
| 13 | public static var root:DisplayObject; |
|---|
| 14 | |
|---|
| 15 | /** A reference to the stage. **/ |
|---|
| 16 | public static var stage:Stage; |
|---|
| 17 | |
|---|
| 18 | public function RootReference(displayObj:DisplayObject) { |
|---|
| 19 | RootReference.root = displayObj.root; |
|---|
| 20 | RootReference.stage = displayObj.stage; |
|---|
| 21 | } |
|---|
| 22 | } |
|---|
| 23 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.