home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
i·claim - visualizing argument
/
ICLAIM.ISO
/
mac
/
t_06.swf
/
scripts
/
__Packages
/
mx
/
screens
/
Screen.as
Wrap
Text File
|
2005-02-28
|
4KB
|
171 lines
class mx.screens.Screen extends mx.controls.Loader
{
static var symbolName = "Screen";
static var symbolOwner = mx.screens.Screen;
var className = "Screen";
var _isScreen = true;
var _indexInParent = 0;
var __transitionManager = null;
var _childLoading = "";
var borderStyle = "none";
function Screen()
{
super();
}
function get indexInParent()
{
return this._indexInParent;
}
function get numChildScreens()
{
return this._childScreens.length;
}
function get parentIsScreen()
{
var _loc2_ = this.__get__parentScreen() != null && this.parentScreen._isScreen;
return _loc2_;
}
function get parentScreen()
{
var _loc2_ = this._parent;
if(_loc2_ == null)
{
return null;
}
if(_loc2_._isScreen)
{
return _loc2_;
}
return null;
}
function get rootScreen()
{
var _loc2_ = this;
while(_loc2_.__get__parentIsScreen())
{
_loc2_ = _loc2_.parentScreen;
}
return _loc2_;
}
function get transitionManager()
{
return this.__transitionManager;
}
static function get currentFocusedScreen()
{
var curFocus;
curFocus = _root.focusManager.getFocus();
if(!curFocus || curFocus == undefined)
{
curFocus = eval(Selection.getFocus());
}
while(curFocus && !curFocus._isScreen)
{
curFocus = curFocus._parent;
}
if(curFocus == undefined)
{
return null;
}
return curFocus;
}
function getChildScreen(childIndex)
{
return this._childScreens[childIndex];
}
function createChild(className, instanceName, initProps)
{
var _loc4_ = undefined;
this._childLoading = instanceName;
return super.createChild(className,instanceName,initProps);
}
function drawFocus()
{
}
function init()
{
mx.core.ext.UIObjectExtensions.Extensions();
mx.core.ext.UIComponentExtensions.Extensions();
mx.events.LowLevelEvents.enableLowLevelEvents();
this._childScreens = [];
super.init();
this._loadExternalClass = mx.screens.Screen.symbolName;
this.__set__scaleContent(false);
mx.events.UIEventDispatcher.initialize(this);
if(this._parent._childLoading != this._name)
{
if(this.__get__parentIsScreen())
{
this._parent.registerChildScreen(this);
}
}
}
function registerChildScreen(scrn)
{
scrn._indexInParent = this._childScreens.push(scrn) - 1;
}
function childLoaded(obj)
{
super.childLoaded(obj);
var _loc4_ = undefined;
var _loc5_ = null;
var _loc7_ = obj._parent;
for(_loc4_ in obj)
{
if(typeof obj[_loc4_] == "movieclip" && obj[_loc4_]._isScreen)
{
_loc5_ = obj[_loc4_];
break;
}
}
if(_loc5_._isScreen)
{
if(!this.__get__scaleContent())
{
var _loc6_ = new Object();
_loc6_.x = obj.x;
_loc6_.y = obj.y;
this.globalToLocal(_loc6_);
obj._x = _loc6_.x;
obj._y = _loc6_.y;
}
else
{
_loc6_ = new Object();
_loc6_.x = this.x;
_loc6_.y = this.y;
this._parent.localToGlobal(_loc6_);
obj.globalToLocal(_loc6_);
_loc5_._x = _loc6_.x;
_loc5_._y = _loc6_.y;
}
_loc5_._indexInParent = _loc7_._childScreens.push(_loc5_) - 1;
obj._isScreenContainer = true;
obj._containedScreen = _loc5_;
}
_loc7_._childLoading = "";
}
function doScaleLoader()
{
}
function createChildren()
{
this.border_mc = new mx.skins.RectBorder();
this.border_mc.__borderMetrics = {top:0,left:0,bottom:0,right:0};
super.createChildren();
}
function allTransitionsInDone()
{
this.dispatchEvent({type:"allTransitionsInDone",target:this});
}
function allTransitionsOutDone()
{
this.dispatchEvent({type:"allTransitionsOutDone",target:this});
}
function destroyChildAt(childIndex)
{
this._childScreens.splice(childIndex,1);
super.destroyChildAt(childIndex);
}
}