first commit
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
on(construct){
|
||||
_type = "GameWindow";
|
||||
_Init = "AptMapPreview::MapGadgetInit";
|
||||
_Load = "Apt/MpMapWindow.wnd";
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
onClipEvent(load){
|
||||
var component = _parent._parent;
|
||||
this.stringValue = "$" + component.stringName + _parent._name;
|
||||
this.TheString._width = component.stringWidth;
|
||||
var color = new Color(TheString);
|
||||
var externName = "GameLoading:PlayerColor:" + _parent._name;
|
||||
var colorVal = _root.GetExtern(externName);
|
||||
if(colorVal == undefined)
|
||||
{
|
||||
colorVal = 4280283648 * (Number(_parent._name) + 1);
|
||||
}
|
||||
color.setRGB(Number(colorVal));
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
function AddSegment(from, seg)
|
||||
{
|
||||
var _loc2_ = from._x + seg * vSpacingX;
|
||||
var _loc3_ = from.duplicateMovieClip(from._name + "_" + seg,vDepth++,{_x:_loc2_});
|
||||
}
|
||||
function SetPercent(newPercent)
|
||||
{
|
||||
var _loc2_ = false;
|
||||
while(!_loc2_)
|
||||
{
|
||||
_loc2_ = true;
|
||||
trace("vCurPercent:" + vCurPercent + " ," + newPercent);
|
||||
if(vCurPercent < newPercent && vCurPercent < 100)
|
||||
{
|
||||
var _loc3_ = Math.round(vNumSegments * vCurPercent / 100);
|
||||
vCurPercent++;
|
||||
trace("vCurPercent:" + vCurPercent);
|
||||
var _loc1_ = Math.round(vNumSegments * vCurPercent / 100);
|
||||
if(_loc3_ != _loc1_)
|
||||
{
|
||||
AddSegment(ProgressFull,_loc1_);
|
||||
}
|
||||
if(vCurPercent == 100)
|
||||
{
|
||||
clearInterval(vIntervalId);
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc2_ = vCurPercent >= newPercent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var vCurPercent = 0;
|
||||
var vNumSegments = 25;
|
||||
var vSpacingX = 11;
|
||||
var vDepth = 100;
|
||||
var seg = 1;
|
||||
while(seg <= vNumSegments)
|
||||
{
|
||||
AddSegment(ProgressEmpty,seg);
|
||||
seg++;
|
||||
}
|
||||
var vIntervalId = setInterval(FrameUpdate,100);
|
||||
@@ -0,0 +1,20 @@
|
||||
function SetPercent(to)
|
||||
{
|
||||
if(to >= vCurrentPrecent)
|
||||
{
|
||||
vCurrentPrecent = to;
|
||||
if(to <= 0)
|
||||
{
|
||||
_visible = false;
|
||||
Text.text = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
_visible = true;
|
||||
Text.text = String(vCurrentPrecent) + "%" + "&dropShadow";
|
||||
}
|
||||
Bar.SetPercent(to);
|
||||
}
|
||||
}
|
||||
var vCurrentPrecent = -1;
|
||||
SetPercent(-1);
|
||||
@@ -0,0 +1,5 @@
|
||||
function SetBarTo(index, percent)
|
||||
{
|
||||
var _loc2_ = "Bar" + index;
|
||||
this[_loc2_].SetPercent(percent);
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
on(construct){
|
||||
_type = "RenderImage";
|
||||
_imageMap = "RankIcon_6";
|
||||
_mode = "SOLID";
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
on(construct){
|
||||
_type = "RenderImage";
|
||||
_imageMap = "RankIcon_1";
|
||||
_mode = "SOLID";
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
on(construct){
|
||||
_type = "RenderImage";
|
||||
_imageMap = "RankIcon_0";
|
||||
_mode = "SOLID";
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
on(construct){
|
||||
_type = "RenderImage";
|
||||
_imageMap = "RankIcon_7";
|
||||
_mode = "SOLID";
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
on(construct){
|
||||
_type = "RenderImage";
|
||||
_imageMap = "RankIcon_5";
|
||||
_mode = "SOLID";
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
on(construct){
|
||||
_type = "RenderImage";
|
||||
_imageMap = "RankIcon_4";
|
||||
_mode = "SOLID";
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
on(construct){
|
||||
_type = "RenderImage";
|
||||
_imageMap = "RankIcon_3";
|
||||
_mode = "SOLID";
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
on(construct){
|
||||
_type = "RenderImage";
|
||||
_imageMap = "RankIcon_2";
|
||||
_mode = "SOLID";
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
on(construct){
|
||||
stringWidth = 320;
|
||||
stringName = "LoadingScreen::PlayerName";
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
on(construct){
|
||||
stringWidth = 60;
|
||||
stringName = "LoadingScreen::TeamNumber";
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
on(construct){
|
||||
stringWidth = 70;
|
||||
stringName = "LoadingScreen::ArmyName";
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
title.text = $Loading + "&dropShadow";
|
||||
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
onClipEvent(load){
|
||||
this.stringName = "$GUI:PlayerName";
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
onClipEvent(load){
|
||||
this.stringName = "$GUI:TeamNumber";
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
onClipEvent(load){
|
||||
this.stringName = "$GUI:ArmyName";
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
onClipEvent(load){
|
||||
this.stringName = "$GUI:PlayerProgress";
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
stop();
|
||||
@@ -0,0 +1,152 @@
|
||||
function GameCode(func, params)
|
||||
{
|
||||
trace("Call " + _root.CodePrefix + "::" + func + "(" + params + ")");
|
||||
// Checked
|
||||
getURL("FSCommand:" add (_root.CodePrefix + "::" + func),params);
|
||||
}
|
||||
function GameCodeNoPrefix(func, params)
|
||||
{
|
||||
trace("Call(NP) " + func + "(" + params + ")");
|
||||
// Never used
|
||||
// Checked
|
||||
getURL("FSCommand:" add func,params);
|
||||
}
|
||||
function PlaySound(name)
|
||||
{
|
||||
if(!_root.Initialized)
|
||||
{
|
||||
return undefined;
|
||||
}
|
||||
// Checked
|
||||
getURL("FSCommand:PlaySound",name);
|
||||
}
|
||||
function InitialSetup()
|
||||
{
|
||||
_root.Initialized = false;
|
||||
if(extern.InGame)
|
||||
{
|
||||
_global.InGame = true;
|
||||
_global.InBetaDemo = undefined;
|
||||
_global.InDreamMachineDemo = undefined;
|
||||
}
|
||||
_root.InitFunc();
|
||||
_root.Initialized = true;
|
||||
}
|
||||
function EnableComponents(path)
|
||||
{
|
||||
trace("EnableComponents:" + path);
|
||||
// Checked
|
||||
getURL("FSCommand:EnableComponents",path);
|
||||
}
|
||||
function DisableComponents(path)
|
||||
{
|
||||
trace("DisableComponents:" + path);
|
||||
// Checked
|
||||
getURL("FSCommand:DisableComponents",path);
|
||||
}
|
||||
function GetExtern(ext, testDefault)
|
||||
{
|
||||
var _loc3_ = undefined;
|
||||
if(_global.InGame)
|
||||
{
|
||||
_loc3_ = extern[ext];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_root[ext] == undefined)
|
||||
{
|
||||
_loc3_ = testDefault;
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc3_ = _root[ext];
|
||||
}
|
||||
trace("GetExtern(" + ext + ")=>" + _loc3_);
|
||||
}
|
||||
return _loc3_;
|
||||
}
|
||||
function SetExtern(ext, to)
|
||||
{
|
||||
if(_global.InGame)
|
||||
{
|
||||
extern[ext] = to;
|
||||
}
|
||||
else
|
||||
{
|
||||
_root[ext] = to;
|
||||
trace("SetExtern(" + ext + ")=>" + to);
|
||||
}
|
||||
}
|
||||
function ToggleExtern(ext)
|
||||
{
|
||||
var _loc3_ = undefined;
|
||||
if(_global.InGame)
|
||||
{
|
||||
_loc3_ = !Number(extern[ext]);
|
||||
extern[ext] = _loc3_;
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc3_ = !_root[ext];
|
||||
_root[ext] = _loc3_;
|
||||
}
|
||||
return _loc3_;
|
||||
}
|
||||
function StopBackground()
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:SetBackground", "off");
|
||||
}
|
||||
function FadeInBackground()
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:SetBackground", "fadein");
|
||||
}
|
||||
function FadeOutBackground()
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:SetBackground", "fadeout");
|
||||
}
|
||||
function FindAbsolute(of, from)
|
||||
{
|
||||
if(from._parent == undefined)
|
||||
{
|
||||
return from[of];
|
||||
}
|
||||
return FindAbsolute(of,from._parent) + from[of];
|
||||
}
|
||||
function SetBarTo(index, percent)
|
||||
{
|
||||
_root.UIClip.ProgressBars.SetBarTo(index,percent);
|
||||
}
|
||||
function AnimsOpen()
|
||||
{
|
||||
frames.gotoAndPlay(1);
|
||||
screen.gotoAndPlay(1);
|
||||
textAnim.gotoAndPlay(1);
|
||||
pageTitle.gotoAndPlay(1);
|
||||
}
|
||||
_root.CodePrefix = "AptGameLoading";
|
||||
colorInnerFrameA = "3399FF";
|
||||
colorInnerFrameB = "3399FF";
|
||||
colorLine = "3399FF";
|
||||
colorGadgetBox = "3399FF";
|
||||
colorGadgetGameSpeed = "3399FF";
|
||||
colorTextDark = "0x57512B";
|
||||
colorTextBright = "0x31210F";
|
||||
colorSubTextBright = "0xC2F47D";
|
||||
colorSubTextDark = "0x57842B";
|
||||
colorTitleA = "0xCDE47E";
|
||||
tabTextColorDark = "0x123B15";
|
||||
tabTextColorBritght = "0x8ac14d";
|
||||
if(!_root.Initialized)
|
||||
{
|
||||
if(_root.InitFunc == undefined)
|
||||
{
|
||||
_root.InitFunc = function()
|
||||
{
|
||||
GameCode("OnInitialized");
|
||||
};
|
||||
}
|
||||
InitialSetup();
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
on(construct){
|
||||
_type = "ListBox";
|
||||
_Init = "AptMapPreview::MapGadgetInit";
|
||||
_Load = "Apt/ListBox.wnd";
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
on(construct){
|
||||
vAlpha = false;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
on(construct){
|
||||
_type = "AptMapPreview::Picture";
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
on(construct){
|
||||
vFlashCommander = false;
|
||||
vFlashOnlineId = false;
|
||||
vShowOnlineId = false;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
stop();
|
||||
@@ -0,0 +1 @@
|
||||
AnimsOpen();
|
||||
Reference in New Issue
Block a user