first commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
stop();
|
||||
@@ -0,0 +1,27 @@
|
||||
function AttachContent(id, contentType)
|
||||
{
|
||||
id = Number(id);
|
||||
contentClip = attachMovie(contentType,String(id),id);
|
||||
return Pointer.encode(contentClip);
|
||||
}
|
||||
function DetachContent(id)
|
||||
{
|
||||
id = Number(id);
|
||||
var _loc2_ = this[String(id)];
|
||||
if(_loc2_ != undefined)
|
||||
{
|
||||
_loc2_.removeMovieClip();
|
||||
}
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
delete AttachContent;
|
||||
delete DetachContent;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
initialized = true;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
onClipEvent(load){
|
||||
_visible = false;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
function RegisterMasterResizeListener(mc)
|
||||
{
|
||||
masterResizeListeners.push(mc);
|
||||
}
|
||||
function UnregisterMasterResizeListener(mc)
|
||||
{
|
||||
var _loc1_ = 0;
|
||||
while(_loc1_ < masterResizeListeners.length)
|
||||
{
|
||||
if(masterResizeListeners[_loc1_] == mc)
|
||||
{
|
||||
masterResizeListeners.splice(_loc1_,1);
|
||||
break;
|
||||
}
|
||||
_loc1_ = _loc1_ + 1;
|
||||
}
|
||||
}
|
||||
function OnMasterResize(mc)
|
||||
{
|
||||
var _loc1_ = 0;
|
||||
while(_loc1_ < masterResizeListeners.length)
|
||||
{
|
||||
masterResizeListeners[_loc1_].OnMasterResize(mc);
|
||||
_loc1_ = _loc1_ + 1;
|
||||
}
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
delete masterResizeListeners;
|
||||
delete RegisterMasterResizeListener;
|
||||
delete UnregisterMasterResizeListener;
|
||||
delete OnMasterResize;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
initialized = true;
|
||||
masterResizeListeners = new Array();
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
onClipEvent(load){
|
||||
_visible = false;
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
function Move(xArg, yArg, widthArg, heightArg)
|
||||
{
|
||||
_X = Number(xArg);
|
||||
_Y = Number(yArg);
|
||||
_width = Math.min(_width,Number(widthArg));
|
||||
_height = Math.min(_height,Number(heightArg));
|
||||
}
|
||||
function SetColor(colorArg)
|
||||
{
|
||||
titleText.field.textColor = Number(colorArg);
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
delete Move;
|
||||
delete SetColor;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
titleText.text = "$" + qualifyName(this,"Text") + "&outline";
|
||||
titleText.field.autoSize = "left";
|
||||
titleText.field._width;
|
||||
initialized = true;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
}
|
||||
stop();
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
function Move(xArg, yArg, widthArg, heightArg)
|
||||
{
|
||||
_X = Number(xArg);
|
||||
_Y = Number(yArg);
|
||||
_width = Math.min(_width,Number(widthArg));
|
||||
_height = Math.min(_height,Number(heightArg));
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
delete Move;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
titleText.text = "$" + qualifyName(this,"Text") + "&outline";
|
||||
titleText.field.autoSize = "left";
|
||||
titleText.field._width;
|
||||
initialized = true;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
}
|
||||
stop();
|
||||
@@ -0,0 +1 @@
|
||||
stop();
|
||||
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
function HideHotKeyText()
|
||||
{
|
||||
textMC.gotoAndStop("_noHotKey");
|
||||
if(amphibiousIcon != undefined)
|
||||
{
|
||||
amphibiousIcon._x = textMC._x + textMC._width + amphibiousIconMargin;
|
||||
}
|
||||
}
|
||||
function SetAmphibious(val)
|
||||
{
|
||||
gotoAndPlay(val == 0 ? "NotAmphibious" : "Amphibious");
|
||||
if(amphibiousIcon != undefined)
|
||||
{
|
||||
amphibiousIcon._x = textMC._x + textMC._width + amphibiousIconMargin;
|
||||
}
|
||||
}
|
||||
function Move(newX, newY, newWidth, newHeight)
|
||||
{
|
||||
_X = newX;
|
||||
_Y = newY;
|
||||
if(newWidth < _width)
|
||||
{
|
||||
var _loc1_ = _width - newWidth;
|
||||
var _loc2_ = textMC._width;
|
||||
textMC._width = _loc1_ >= _loc2_ - 1 ? 1 : _loc2_ - _loc1_;
|
||||
if(amphibiousIcon != undefined)
|
||||
{
|
||||
amphibiousIcon._x = textMC._x + textMC._width + amphibiousIconMargin;
|
||||
}
|
||||
_width = newWidth;
|
||||
}
|
||||
if(newHeight < _height)
|
||||
{
|
||||
_height = newHeight;
|
||||
}
|
||||
}
|
||||
function OnMasterResize(mc)
|
||||
{
|
||||
var _loc1_ = mc.contentStage._x + _X;
|
||||
background._x -= _loc1_;
|
||||
background._width = mc.background._width * 100 / _xscale;
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
_parent._parent.UnregisterMasterResizeListener(this);
|
||||
delete HideHotKeyText;
|
||||
delete SetAmphibious;
|
||||
delete Move;
|
||||
delete OnMasterResize;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
amphibiousIconMargin = 8;
|
||||
_parent._parent.RegisterMasterResizeListener(this);
|
||||
var spacing = textMC.hotKeyText._x - (textMC.titleText._x + textMC.titleText._width);
|
||||
textMC.titleText.text = "$" + qualifyName(this,"Title") + "&outline";
|
||||
textMC.titleText.field.autoSize = "left";
|
||||
textMC.titleText.field._width;
|
||||
textMC.hotKeyText.text = "$" + qualifyName(this,"HotKey") + "&outline";
|
||||
textMC.hotKeyText.field.autoSize = "left";
|
||||
textMC.hotKeyText.field._width;
|
||||
textMC.hotKeyText._x = textMC.titleText.field._x + textMC.titleText.field._width + spacing;
|
||||
verticalSizer._visible = false;
|
||||
initialized = true;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
amphibiousIcon._x = textMC._x + textMC._width + amphibiousIconMargin;
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
@@ -0,0 +1 @@
|
||||
stop();
|
||||
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
function HideHotKeyText()
|
||||
{
|
||||
textMC.gotoAndStop("_noHotKey");
|
||||
}
|
||||
function SetUnitAbilityCategory(category)
|
||||
{
|
||||
gotoAndPlay(category);
|
||||
}
|
||||
function Move(newX, newY, newWidth, newHeight)
|
||||
{
|
||||
_X = newX;
|
||||
_Y = newY;
|
||||
if(newWidth < _width)
|
||||
{
|
||||
var _loc1_ = _width - newWidth;
|
||||
var _loc2_ = textMC._width;
|
||||
textMC._width = _loc1_ >= _loc2_ - 1 ? 1 : _loc2_ - _loc1_;
|
||||
_width = newWidth;
|
||||
}
|
||||
if(newHeight < _height)
|
||||
{
|
||||
_height = newHeight;
|
||||
}
|
||||
}
|
||||
function OnMasterResize(mc)
|
||||
{
|
||||
var _loc1_ = mc.contentStage._x + _X;
|
||||
if(categoryIcon != undefined)
|
||||
{
|
||||
categoryIcon._x -= _loc1_;
|
||||
textMC._x -= _loc1_;
|
||||
}
|
||||
background._x -= _loc1_;
|
||||
background._width = mc.background._width * 100 / _xscale;
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
_parent._parent.UnregisterMasterResizeListener(this);
|
||||
delete HideHotKeyText;
|
||||
delete SetUnitAbilityCategory;
|
||||
delete Move;
|
||||
delete OnMasterResize;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
_parent._parent.RegisterMasterResizeListener(this);
|
||||
var spacing = textMC.hotKeyText._x - (textMC.titleText._x + textMC.titleText._width);
|
||||
textMC.titleText.text = "$" + qualifyName(this,"Title") + "&outline";
|
||||
textMC.titleText.field.autoSize = "left";
|
||||
textMC.titleText.field._width;
|
||||
textMC.hotKeyText.text = "$" + qualifyName(this,"HotKey") + "&outline";
|
||||
textMC.hotKeyText.field.autoSize = "left";
|
||||
textMC.hotKeyText.field._width;
|
||||
textMC.hotKeyText._x = textMC.titleText.field._x + textMC.titleText.field._width + spacing;
|
||||
verticalSizer._visible = false;
|
||||
initialized = true;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
function Move(xArg, yArg, widthArg, heightArg)
|
||||
{
|
||||
_X = Number(xArg);
|
||||
_Y = Number(yArg);
|
||||
_width = Math.min(_width,Number(widthArg));
|
||||
_height = Math.min(_height,Number(heightArg));
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
text.text = "$" + qualifyName(this,"Text") + "&outline";
|
||||
text.field.autoSize = "left";
|
||||
text.field._width;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
initialized = true;
|
||||
}
|
||||
stop();
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
function Resize(widthArg, heightArg)
|
||||
{
|
||||
_width = Number(widthArg);
|
||||
_height = Number(heightArg);
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
initialized = true;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
}
|
||||
stop();
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
on(construct){
|
||||
_type = "";
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
onClipEvent(load){
|
||||
_type = String(_parent) + ":Render";
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
function Move(xArg, yArg, widthArg, heightArg)
|
||||
{
|
||||
_X = Number(xArg);
|
||||
_Y = Number(yArg);
|
||||
_width = Math.min(_width,Number(widthArg));
|
||||
_height = Math.min(_height,Number(heightArg));
|
||||
}
|
||||
function SetAcquired(acquiredArg)
|
||||
{
|
||||
var _loc1_ = Number(acquiredArg) != 0;
|
||||
text.field.textColor = !_loc1_ ? notAcquiredTextColor : acquiredTextColor;
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
delete Move;
|
||||
delete SetAcquired;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
notAcquiredTextColor = 16776960;
|
||||
acquiredTextColor = 65280;
|
||||
text.text = "$" + qualifyName(this,"Text") + "&outline";
|
||||
text.field.textColor = notAcquiredTextColor;
|
||||
text.field.autoSize = "left";
|
||||
text.field._width;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
initialized = true;
|
||||
}
|
||||
stop();
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
function Move(xArg, yArg, widthArg, heightArg)
|
||||
{
|
||||
_X = Number(xArg);
|
||||
_Y = Number(yArg);
|
||||
_width = Math.min(_width,Number(widthArg));
|
||||
_height = Math.min(_height,Number(heightArg));
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
text.text = "$" + qualifyName(this,"Text") + "&outline";
|
||||
text.field.autoSize = "left";
|
||||
text.field._width;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
initialized = true;
|
||||
}
|
||||
stop();
|
||||
@@ -0,0 +1 @@
|
||||
text = "$DESC:Amphibious&outline";
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
function Move(xArg, yArg, widthArg, heightArg)
|
||||
{
|
||||
_X = Number(xArg);
|
||||
_Y = Number(yArg);
|
||||
_width = Math.min(_width,Number(widthArg));
|
||||
_height = Math.min(_height,Number(heightArg));
|
||||
}
|
||||
function SetAmphibious(val)
|
||||
{
|
||||
gotoAndPlay(val == 0 ? "NotAmphibious" : "Amphibious");
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
delete Move;
|
||||
delete SetAmphibious;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
text.text = "$" + qualifyName(this,"Text") + "&outline";
|
||||
text.field.autoSize = "left";
|
||||
text.field._width;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
initialized = true;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
@@ -0,0 +1 @@
|
||||
text = "$UNITABILITYCATEGORY:Instant&outline";
|
||||
@@ -0,0 +1 @@
|
||||
text = "$UNITABILITYCATEGORY:Toggle&outline";
|
||||
@@ -0,0 +1 @@
|
||||
text = "$UNITABILITYCATEGORY:Targeted&outline";
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
function Move(xArg, yArg, widthArg, heightArg)
|
||||
{
|
||||
_X = Number(xArg);
|
||||
_Y = Number(yArg);
|
||||
_width = Math.min(_width,Number(widthArg));
|
||||
_height = Math.min(_height,Number(heightArg));
|
||||
}
|
||||
function SetUnitAbilityCategory(category)
|
||||
{
|
||||
gotoAndPlay(category);
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
delete Move;
|
||||
delete SetUnitAbilityCategory;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
text.text = "$" + qualifyName(this,"Text") + "&outline";
|
||||
text.field.autoSize = "left";
|
||||
text.field._width;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
initialized = true;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
@@ -0,0 +1 @@
|
||||
gotoAndPlay(1);
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
function SetAffordable(valArg)
|
||||
{
|
||||
var _loc1_ = valArg != 0;
|
||||
textClip.field.textColor = !_loc1_ ? 16711680 : 16777215;
|
||||
gotoAndStop(!_loc1_ ? "_cantAfford" : "_canAfford");
|
||||
}
|
||||
function Move(xArg, yArg, widthArg, heightArg)
|
||||
{
|
||||
_X = Number(xArg);
|
||||
_Y = Number(yArg);
|
||||
_width = Math.min(_width,Number(widthArg));
|
||||
_height = Math.min(_height,Number(heightArg));
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
delete SetAffordable;
|
||||
delete Move;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
var rightMargin = background._x + background._width - (textClip._x + textClip._width);
|
||||
textClip.text = "$" + qualifyName(this,"Text") + "&outline";
|
||||
textClip.field.autoSize = "left";
|
||||
textClip.field._width;
|
||||
background._width = textClip._x + textClip._width + rightMargin - background._x;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
initialized = true;
|
||||
}
|
||||
stop();
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
onClipEvent(load){
|
||||
_visible = false;
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
function GetHelpBoxPos()
|
||||
{
|
||||
var _loc4_ = {x:_X,y:_Y};
|
||||
var _loc5_ = _root;
|
||||
var _loc3_ = _parent;
|
||||
while(_loc3_ != _loc5_)
|
||||
{
|
||||
_loc4_.x *= _loc3_._xscale * 0.009999999776482582;
|
||||
_loc4_.y *= _loc3_._yscale * 0.009999999776482582;
|
||||
_loc4_.x += _loc3_._x;
|
||||
_loc4_.y += _loc3_._y;
|
||||
_loc3_ = _loc3_._parent;
|
||||
}
|
||||
return _loc4_;
|
||||
}
|
||||
function GetHelpBoxVerticalAlignment()
|
||||
{
|
||||
return vertAlignment;
|
||||
}
|
||||
function SetHelpBoxVerticalAlignment(newAlignment)
|
||||
{
|
||||
vertAlignment = newAlignment;
|
||||
}
|
||||
function GetHelpBoxHorizontalAlignment()
|
||||
{
|
||||
return horzAlignment;
|
||||
}
|
||||
function SetHelpBoxHorizontalAlignment(newAlignment)
|
||||
{
|
||||
horzAlignment = newAlignment;
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
delete GetHelpBoxPos;
|
||||
delete GetHelpBoxVerticalAlignment;
|
||||
delete SetHelpBoxVerticalAlignment;
|
||||
delete GetHelpBoxHorizontalAlignment;
|
||||
delete SetHelpBoxHorizontalAlignment;
|
||||
delete onUnload;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
onClipEvent(load){
|
||||
_visible = false;
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
function SetAffordable(valArg)
|
||||
{
|
||||
var _loc1_ = valArg != 0;
|
||||
textClip.field.textColor = !_loc1_ ? 16711680 : 16777215;
|
||||
}
|
||||
function OnMasterResize(mc)
|
||||
{
|
||||
var _loc1_ = mc.contentStage._x + _X;
|
||||
background._x = - _loc1_;
|
||||
}
|
||||
function Move(xArg, yArg, widthArg, heightArg)
|
||||
{
|
||||
_X = Number(xArg);
|
||||
_Y = Number(yArg);
|
||||
_width = Math.min(_width,Number(widthArg));
|
||||
_height = Math.min(_height,Number(heightArg));
|
||||
background._width = Number(widthArg) + 5;
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
_parent._parent.UnregisterMasterResizeListener(this);
|
||||
delete SetAffordable;
|
||||
delete Move;
|
||||
delete OnMasterResize;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
_parent._parent.RegisterMasterResizeListener(this);
|
||||
var rightMargin = background._x + background._width - (textClip._x + textClip._width);
|
||||
textClip.text = "$" + qualifyName(this,"Text") + "&outline";
|
||||
textClip.field.autoSize = "left";
|
||||
textClip.field._width;
|
||||
background._width = textClip._x + textClip._width + rightMargin - background._x;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
initialized = true;
|
||||
}
|
||||
stop();
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
function SetAdjusted(valArg)
|
||||
{
|
||||
var _loc1_ = valArg != 0;
|
||||
textClip.field.textColor = !_loc1_ ? 16777215 : 16711680;
|
||||
}
|
||||
function OnMasterResize(mc)
|
||||
{
|
||||
background._width = mc.contentStage._width - _X - 6;
|
||||
}
|
||||
function Move(xArg, yArg, widthArg, heightArg)
|
||||
{
|
||||
_X = Number(xArg);
|
||||
_Y = Number(yArg);
|
||||
_width = Math.min(_width,Number(widthArg));
|
||||
_height = Math.min(_height,Number(heightArg));
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
_parent._parent.UnregisterMasterResizeListener(this);
|
||||
delete SetAdjusted;
|
||||
delete Move;
|
||||
delete OnMasterResize;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
_parent._parent.RegisterMasterResizeListener(this);
|
||||
var rightMargin = background._x + background._width - (textClip._x + textClip._width);
|
||||
textClip.text = "$" + qualifyName(this,"Text") + "&outline";
|
||||
textClip.field.autoSize = "left";
|
||||
textClip.field._width;
|
||||
background._width = textClip._x + textClip._width + rightMargin - background._x;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
initialized = true;
|
||||
}
|
||||
stop();
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
function SetItemCount(countArg)
|
||||
{
|
||||
var _loc7_ = Number(countArg);
|
||||
var _loc6_ = 0;
|
||||
var _loc3_ = 0;
|
||||
while(_loc3_ < _loc7_)
|
||||
{
|
||||
var _loc2_ = items.attachMovie("ChecklistItem",String(_loc3_),_loc3_);
|
||||
_loc2_.text = "$" + qualifyName(this,"Item" + String(_loc3_)) + "&outline";
|
||||
_loc2_.textClip.autoSize = "left";
|
||||
var _loc5_ = _loc2_.checkbox._height;
|
||||
var _loc4_ = _loc2_.textClip._height;
|
||||
if(_loc5_ > _loc4_)
|
||||
{
|
||||
_loc2_.checkbox._y = 0;
|
||||
_loc2_.textClip._y = (_loc5_ - _loc4_) / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc2_.checkbox._y = (_loc4_ - _loc5_) / 2;
|
||||
_loc2_.textClip._y = 0;
|
||||
}
|
||||
_loc2_._y = _loc6_;
|
||||
_loc6_ += _loc2_._height;
|
||||
_loc3_ = _loc3_ + 1;
|
||||
}
|
||||
delete SetItemCount;
|
||||
}
|
||||
function SetItemChecked(indexArg, checkedArg)
|
||||
{
|
||||
var _loc2_ = Number(indexArg);
|
||||
var _loc1_ = Number(checkedArg) != 0;
|
||||
var _loc3_ = items[String(_loc2_)];
|
||||
_loc3_.checkbox.gotoAndPlay(!_loc1_ ? "_unchecked" : "_checked");
|
||||
}
|
||||
function Move(xArg, yArg, widthArg, heightArg)
|
||||
{
|
||||
_X = Number(xArg);
|
||||
_Y = Number(yArg);
|
||||
_width = Math.min(_width,Number(widthArg));
|
||||
_height = Math.min(_height,Number(heightArg));
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
delete SetItemCount;
|
||||
delete SetItemChecked;
|
||||
delete Move;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
headingText = "$" + qualifyName(this,"Heading") + "&outline";
|
||||
headingClip.autoSize = "left";
|
||||
headingClip._width;
|
||||
initialized = true;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
}
|
||||
stop();
|
||||
@@ -0,0 +1 @@
|
||||
stop();
|
||||
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
onClipEvent(load){
|
||||
_visible = false;
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
function Move(xArg, yArg, widthArg, heightArg)
|
||||
{
|
||||
_X = Number(xArg);
|
||||
_Y = Number(yArg);
|
||||
_width = Math.min(_width,Number(widthArg));
|
||||
_height = Math.min(_height,Number(heightArg));
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
delete Move;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
var labelX = productionLabelField._x;
|
||||
var margin = productionValueField._x - (productionLabelField._x + productionLabelField._width);
|
||||
var rightMargin = background._width - (productionValueField._x + productionValueField._width);
|
||||
productionLabelText = "$" + qualifyName(this,"ProductionLabel") + "&outline";
|
||||
productionLabelField.autoSize = "left";
|
||||
productionLabelField._width;
|
||||
productionValueText = "$" + qualifyName(this,"ProductionValue") + "&outline";
|
||||
productionValueField.autoSize = "left";
|
||||
productionValueField._width;
|
||||
consumptionLabelText = "$" + qualifyName(this,"ConsumptionLabel") + "&outline";
|
||||
consumptionLabelField.autoSize = "left";
|
||||
consumptionLabelField._width;
|
||||
consumptionValueText = "$" + qualifyName(this,"ConsumptionValue") + "&outline";
|
||||
consumptionValueField.autoSize = "left";
|
||||
consumptionValueField._width;
|
||||
var labelWidth = Math.max(productionLabelField._width,consumptionLabelField._width);
|
||||
productionLabelField._x = labelX + (labelWidth - productionLabelField._width);
|
||||
consumptionLabelField._x = labelX + (labelWidth - consumptionLabelField._width);
|
||||
var valueWidth = Math.max(productionValueField._width,consumptionValueField._width);
|
||||
var valueX = labelX + labelWidth + margin;
|
||||
productionValueField._x = valueX + (valueWidth - productionValueField._width);
|
||||
consumptionValueField._x = valueX + (valueWidth - consumptionValueField._width);
|
||||
background._width = valueX + valueWidth + rightMargin;
|
||||
background._visible = false;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
initialized = true;
|
||||
}
|
||||
stop();
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
function Resize(widthArg, heightArg)
|
||||
{
|
||||
_width = Number(widthArg);
|
||||
_height = Number(heightArg);
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
initialized = true;
|
||||
}
|
||||
stop();
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
on(construct){
|
||||
_type = "";
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
onClipEvent(load){
|
||||
_type = qualifyName(_parent,"Render");
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
function GetContentStage()
|
||||
{
|
||||
return Pointer.encode(box.contentStage);
|
||||
}
|
||||
function AlignVertically(siteY)
|
||||
{
|
||||
if(siteVerticalAlignment == "top")
|
||||
{
|
||||
box._y = siteY;
|
||||
}
|
||||
else if(siteVerticalAlignment == "bottom")
|
||||
{
|
||||
box._y = siteY - box.background._height;
|
||||
}
|
||||
else
|
||||
{
|
||||
box._y = siteY - box.background._height / 2;
|
||||
}
|
||||
}
|
||||
function AlignHorizontally(siteX)
|
||||
{
|
||||
if(siteHorizontalAlignment == "left")
|
||||
{
|
||||
box._x = siteX;
|
||||
}
|
||||
else if(siteHorizontalAlignment == "right")
|
||||
{
|
||||
box._x = siteX - box.background._width;
|
||||
}
|
||||
else
|
||||
{
|
||||
box._x = siteX - box.background._width / 2;
|
||||
}
|
||||
}
|
||||
function Open(siteRef, newContentWidth, newContentHeight)
|
||||
{
|
||||
site = Pointer.decode(siteRef);
|
||||
newContentWidth = Number(newContentWidth);
|
||||
newContentHeight = Number(newContentHeight);
|
||||
box._visible = false;
|
||||
var _loc3_ = newContentWidth + contentLeftMargin + contentRightMargin;
|
||||
var _loc2_ = newContentHeight + contentTopMargin + contentBottomMargin;
|
||||
var _loc4_ = _loc3_;
|
||||
box.frameTop._width = _loc4_;
|
||||
box.frameBottom._width = _loc4_;
|
||||
var _loc8_ = _loc3_ - box.frameRight._width;
|
||||
box.frameRight._x = _loc8_;
|
||||
var _loc5_ = _loc2_;
|
||||
box.frameLeft._height = _loc5_;
|
||||
box.frameRight._height = _loc5_;
|
||||
var _loc9_ = _loc2_ - box.frameBottom._height;
|
||||
box.frameBottom._y = _loc9_;
|
||||
box.background._width = _loc3_;
|
||||
box.background._height = _loc2_;
|
||||
box.contentStage._x = contentLeftMargin;
|
||||
box.contentStage._y = contentTopMargin;
|
||||
curContentWidth = newContentWidth;
|
||||
curContentHeight = newContentHeight;
|
||||
siteVerticalAlignment = site.GetHelpBoxVerticalAlignment();
|
||||
siteHorizontalAlignment = site.GetHelpBoxHorizontalAlignment();
|
||||
box.OnMasterResize(box);
|
||||
onEnterFrame = function()
|
||||
{
|
||||
MoveToSite();
|
||||
box._visible = true;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnOpen"),"");
|
||||
onEnterFrame = MoveToSite;
|
||||
};
|
||||
}
|
||||
function GlobalToLocal(pos)
|
||||
{
|
||||
var _loc9_ = _root;
|
||||
var _loc6_ = 0;
|
||||
var _loc5_ = 0;
|
||||
var _loc8_ = 1;
|
||||
var _loc7_ = 1;
|
||||
ancestor = this;
|
||||
while(ancestor != _loc9_)
|
||||
{
|
||||
var _loc4_ = ancestor._xscale * 0.009999999776482582;
|
||||
_loc6_ *= _loc4_;
|
||||
_loc6_ -= ancestor._x;
|
||||
_loc8_ /= _loc4_;
|
||||
var _loc3_ = ancestor._yscale * 0.009999999776482582;
|
||||
_loc5_ *= _loc3_;
|
||||
_loc5_ -= ancestor._y;
|
||||
_loc7_ /= _loc3_;
|
||||
ancestor = ancestor._parent;
|
||||
}
|
||||
pos.x = (pos.x + _loc6_) * _loc8_;
|
||||
pos.y = (pos.y + _loc5_) * _loc7_;
|
||||
}
|
||||
function MoveToSite()
|
||||
{
|
||||
if(site == undefined)
|
||||
{
|
||||
return undefined;
|
||||
}
|
||||
var _loc3_ = site.GetHelpBoxPos();
|
||||
GlobalToLocal(_loc3_);
|
||||
var _loc5_ = site.GetHelpBoxVerticalAlignment();
|
||||
var _loc8_ = site.GetHelpBoxHorizontalAlignment();
|
||||
if(_loc5_ != siteVerticalAlignment || _loc8_ != siteHorizontalAlignment)
|
||||
{
|
||||
siteVerticalAlignment = _loc5_;
|
||||
siteHorizontalAlignment = _loc8_;
|
||||
}
|
||||
AlignVertically(_loc3_.y);
|
||||
AlignHorizontally(_loc3_.x);
|
||||
if(_root.displayLeft == undefined)
|
||||
{
|
||||
return undefined;
|
||||
}
|
||||
var _loc2_ = _root.displayLeft;
|
||||
var _loc4_ = _root.displayTop;
|
||||
var _loc6_ = _loc2_ + _root.displayWidth;
|
||||
var _loc7_ = _loc4_ + _root.displayHeight;
|
||||
if(box._x < _loc2_)
|
||||
{
|
||||
box._x = _loc2_;
|
||||
}
|
||||
if(box._x + box._width > _loc6_)
|
||||
{
|
||||
box._x = _loc6_ - box._width;
|
||||
}
|
||||
if(box._y < _loc4_)
|
||||
{
|
||||
box._y = _loc4_;
|
||||
}
|
||||
if(box._y + box._height > _loc7_)
|
||||
{
|
||||
box._y = _loc7_ - box._height;
|
||||
}
|
||||
}
|
||||
function Close()
|
||||
{
|
||||
delete onEnterFrame;
|
||||
box._visible = false;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnClosed"),"");
|
||||
}
|
||||
function Hide()
|
||||
{
|
||||
box._visible = false;
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
delete GetContentStage;
|
||||
delete Open;
|
||||
delete onEnterFrame;
|
||||
delete AlignVertically;
|
||||
delete AlignHorizontally;
|
||||
delete GlobalToLocal;
|
||||
delete MoveToSite;
|
||||
delete Close;
|
||||
delete Hide;
|
||||
delete onUnload;
|
||||
}
|
||||
if(!initialized)
|
||||
{
|
||||
curContentWidth = box.contentSizer._width;
|
||||
curContentHeight = box.contentSizer._height;
|
||||
contentLeftMargin = box.contentSizer._x;
|
||||
contentRightMargin = box._width - (box.contentSizer._x + curContentWidth);
|
||||
contentTopMargin = box.contentStage._y;
|
||||
contentBottomMargin = box._height - (box.contentSizer._y + curContentHeight);
|
||||
initialized = true;
|
||||
// Forbidden
|
||||
getURL("FSCommand:" add qualifyName(this,"OnInitialized"),"");
|
||||
}
|
||||
stop();
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
onClipEvent(load){
|
||||
_visible = false;
|
||||
}
|
||||
Reference in New Issue
Block a user