Frame 1
System.security.allowDomain("www.combots.seantcooper.com");
var mContextMenu;
var tItemHandler = function (obj, item) {
getURL ("http://www.games.seantcooper.com", "_blank");
};
var tMenuHandler = function (obj, menuObj) {
};
mContextMenu = new ContextMenu(tMenuHandler);
mContextMenu.hideBuiltInItems();
mContextMenu.customItems.push(new ContextMenuItem("\u00A9 Sean Cooper 2006", tItemHandler));
_root.menu = mContextMenu;
_global.mURLWindow = "_blank";
gotoAndPlay ("START_LOAD");
Frame 10
gotoAndPlay ("LOADING");
mLoadingTimeStamp = getTimer();
Frame 21
var f1 = (this.getBytesLoaded() / this.getBytesTotal());
var f2 = ((getTimer() - mLoadingTimeStamp) / 500);
if (f2 > 1) {
f2 = 1;
}
var f = ((f1 < f2) ? (f1) : (f2));
_LoadingBar.gotoAndStop(int(f * 100) + 1);
if (f == 1) {
gotoAndPlay ("LOADED");
} else {
gotoAndPlay ("LOADING");
}
Frame 40
Frame 50
stop();
mLoadingText = "LOADED";
_Cover._alpha = 0;
var mTimeStamp = getTimer();
var mFrameRate = 30;
var mCounter = (mFrameRate * 2);
onEnterFrame = function () {
while ((getTimer() - mTimeStamp) > (1000 / mFrameRate)) {
mCounter--;
mTimeStamp = mTimeStamp + (1000 / mFrameRate);
if (mCounter < 0) {
_Cover._alpha = _Cover._alpha + 2;
if (_Cover._alpha >= 100) {
delete onEnterFrame;
play();
return(undefined);
}
}
}
};
Frame 60
Frame 61
_global.MODEL_Tank_Chassis_2 = "@0MATERIALLIST@1MATERIAL@2NAME:FrontColor@2COLOR:255,225,225,200@1MATERIAL@2NAME:BackColor@2COLOR:255,128,128,200@1MATERIAL@2NAME:White@2COLOR:255,255,255,255@1MATERIAL@2NAME:Black@2COLOR:255,0,0,0@0MODEL@1NAME:MDL-Mesh1@1ID:1@1MESH@2POSITIONLIST@3V:-0.65,6,4.96@3V:0.65,6,4.96@3V:1.91,6,4.62@3V:3.04,6,3.97@3V:3.97,6,3.04@3V:4.62,6,1.91@3V:4.96,6,0.65@3V:4.96,6,-0.65@3V:4.62,6,-1.91@3V:3.97,6,-3.04@3V:3.04,6,-3.97@3V:1.91,6,-4.62@3V:0.65,6,-4.96@3V:-0.65,6,-4.96@3V:-1.91,6,-4.62@3V:-3.04,6,-3.97@3V:-3.97,6,-3.04@3V:-4.62,6,-1.91@3V:-4.96,6,-0.65@3V:-4.96,6,0.65@3V:-4.62,6,1.91@3V:-3.97,6,3.04@3V:-3.04,6,3.97@3V:-1.91,6,4.62@3V:-0.65,1,4.96@3V:0.65,1,4.96@3V:-1.91,1,4.62@3V:-3.04,1,3.97@3V:-3.97,1,3.04@3V:-4.62,1,1.91@3V:-4.96,1,0.65@3V:-4.96,1,-0.65@3V:-4.62,1,-1.91@3V:-3.97,1,-3.04@3V:-3.04,1,-3.97@3V:-1.91,1,-4.62@3V:-0.65,1,-4.96@3V:0.65,1,-4.96@3V:1.91,1,-4.62@3V:3.04,1,-3.97@3V:3.97,1,-3.04@3V:4.62,1,-1.91@3V:4.96,1,-0.65@3V:3.97,1,3.04@3V:4.62,1,1.91@3V:3.04,1,3.97@3V:1.91,1,4.62@3V:0.52,1,-3.97@3V:-0.52,1,-3.97@3V:-1.53,1,-3.7@3V:-2.44,1,-3.17@3V:-3.17,1,-2.44@3V:-3.7,1,-1.53@3V:-3.97,1,-0.52@3V:-3.97,1,0.52@3V:-3.7,1,1.53@3V:-3.17,1,2.44@3V:-2.44,1,3.17@3V:-1.53,1,3.7@3V:-0.52,1,3.97@3V:0.52,1,3.97@3V:1.53,1,3.7@3V:2.44,1,3.17@3V:3.17,1,2.44@3V:3.7,1,1.53@3V:3.97,1,0.52@3V:3.97,1,-0.52@3V:3.7,1,-1.53@3V:3.17,1,-2.44@3V:2.44,1,-3.17@3V:1.53,1,-3.7@3V:0.52,0,-3.97@3V:-0.52,0,-3.97@3V:1.53,0,-3.7@3V:2.44,0,-3.17@3V:3.17,0,-2.44@3V:3.7,0,-1.53@3V:3.97,0,-0.52@3V:3.97,0,0.52@3V:3.7,0,1.53@3V:3.17,0,2.44@3V:2.44,0,3.17@3V:1.53,0,3.7@3V:0.52,0,3.97@3V:-0.52,0,3.97@3V:-1.53,0,3.7@3V:-2.44,0,3.17@3V:-3.17,0,2.44@3V:-3.7,0,1.53@3V:-3.97,0,0.52@3V:-3.97,0,-0.52@3V:-3.7,0,-1.53@3V:-3.17,0,-2.44@3V:-2.44,0,-3.17@3V:-1.53,0,-3.7@3V:4.96,1,0.65@3V:4.96,2.97,0.2@3V:4.96,2.92,0.18@3V:4.96,2.88,0.16@3V:4.96,2.84,0.12@3V:4.96,2.82,0.08@3V:4.96,2.8,0.03@3V:4.96,2.8,-0.03@3V:4.96,2.82,-0.08@3V:4.96,2.84,-0.12@3V:4.96,2.88,-0.16@3V:4.96,2.92,-0.18@3V:4.96,2.97,-0.2@3V:4.96,3.03,-0.2@3V:4.96,3.08,0.18@3V:4.96,3.03,0.2@3V:4.96,3.12,0.16@3V:4.96,3.16,0.12@3V:4.96,3.18,0.08@3V:4.96,3.2,0.03@3V:4.96,3.2,-0.03@3V:4.96,3.18,-0.08@3V:4.96,3.16,-0.12@3V:4.96,3.12,-0.16@3V:4.96,3.08,-0.18@3N:0,1,0@3N:-0.13,0,0.99@3N:0.13,0,0.99@3N:-0.38,0,0.92@3N:-0.61,0,0.79@3N:-0.79,0,0.61@3N:-0.92,0,0.38@3N:-0.99,0,0.13@3N:-0.99,0,-0.13@3N:-0.92,0,-0.38@3N:-0.79,0,-0.61@3N:-0.61,0,-0.79@3N:-0.38,0,-0.92@3N:-0.13,0,-0.99@3N:0.13,0,-0.99@3N:0.38,0,-0.92@3N:0.61,0,-0.79@3N:0.79,0,-0.61@3N:0.92,0,-0.38@3N:0.99,0,-0.13@3N:0.79,0,0.61@3N:0.92,0,0.38@3N:0.61,0,0.79@3N:0.38,0,0.92@3N:0.13,0,-0.99@3N:-0.13,0,-0.99@3N:0.38,0,-0.92@3N:0.61,0,-0.79@3N:0.79,0,-0.61@3N:0.92,0,-0.38@3N:0.99,0,-0.13@3N:0.99,0,0.13@3N:0.92,0,0.38@3N:0.79,0,0.61@3N:0.61,0,0.79@3N:0.38,0,0.92@3N:0.13,0,0.99@3N:-0.13,0,0.99@3N:-0.38,0,0.92@3N:-0.61,0,0.79@3N:-0.79,0,0.61@3N:-0.92,0,0.38@3N:-0.99,0,0.13@3N:-0.99,0,-0.13@3N:-0.92,0,-0.38@3N:-0.79,0,-0.61@3N:-0.61,0,-0.79@3N:-0.38,0,-0.92@3N:0.99,0,0.13@3N:1,0,0@2POLYGONLIST@3NAME:Faces1@3MATERIAL:White@3FACE@4V:0@4N:0@4V:1@4N:0@4V:2@4N:0@4V:3@4N:0@4V:4@4N:0@4V:5@4N:0@4V:6@4N:0@4V:7@4N:0@4V:8@4N:0@4V:9@4N:0@4V:10@4N:0@4V:11@4N:0@4V:12@4N:0@4V:13@4N:0@4V:14@4N:0@4V:15@4N:0@4V:16@4N:0@4V:17@4N:0@4V:18@4N:0@4V:19@4N:0@4V:20@4N:0@4V:21@4N:0@4V:22@4N:0@4V:23@4N:0@3FACE@4V:0@4N:1@4V:24@4N:1@4V:25@4N:2@4V:1@4N:2@3FACE@4V:23@4N:3@4V:26@4N:3@4V:24@4N:1@4V:0@4N:1@3FACE@4V:22@4N:4@4V:27@4N:4@4V:26@4N:3@4V:23@4N:3@3FACE@4V:21@4N:5@4V:28@4N:5@4V:27@4N:4@4V:22@4N:4@3FACE@4V:20@4N:6@4V:29@4N:6@4V:28@4N:5@4V:21@4N:5@3FACE@4V:19@4N:7@4V:30@4N:7@4V:29@4N:6@4V:20@4N:6@3FACE@4V:18@4N:8@4V:31@4N:8@4V:30@4N:7@4V:19@4N:7@3FACE@4V:17@4N:9@4V:32@4N:9@4V:31@4N:8@4V:18@4N:8@3FACE@4V:16@4N:10@4V:33@4N:10@4V:32@4N:9@4V:17@4N:9@3FACE@4V:15@4N:11@4V:34@4N:11@4V:33@4N:10@4V:16@4N:10@3FACE@4V:14@4N:12@4V:35@4N:12@4V:34@4N:11@4V:15@4N:11@3FACE@4V:13@4N:13@4V:36@4N:13@4V:35@4N:12@4V:14@4N:12@3FACE@4V:12@4N:14@4V:37@4N:14@4V:36@4N:13@4V:13@4N:13@3FACE@4V:11@4N:15@4V:38@4N:15@4V:37@4N:14@4V:12@4N:14@3FACE@4V:10@4N:16@4V:39@4N:16@4V:38@4N:15@4V:11@4N:15@3FACE@4V:9@4N:17@4V:40@4N:17@4V:39@4N:16@4V:10@4N:16@3FACE@4V:8@4N:18@4V:41@4N:18@4V:40@4N:17@4V:9@4N:17@3FACE@4V:7@4N:19@4V:42@4N:19@4V:41@4N:18@4V:8@4N:18@3FACE@4V:4@4N:20@4V:43@4N:20@4V:44@4N:21@4V:5@4N:21@3FACE@4V:3@4N:22@4V:45@4N:22@4V:43@4N:20@4V:4@4N:20@3FACE@4V:2@4N:23@4V:46@4N:23@4V:45@4N:22@4V:3@4N:22@3FACE@4V:1@4N:2@4V:25@4N:2@4V:46@4N:23@4V:2@4N:23@3FACE@4V:95@4N:48@4V:96@4N:49@4V:6@4N:48@3FACE@4V:96@4N:49@4V:95@4N:48@4V:97@4N:49@3FACE@4V:97@4N:49@4V:95@4N:48@4V:42@4N:19@3FACE@4V:97@4N:49@4V:42@4N:19@4V:98@4N:49@3FACE@4V:98@4N:49@4V:42@4N:19@4V:99@4N:49@3FACE@4V:99@4N:49@4V:42@4N:19@4V:100@4N:49@3FACE@4V:100@4N:49@4V:42@4N:19@4V:101@4N:49@3FACE@4V:101@4N:49@4V:42@4N:19@4V:102@4N:49@3FACE@4V:102@4N:49@4V:42@4N:19@4V:103@4N:49@3FACE@4V:103@4N:49@4V:42@4N:19@4V:104@4N:49@3FACE@4V:104@4N:49@4V:42@4N:19@4V:105@4N:49@3FACE@4V:105@4N:49@4V:42@4N:19@4V:106@4N:49@3FACE@4V:106@4N:49@4V:42@4N:19@4V:107@4N:49@3FACE@4V:107@4N:49@4V:42@4N:19@4V:108@4N:49@3FACE@4V:6@4N:48@4V:109@4N:49@4V:7@4N:19@3FACE@4V:109@4N:49@4V:6@4N:48@4V:110@4N:49@3FACE@4V:110@4N:49@4V:6@4N:48@4V:96@4N:49@3FACE@4V:7@4N:19@4V:109@4N:49@4V:111@4N:49@3FACE@4V:7@4N:19@4V:111@4N:49@4V:112@4N:49@3FACE@4V:7@4N:19@4V:112@4N:49@4V:113@4N:49@3FACE@4V:7@4N:19@4V:113@4N:49@4V:114@4N:49@3FACE@4V:7@4N:19@4V:114@4N:49@4V:115@4N:49@3FACE@4V:7@4N:19@4V:115@4N:49@4V:116@4N:49@3FACE@4V:7@4N:19@4V:116@4N:49@4V:117@4N:49@3FACE@4V:7@4N:19@4V:117@4N:49@4V:118@4N:49@3FACE@4V:7@4N:19@4V:118@4N:49@4V:119@4N:49@3FACE@4V:7@4N:19@4V:119@4N:49@4V:108@4N:49@3FACE@4V:7@4N:19@4V:108@4N:49@4V:42@4N:19@3FACE@4V:5@4N:21@4V:44@4N:21@4V:95@4N:48@4V:6@4N:48@2POLYGONLIST@3NAME:Faces2@3MATERIAL:FrontColor@3FACE@4V:47@4N:0@4V:48@4N:0@4V:49@4N:0@4V:50@4N:0@4V:51@4N:0@4V:52@4N:0@4V:53@4N:0@4V:54@4N:0@4V:55@4N:0@4V:56@4N:0@4V:57@4N:0@4V:58@4N:0@4V:59@4N:0@4V:60@4N:0@4V:61@4N:0@4V:62@4N:0@4V:63@4N:0@4V:64@4N:0@4V:65@4N:0@4V:66@4N:0@4V:67@4N:0@4V:68@4N:0@4V:69@4N:0@4V:70@4N:0@3FACE@4V:71@4N:24@4V:72@4N:25@4V:48@4N:25@4V:47@4N:24@3FACE@4V:73@4N:26@4V:71@4N:24@4V:47@4N:24@4V:70@4N:26@3FACE@4V:74@4N:27@4V:73@4N:26@4V:70@4N:26@4V:69@4N:27@3FACE@4V:75@4N:28@4V:74@4N:27@4V:69@4N:27@4V:68@4N:28@3FACE@4V:76@4N:29@4V:75@4N:28@4V:68@4N:28@4V:67@4N:29@3FACE@4V:77@4N:30@4V:76@4N:29@4V:67@4N:29@4V:66@4N:30@3FACE@4V:78@4N:31@4V:77@4N:30@4V:66@4N:30@4V:65@4N:31@3FACE@4V:79@4N:32@4V:78@4N:31@4V:65@4N:31@4V:64@4N:32@3FACE@4V:80@4N:33@4V:79@4N:32@4V:64@4N:32@4V:63@4N:33@3FACE@4V:81@4N:34@4V:80@4N:33@4V:63@4N:33@4V:62@4N:34@3FACE@4V:82@4N:35@4V:81@4N:34@4V:62@4N:34@4V:61@4N:35@3FACE@4V:83@4N:36@4V:82@4N:35@4V:61@4N:35@4V:60@4N:36@3FACE@4V:84@4N:37@4V:83@4N:36@4V:60@4N:36@4V:59@4N:37@3FACE@4V:85@4N:38@4V:84@4N:37@4V:59@4N:37@4V:58@4N:38@3FACE@4V:86@4N:39@4V:85@4N:38@4V:58@4N:38@4V:57@4N:39@3FACE@4V:87@4N:40@4V:86@4N:39@4V:57@4N:39@4V:56@4N:40@3FACE@4V:88@4N:41@4V:87@4N:40@4V:56@4N:40@4V:55@4N:41@3FACE@4V:89@4N:42@4V:88@4N:41@4V:55@4N:41@4V:54@4N:42@3FACE@4V:90@4N:43@4V:89@4N:42@4V:54@4N:42@4V:53@4N:43@3FACE@4V:91@4N:44@4V:90@4N:43@4V:53@4N:43@4V:52@4N:44@3FACE@4V:92@4N:45@4V:91@4N:44@4V:52@4N:44@4V:51@4N:45@3FACE@4V:93@4N:46@4V:92@4N:45@4V:51@4N:45@4V:50@4N:46@3FACE@4V:94@4N:47@4V:93@4N:46@4V:50@4N:46@4V:49@4N:47@3FACE@4V:72@4N:25@4V:94@4N:47@4V:49@4N:47@4V:48@4N:25@2POLYGONLIST@3NAME:Faces3@3MATERIAL:Black@3FACE@4V:105@4N:49@4V:106@4N:49@4V:107@4N:49@4V:108@4N:49@4V:119@4N:49@4V:118@4N:49@4V:117@4N:49@4V:116@4N:49@4V:115@4N:49@4V:114@4N:49@4V:113@4N:49@4V:112@4N:49@4V:111@4N:49@4V:109@4N:49@4V:110@4N:49@4V:96@4N:49@4V:97@4N:49@4V:98@4N:49@4V:99@4N:49@4V:100@4N:49@4V:101@4N:49@4V:102@4N:49@4V:103@4N:49@4V:104@4N:49";
_global.MODEL_Tank_Turret_2 = "@0MATERIALLIST@1MATERIAL@2NAME:FrontColor@2COLOR:255,225,225,200@1MATERIAL@2NAME:BackColor@2COLOR:255,128,128,200@1MATERIAL@2NAME:White@2COLOR:255,255,255,255@1MATERIAL@2NAME:Black@2COLOR:255,0,0,0@0MODEL@1NAME:MDL-Mesh1@1ID:1@1MESH@2POSITIONLIST@3V:4.45,1.98,1.87@3V:4.45,3.02,1.87@3V:4.45,2.5,1.93@3V:4.45,1.5,1.67@3V:4.45,3.5,1.67@3V:4.45,1.09,1.35@3V:4.45,2.5,1.43@3V:4.45,2.11,1.38@3V:4.45,1.75,1.23@3V:4.45,0.77,0.93@3V:4.45,1.44,0.99@3V:4.45,1.2,0.68@3V:4.45,0.57,0.45@3V:4.45,1.05,0.32@3V:4.45,0.5,-0.07@3V:4.45,1,-0.07@3V:4.45,0.57,-0.58@3V:4.45,1.05,-0.45@3V:4.45,1.2,-0.82@3V:4.45,0.77,-1.07@3V:4.45,1.44,-1.13@3V:4.45,1.09,-1.48@3V:4.45,1.75,-1.37@3V:4.45,2.11,-1.51@3V:4.45,1.5,-1.8@3V:4.45,2.5,-1.57@3V:4.45,3.91,1.35@3V:4.45,2.89,1.38@3V:4.45,3.25,1.23@3V:4.45,4.23,0.93@3V:4.45,3.56,0.99@3V:4.45,3.8,0.68@3V:4.45,4.43,0.45@3V:4.45,3.95,0.32@3V:4.45,4.5,-0.07@3V:4.45,4,-0.07@3V:4.45,3.95,-0.45@3V:4.45,4.43,-0.58@3V:4.45,3.8,-0.82@3V:4.45,4.23,-1.07@3V:4.45,3.56,-1.13@3V:4.45,3.91,-1.48@3V:4.45,3.25,-1.37@3V:4.45,2.89,-1.51@3V:4.45,3.5,-1.8@3V:4.45,1.98,-2@3V:4.45,3.02,-2@3V:4.45,2.5,-2.07@3V:-2.48,5,-4.4@3V:-2.48,0,-4.4@3V:-3.52,0,-3.6@3V:-3.52,5,-3.6@3V:-1.28,5,4.76@3V:-1.28,0,4.76@3V:0.02,0,4.93@3V:0.02,5,4.93@3V:-4.31,0,-2.57@3V:-4.31,5,-2.57@3V:-3.52,5,3.47@3V:-3.52,0,3.47@3V:-2.48,0,4.26@3V:-2.48,5,4.26@3V:2.52,5,-4.4@3V:2.52,0,-4.4@3V:1.31,0,-4.9@3V:1.31,5,-4.9@3V:-4.31,5,2.43@3V:-4.31,0,2.43@3V:0.02,5,-5.07@3V:0.02,0,-5.07@3V:-1.28,0,-4.9@3V:-1.28,5,-4.9@3V:1.31,0,4.76@3V:1.31,5,4.76@3V:-4.81,0,-1.36@3V:-4.81,5,-1.36@3V:-4.81,5,1.23@3V:-4.81,0,1.23@3V:-4.98,5,-0.07@3V:-4.98,0,-0.07@3V:2.52,5,4.26@3V:4.35,0,2.43@3V:3.55,0,3.47@3V:3.62,1.98,1.87@3V:3.43,2.5,1.93@3V:3.8,1.5,1.67@3V:3.95,1.09,1.35@3V:4.07,0.77,0.93@3V:4.14,0.57,0.45@3V:4.35,0,-2.57@3V:4.16,0.5,-0.07@3V:4.14,0.57,-0.58@3V:4.07,0.77,-1.07@3V:3.95,1.09,-1.48@3V:3.8,1.5,-1.8@3V:3.62,1.98,-2@3V:3.43,2.5,-2.07@3V:2.7,4.5,-0.07@3V:2.73,4.43,0.45@3V:2.8,4.23,0.93@3V:2.92,3.91,1.35@3V:3.07,3.5,1.67@3V:3.24,3.02,1.87@3V:2.73,4.43,-0.58@3V:2.8,4.23,-1.07@3V:2.92,3.91,-1.48@3V:3.07,3.5,-1.8@3V:3.24,3.02,-2@3V:3.55,0,-3.6@3V:2.52,0,4.26@3N:1,0,0@3N:1,0,0@3N:-0.5,0,-0.87@3N:-0.71,0,-0.71@3N:-0.26,0,0.97@3N:0,0,1@3N:-0.87,0,-0.5@3N:-0.71,0,0.71@3N:-0.5,0,0.87@3N:0.5,0,-0.87@3N:0.26,0,-0.97@3N:-0.87,0,0.5@3N:0,0,-1@3N:-0.26,0,-0.97@3N:0.26,0,0.97@3N:-0.97,0,-0.26@3N:-0.97,0,0.26@3N:-1,0,0@3N:0,1,0@3N:0.79,0.07,0.61@3N:0.94,0.34,0@3N:0.61,0,-0.79@3N:0.79,0.07,-0.61@3N:0,-0.97,0.26@3N:0,-1,0@3N:0,-0.26,-0.97@3N:0,0,-1@3N:0,0.97,-0.26@3N:0,1,0@3N:0,0.71,-0.71@3N:0,0.87,-0.5@3N:0,-0.97,-0.26@3N:0,-0.87,-0.5@3N:0,0.71,0.71@3N:0,0.5,0.87@3N:0,-0.71,-0.71@3N:0,0.26,0.97@3N:0,0,1@3N:0,0.97,0.26@3N:0,0.87,0.5@3N:0,0.5,-0.87@3N:0,0.26,-0.97@3N:0,-0.5,0.87@3N:0,-0.71,0.71@3N:0,-0.87,0.5@3N:0,-0.5,-0.87@3N:0,-0.26,0.97@3N:0.38,0,0.92@3N:0.61,0,0.79@2POLYGONLIST@3NAME:Faces1@3MATERIAL:White@3FACE@4V:0@4N:0@4V:1@4N:0@4V:2@4N:0@3FACE@4V:1@4N:0@4V:0@4N:0@4V:3@4N:0@3FACE@4V:1@4N:0@4V:3@4N:0@4V:4@4N:0@3FACE@4V:4@4N:0@4V:3@4N:0@4V:5@4N:0@3FACE@4V:4@4N:0@4V:5@4N:0@4V:6@4N:0@3FACE@4V:6@4N:0@4V:5@4N:0@4V:7@4N:0@3FACE@4V:7@4N:0@4V:5@4N:0@4V:8@4N:0@3FACE@4V:8@4N:0@4V:5@4N:0@4V:9@4N:0@3FACE@4V:8@4N:0@4V:9@4N:0@4V:10@4N:0@3FACE@4V:10@4N:0@4V:9@4N:0@4V:11@4N:0@3FACE@4V:11@4N:0@4V:9@4N:0@4V:12@4N:0@3FACE@4V:11@4N:0@4V:12@4N:0@4V:13@4N:0@3FACE@4V:13@4N:0@4V:12@4N:0@4V:14@4N:0@3FACE@4V:13@4N:0@4V:14@4N:0@4V:15@4N:0@3FACE@4V:15@4N:0@4V:14@4N:0@4V:16@4N:0@3FACE@4V:15@4N:0@4V:16@4N:0@4V:17@4N:0@3FACE@4V:17@4N:0@4V:16@4N:0@4V:18@4N:0@3FACE@4V:18@4N:0@4V:16@4N:0@4V:19@4N:0@3FACE@4V:18@4N:0@4V:19@4N:0@4V:20@4N:0@3FACE@4V:20@4N:0@4V:19@4N:0@4V:21@4N:0@3FACE@4V:20@4N:0@4V:21@4N:0@4V:22@4N:0@3FACE@4V:22@4N:0@4V:21@4N:0@4V:23@4N:0@3FACE@4V:23@4N:0@4V:21@4N:0@4V:24@4N:0@3FACE@4V:23@4N:0@4V:24@4N:0@4V:25@4N:0@3FACE@4V:6@4N:0@4V:26@4N:0@4V:4@4N:0@3FACE@4V:26@4N:0@4V:6@4N:0@4V:27@4N:0@3FACE@4V:26@4N:0@4V:27@4N:0@4V:28@4N:0@3FACE@4V:26@4N:0@4V:28@4N:0@4V:29@4N:0@3FACE@4V:29@4N:0@4V:28@4N:0@4V:30@4N:0@3FACE@4V:29@4N:0@4V:30@4N:0@4V:31@4N:0@3FACE@4V:29@4N:0@4V:31@4N:0@4V:32@4N:0@3FACE@4V:32@4N:0@4V:31@4N:0@4V:33@4N:0@3FACE@4V:32@4N:0@4V:33@4N:0@4V:34@4N:0@3FACE@4V:34@4N:0@4V:33@4N:0@4V:35@4N:0@3FACE@4V:34@4N:0@4V:35@4N:0@4V:36@4N:0@3FACE@4V:34@4N:0@4V:36@4N:0@4V:37@4N:0@3FACE@4V:37@4N:0@4V:36@4N:0@4V:38@4N:0@3FACE@4V:37@4N:0@4V:38@4N:0@4V:39@4N:0@3FACE@4V:39@4N:0@4V:38@4N:0@4V:40@4N:0@3FACE@4V:39@4N:0@4V:40@4N:0@4V:41@4N:0@3FACE@4V:41@4N:0@4V:40@4N:0@4V:42@4N:0@3FACE@4V:41@4N:0@4V:42@4N:0@4V:43@4N:0@3FACE@4V:41@4N:0@4V:43@4N:0@4V:44@4N:0@3FACE@4V:44@4N:0@4V:43@4N:0@4V:25@4N:0@3FACE@4V:44@4N:0@4V:25@4N:0@4V:24@4N:0@3FACE@4V:44@4N:0@4V:24@4N:0@4V:45@4N:0@3FACE@4V:44@4N:0@4V:45@4N:0@4V:46@4N:0@3FACE@4V:46@4N:0@4V:45@4N:0@4V:47@4N:0@3FACE@4V:48@4N:2@4V:49@4N:2@4V:50@4N:3@4V:51@4N:3@3FACE@4V:52@4N:4@4V:53@4N:4@4V:54@4N:5@4V:55@4N:5@3FACE@4V:51@4N:3@4V:50@4N:3@4V:56@4N:6@4V:57@4N:6@3FACE@4V:58@4N:7@4V:59@4N:7@4V:60@4N:8@4V:61@4N:8@3FACE@4V:62@4N:9@4V:63@4N:9@4V:64@4N:10@4V:65@4N:10@3FACE@4V:66@4N:11@4V:67@4N:11@4V:59@4N:7@4V:58@4N:7@3FACE@4V:68@4N:12@4V:69@4N:12@4V:70@4N:13@4V:71@4N:13@3FACE@4V:65@4N:10@4V:64@4N:10@4V:69@4N:12@4V:68@4N:12@3FACE@4V:61@4N:8@4V:60@4N:8@4V:53@4N:4@4V:52@4N:4@3FACE@4V:55@4N:5@4V:54@4N:5@4V:72@4N:14@4V:73@4N:14@3FACE@4V:57@4N:6@4V:56@4N:6@4V:74@4N:15@4V:75@4N:15@3FACE@4V:76@4N:16@4V:77@4N:16@4V:67@4N:11@4V:66@4N:11@3FACE@4V:78@4N:17@4V:79@4N:17@4V:77@4N:16@4V:76@4N:16@3FACE@4V:75@4N:15@4V:74@4N:15@4V:79@4N:17@4V:78@4N:17@3FACE@4V:73@4N:18@4V:80@4N:18@4V:62@4N:18@4V:65@4N:18@4V:68@4N:18@4V:71@4N:18@4V:48@4N:18@4V:51@4N:18@4V:57@4N:18@4V:75@4N:18@4V:78@4N:18@4V:76@4N:18@4V:66@4N:18@4V:58@4N:18@4V:61@4N:18@4V:52@4N:18@4V:55@4N:18@3FACE@4V:71@4N:13@4V:70@4N:13@4V:49@4N:2@4V:48@4N:2@3FACE@4V:81@4N:19@4V:80@4N:19@4V:82@4N:19@3FACE@4V:81@4N:20@4V:83@4N:20@4V:84@4N:20@3FACE@4V:83@4N:20@4V:81@4N:20@4V:85@4N:20@3FACE@4V:85@4N:20@4V:81@4N:20@4V:86@4N:20@3FACE@4V:86@4N:20@4V:81@4N:20@4V:87@4N:20@3FACE@4V:87@4N:20@4V:81@4N:20@4V:88@4N:20@3FACE@4V:88@4N:20@4V:81@4N:20@4V:89@4N:20@3FACE@4V:88@4N:20@4V:89@4N:20@4V:90@4N:20@3FACE@4V:90@4N:20@4V:89@4N:20@4V:91@4N:20@3FACE@4V:91@4N:20@4V:89@4N:20@4V:92@4N:20@3FACE@4V:92@4N:20@4V:89@4N:20@4V:93@4N:20@3FACE@4V:93@4N:20@4V:89@4N:20@4V:94@4N:20@3FACE@4V:94@4N:20@4V:89@4N:20@4V:95@4N:20@3FACE@4V:95@4N:20@4V:89@4N:20@4V:96@4N:20@3FACE@4V:80@4N:20@4V:97@4N:20@4V:62@4N:20@3FACE@4V:97@4N:20@4V:80@4N:20@4V:98@4N:20@3FACE@4V:98@4N:20@4V:80@4N:20@4V:99@4N:20@3FACE@4V:99@4N:20@4V:80@4N:20@4V:100@4N:20@3FACE@4V:100@4N:20@4V:80@4N:20@4V:101@4N:20@3FACE@4V:101@4N:20@4V:80@4N:20@4V:102@4N:20@3FACE@4V:102@4N:20@4V:80@4N:20@4V:81@4N:20@3FACE@4V:102@4N:20@4V:81@4N:20@4V:84@4N:20@3FACE@4V:62@4N:20@4V:97@4N:20@4V:103@4N:20@3FACE@4V:62@4N:20@4V:103@4N:20@4V:104@4N:20@3FACE@4V:62@4N:20@4V:104@4N:20@4V:105@4N:20@3FACE@4V:62@4N:20@4V:105@4N:20@4V:106@4N:20@3FACE@4V:62@4N:20@4V:106@4N:20@4V:107@4N:20@3FACE@4V:62@4N:20@4V:107@4N:20@4V:96@4N:20@3FACE@4V:62@4N:20@4V:96@4N:20@4V:89@4N:20@3FACE@4V:62@4N:9@4V:108@4N:21@4V:63@4N:9@3FACE@4V:108@4N:22@4V:62@4N:22@4V:89@4N:22@3FACE@4V:12@4N:23@4V:88@4N:23@4V:90@4N:24@4V:14@4N:24@3FACE@4V:45@4N:25@4V:95@4N:25@4V:96@4N:26@4V:47@4N:26@3FACE@4V:37@4N:27@4V:103@4N:27@4V:97@4N:28@4V:34@4N:28@3FACE@4V:41@4N:29@4V:105@4N:29@4V:104@4N:30@4V:39@4N:30@3FACE@4V:16@4N:31@4V:91@4N:31@4V:92@4N:32@4V:19@4N:32@3FACE@4V:26@4N:33@4V:100@4N:33@4V:101@4N:34@4V:4@4N:34@3FACE@4V:19@4N:32@4V:92@4N:32@4V:93@4N:35@4V:21@4N:35@3FACE@4V:1@4N:36@4V:102@4N:36@4V:84@4N:37@4V:2@4N:37@3FACE@4V:32@4N:38@4V:98@4N:38@4V:99@4N:39@4V:29@4N:39@3FACE@4V:34@4N:28@4V:97@4N:28@4V:98@4N:38@4V:32@4N:38@3FACE@4V:44@4N:40@4V:106@4N:40@4V:105@4N:29@4V:41@4N:29@3FACE@4V:46@4N:41@4V:107@4N:41@4V:106@4N:40@4V:44@4N:40@3FACE@4V:47@4N:26@4V:96@4N:26@4V:107@4N:41@4V:46@4N:41@3FACE@4V:3@4N:42@4V:85@4N:42@4V:86@4N:43@4V:5@4N:43@3FACE@4V:29@4N:39@4V:99@4N:39@4V:100@4N:33@4V:26@4N:33@3FACE@4V:9@4N:44@4V:87@4N:44@4V:88@4N:23@4V:12@4N:23@3FACE@4V:21@4N:35@4V:93@4N:35@4V:94@4N:45@4V:24@4N:45@3FACE@4V:0@4N:46@4V:83@4N:46@4V:85@4N:42@4V:3@4N:42@3FACE@4V:4@4N:34@4V:101@4N:34@4V:102@4N:36@4V:1@4N:36@3FACE@4V:5@4N:43@4V:86@4N:43@4V:87@4N:44@4V:9@4N:44@3FACE@4V:2@4N:37@4V:84@4N:37@4V:83@4N:46@4V:0@4N:46@3FACE@4V:24@4N:45@4V:94@4N:45@4V:95@4N:25@4V:45@4N:25@3FACE@4V:39@4N:30@4V:104@4N:30@4V:103@4N:27@4V:37@4N:27@3FACE@4V:14@4N:24@4V:90@4N:24@4V:91@4N:31@4V:16@4N:31@3FACE@4V:73@4N:14@4V:72@4N:14@4V:109@4N:47@4V:80@4N:47@3FACE@4V:82@4N:48@4V:80@4N:48@4V:109@4N:48@2POLYGONLIST@3NAME:Faces2@3MATERIAL:Black@3FACE@4V:25@4N:1@4V:43@4N:1@4V:42@4N:1@4V:40@4N:1@4V:38@4N:1@4V:36@4N:1@4V:35@4N:1@4V:33@4N:1@4V:31@4N:1@4V:30@4N:1@4V:28@4N:1@4V:27@4N:1@4V:6@4N:1@4V:7@4N:1@4V:8@4N:1@4V:10@4N:1@4V:11@4N:1@4V:13@4N:1@4V:15@4N:1@4V:17@4N:1@4V:18@4N:1@4V:20@4N:1@4V:22@4N:1@4V:23@4N:1";
_global.MODEL_Marker = "@0MATERIALLIST@1MATERIAL@2NAME:FrontColor@2COLOR:255,225,225,200@1MATERIAL@2NAME:BackColor@2COLOR:255,128,128,200@1MATERIAL@2NAME:White@2COLOR:255,255,255,255@0MODEL@1NAME:MDL-Mesh1@1ID:1@1MESH@2POSITIONLIST@3V:2.08,0.5,-1.39@3V:1.64,0.5,-1.88@3V:1.1,0.5,-2.25@3V:0.48,0.5,-2.45@3V:-0.17,0.5,-2.49@3V:-0.81,0.5,-2.37@3V:-1.39,0.5,-2.08@3V:-1.88,0.5,-1.64@3V:-2.25,0.5,-1.1@3V:-2.45,0.5,-0.48@3V:-2.49,0.5,0.17@3V:-2.37,0.5,0.81@3V:-2.08,0.5,1.39@3V:-1.64,0.5,1.88@3V:-1.1,0.5,2.25@3V:-0.48,0.5,2.45@3V:0.17,0.5,2.49@3V:0.81,0.5,2.37@3V:1.39,0.5,2.08@3V:1.88,0.5,1.64@3V:2.25,0.5,1.1@3V:2.45,0.5,0.48@3V:2.49,0.5,-0.17@3V:2.37,0.5,-0.81@3V:2.08,0,-1.39@3V:1.64,0,-1.88@3V:2.37,0,-0.81@3V:2.49,0,-0.17@3V:2.45,0,0.48@3V:2.25,0,1.1@3V:1.88,0,1.64@3V:1.39,0,2.08@3V:0.81,0,2.37@3V:0.17,0,2.49@3V:-0.48,0,2.45@3V:-1.1,0,2.25@3V:-1.64,0,1.88@3V:-2.08,0,1.39@3V:-2.37,0,0.81@3V:-2.49,0,0.17@3V:-2.45,0,-0.48@3V:-2.25,0,-1.1@3V:-1.88,0,-1.64@3V:-1.39,0,-2.08@3V:-0.81,0,-2.37@3V:-0.17,0,-2.49@3V:0.48,0,-2.45@3V:1.1,0,-2.25@3N:0,1,0@3N:0.83,0,-0.56@3N:0.66,0,-0.75@3N:0.95,0,-0.32@3N:1,0,-0.07@3N:0.98,0,0.19@3N:0.9,0,0.44@3N:0.75,0,0.66@3N:0.56,0,0.83@3N:0.32,0,0.95@3N:0.07,0,1@3N:-0.19,0,0.98@3N:-0.44,0,0.9@3N:-0.66,0,0.75@3N:-0.83,0,0.56@3N:-0.95,0,0.32@3N:-1,0,0.07@3N:-0.98,0,-0.19@3N:-0.9,0,-0.44@3N:-0.75,0,-0.66@3N:-0.56,0,-0.83@3N:-0.32,0,-0.95@3N:-0.07,0,-1@3N:0.19,0,-0.98@3N:0.44,0,-0.9@2POLYGONLIST@3NAME:Faces1@3MATERIAL:White@3FACE@4V:0@4N:0@4V:1@4N:0@4V:2@4N:0@4V:3@4N:0@4V:4@4N:0@4V:5@4N:0@4V:6@4N:0@4V:7@4N:0@4V:8@4N:0@4V:9@4N:0@4V:10@4N:0@4V:11@4N:0@4V:12@4N:0@4V:13@4N:0@4V:14@4N:0@4V:15@4N:0@4V:16@4N:0@4V:17@4N:0@4V:18@4N:0@4V:19@4N:0@4V:20@4N:0@4V:21@4N:0@4V:22@4N:0@4V:23@4N:0@3FACE@4V:24@4N:1@4V:25@4N:2@4V:1@4N:2@4V:0@4N:1@3FACE@4V:26@4N:3@4V:24@4N:1@4V:0@4N:1@4V:23@4N:3@3FACE@4V:27@4N:4@4V:26@4N:3@4V:23@4N:3@4V:22@4N:4@3FACE@4V:28@4N:5@4V:27@4N:4@4V:22@4N:4@4V:21@4N:5@3FACE@4V:29@4N:6@4V:28@4N:5@4V:21@4N:5@4V:20@4N:6@3FACE@4V:30@4N:7@4V:29@4N:6@4V:20@4N:6@4V:19@4N:7@3FACE@4V:31@4N:8@4V:30@4N:7@4V:19@4N:7@4V:18@4N:8@3FACE@4V:32@4N:9@4V:31@4N:8@4V:18@4N:8@4V:17@4N:9@3FACE@4V:33@4N:10@4V:32@4N:9@4V:17@4N:9@4V:16@4N:10@3FACE@4V:34@4N:11@4V:33@4N:10@4V:16@4N:10@4V:15@4N:11@3FACE@4V:35@4N:12@4V:34@4N:11@4V:15@4N:11@4V:14@4N:12@3FACE@4V:36@4N:13@4V:35@4N:12@4V:14@4N:12@4V:13@4N:13@3FACE@4V:37@4N:14@4V:36@4N:13@4V:13@4N:13@4V:12@4N:14@3FACE@4V:38@4N:15@4V:37@4N:14@4V:12@4N:14@4V:11@4N:15@3FACE@4V:39@4N:16@4V:38@4N:15@4V:11@4N:15@4V:10@4N:16@3FACE@4V:40@4N:17@4V:39@4N:16@4V:10@4N:16@4V:9@4N:17@3FACE@4V:41@4N:18@4V:40@4N:17@4V:9@4N:17@4V:8@4N:18@3FACE@4V:42@4N:19@4V:41@4N:18@4V:8@4N:18@4V:7@4N:19@3FACE@4V:43@4N:20@4V:42@4N:19@4V:7@4N:19@4V:6@4N:20@3FACE@4V:44@4N:21@4V:43@4N:20@4V:6@4N:20@4V:5@4N:21@3FACE@4V:45@4N:22@4V:44@4N:21@4V:5@4N:21@4V:4@4N:22@3FACE@4V:46@4N:23@4V:45@4N:22@4V:4@4N:22@4V:3@4N:23@3FACE@4V:47@4N:24@4V:46@4N:23@4V:3@4N:23@4V:2@4N:24@3FACE@4V:25@4N:2@4V:47@4N:24@4V:2@4N:24@4V:1@4N:2";
_global.MODEL_Droid_1 = "@0MATERIALLIST@1MATERIAL@2NAME:FrontColor@2COLOR:255,225,225,200@1MATERIAL@2NAME:BackColor@2COLOR:255,128,128,200@1MATERIAL@2NAME:White@2COLOR:255,255,255,255@0MODEL@1NAME:MDL-Group8355@1ID:1@1MODEL@2NAME:MDL-Mesh1@2ID:2@2MESH@3POSITIONLIST@4V:3.89,7.58,-2.67@4V:3.83,9.25,-1.53@4V:4.7,7.51,-0.89@4V:4.36,8.92,0.13@4V:0.04,11.59,0.13@4V:1.78,11.27,0.13@4V:0.58,11.27,-1.53@4V:-1.38,11.27,-0.89@4V:-2.83,10.65,0.13@4V:-1.38,11.27,1.16@4V:-0.85,10.65,-2.59@4V:-2.06,9.25,-3.44@4V:-2.6,10.33,-1.78@4V:3.29,10.33,0.13@4V:3.83,9.25,1.79@4V:-4.63,6,-0.89@4V:-4.73,7.58,0.13@4V:-4.34,7.51,-1.78@4V:-4.34,7.51,2.05@4V:-3.46,8.92,2.68@4V:-4.01,9.25,1.02@4V:-0.43,6,-4.62@4V:-1.44,7.58,-4.4@4V:0.5,7.51,-4.62@4V:-4.63,6,1.16@4V:-3.82,5.93,2.93@4V:-3.14,7.51,3.71@4V:-2.6,10.33,2.05@4V:4.41,6,-1.78@4V:1.51,5.93,-4.4@4V:-2.06,9.25,3.71@4V:1.04,10.33,3.23@4V:1.37,8.92,4.25@4V:2.79,9.25,3.23@4V:-0.85,10.65,2.86@4V:0.58,11.27,1.79@4V:2.36,10.65,1.82@4V:-4.01,9.25,-0.75@4V:0.5,7.51,4.89@4V:1.51,5.93,4.67@4V:2.45,7.51,4.25@4V:-0.37,9.25,4.25@4V:4.41,6,2.05@4V:4.7,7.51,1.16@4V:3.89,7.58,2.93@4V:2.36,10.65,-1.55@4V:2.79,9.25,-2.96@4V:1.04,10.33,-2.96@4V:-3.46,8.92,-2.41@4V:-3.82,5.93,-2.67@4V:-0.37,9.25,-3.99@4V:1.37,8.92,-3.98@4V:-3.14,7.51,-3.44@4V:3.21,6,-3.44@4V:-0.43,6,4.89@4V:-1.44,7.58,4.67@4V:3.21,6,3.71@4V:-2.38,6,4.25@4V:2.45,7.51,-3.99@4V:-2.38,6,-3.99@4V:4.8,5.93,0.13@4N:0.87,0.3,-0.39@4N:0.9,0.37,-0.21@4N:0.18,0.97,-0.13@4N:-0.39,0.92,0@4N:-0.4,0.7,-0.59@4N:0.79,0.6,0.13@4N:-0.98,0.07,-0.2@4N:-0.86,0.37,0.36@4N:-0.11,0.07,-0.99@4N:-0.91,-0.07,0.41@4N:-0.81,0.06,0.59@4N:-0.68,0.7,0.2@4N:0.91,0.07,-0.41@4N:0.11,-0.07,-0.99@4N:-0.56,0.6,0.57@4N:0.37,0.6,0.71@4N:-0.35,0.84,0.41@4N:0.29,0.84,0.46@4N:-0.5,0.84,0.2@4N:-0.76,0.64,0@4N:0.67,0.7,0.24@4N:0.31,0.06,0.95@4N:0.12,0.6,0.79@4N:0.91,0.07,0.41@4N:0.43,0.7,-0.56@4N:-0.4,0.7,0.59@4N:-0.07,0.97,-0.21@4N:0.43,0.7,0.56@4N:-0.02,0.7,0.71@4N:0.62,0.64,0.45@4N:0.04,0.84,0.54@4N:0.87,0.3,0.39@4N:-0.56,0.6,-0.57@4N:-0.92,0.4,0@4N:-0.91,-0.07,-0.41@4N:-0.28,0.4,-0.87@4N:0.12,0.6,-0.79@4N:-0.6,0.37,-0.7@4N:0.81,-0.06,-0.59@4N:-0.11,0.07,0.99@4N:0.29,0.84,-0.46@4N:0.18,0.97,0.13@4N:0.81,-0.06,0.59@4N:-0.86,0.37,-0.36@4N:-0.24,0.64,0.73@4N:0.9,0.37,0.21@4N:-0.68,0.7,-0.2@4N:-0.24,0.64,-0.73@4N:-0.02,0.7,-0.71@4N:-0.12,0.92,0.37@4N:0.52,0.84,-0.13@4N:0.32,0.92,-0.23@4N:0.32,0.92,0.23@4N:-0.07,0.97,0.21@4N:-0.12,0.92,-0.37@4N:-0.49,0.07,0.87@4N:0.62,0.64,-0.45@4N:0.31,0.06,-0.95@4N:-0.67,-0.07,0.74@4N:0.48,0.37,-0.79@4N:-0.93,0.3,0.2@4N:-0.72,0.6,0.36@4N:0.11,-0.07,0.99@4N:-0.79,0.23,0.57@4N:0.48,0.37,0.79@4N:0.79,0.6,-0.13@4N:0.64,0.3,-0.71@4N:-0.79,0.23,-0.57@4N:-0.48,0.3,0.83@4N:-0.6,0.37,0.7@4N:-0.72,0.6,-0.36@4N:0.08,0.37,-0.92@4N:-0.98,0.07,0.2@4N:-0.67,-0.07,-0.74@4N:-0.81,0.06,-0.59@4N:-1,-0.06,0@4N:0.74,0.4,-0.54@4N:0.67,0.07,-0.74@4N:0.49,-0.07,0.87@4N:0.08,0.37,0.92@4N:-0.1,0.3,0.95@4N:0.49,-0.07,-0.87@4N:0.37,0.6,-0.71@4N:0.67,0.07,0.74@4N:-0.31,-0.06,-0.95@4N:-0.49,0.07,-0.87@4N:-0.22,0.97,0@4N:0.67,0.7,-0.24@4N:0.04,0.84,-0.54@4N:1,0.06,0@4N:0.97,0.23,0@4N:0.74,0.4,0.54@4N:0.64,0.3,0.71@4N:-0.28,0.4,0.87@4N:-0.31,-0.06,0.95@4N:-0.35,0.84,-0.41@4N:-0.93,0.3,-0.2@4N:-0.48,0.3,-0.83@4N:0.98,-0.07,0.2@4N:-0.5,0.84,-0.2@4N:-0.1,0.3,-0.95@4N:0.98,-0.07,-0.2@4N:0.3,0.23,0.92@4N:0.52,0.84,0.13@4N:0.3,0.23,-0.92@3POLYGONLIST@4NAME:Faces1@4MATERIAL:White@4FACE@5V:0@5N:0@5V:1@5N:0@5V:2@5N:0@4FACE@5V:2@5N:1@5V:1@5N:1@5V:3@5N:1@4FACE@5V:4@5N:2@5V:5@5N:2@5V:6@5N:2@4FACE@5V:7@5N:3@5V:8@5N:3@5V:9@5N:3@4FACE@5V:10@5N:4@5V:11@5N:4@5V:12@5N:4@4FACE@5V:13@5N:5@5V:14@5N:5@5V:3@5N:5@4FACE@5V:15@5N:6@5V:16@5N:6@5V:17@5N:6@4FACE@5V:18@5N:7@5V:19@5N:7@5V:20@5N:7@4FACE@5V:21@5N:8@5V:22@5N:8@5V:23@5N:8@4FACE@5V:18@5N:9@5V:24@5N:9@5V:25@5N:9@4FACE@5V:18@5N:10@5V:25@5N:10@5V:26@5N:10@4FACE@5V:8@5N:11@5V:20@5N:11@5V:27@5N:11@4FACE@5V:28@5N:12@5V:0@5N:12@5V:2@5N:12@4FACE@5V:23@5N:13@5V:29@5N:13@5V:21@5N:13@4FACE@5V:27@5N:14@5V:19@5N:14@5V:30@5N:14@4FACE@5V:31@5N:15@5V:32@5N:15@5V:33@5N:15@4FACE@5V:9@5N:16@5V:27@5N:16@5V:34@5N:16@4FACE@5V:35@5N:17@5V:31@5N:17@5V:36@5N:17@4FACE@5V:9@5N:18@5V:8@5N:18@5V:27@5N:18@4FACE@5V:8@5N:19@5V:37@5N:19@5V:20@5N:19@4FACE@5V:36@5N:20@5V:14@5N:20@5V:13@5N:20@4FACE@5V:38@5N:21@5V:39@5N:21@5V:40@5N:21@4FACE@5V:31@5N:22@5V:41@5N:22@5V:32@5N:22@4FACE@5V:42@5N:23@5V:43@5N:23@5V:44@5N:23@4FACE@5V:45@5N:24@5V:46@5N:24@5V:47@5N:24@4FACE@5V:27@5N:25@5V:30@5N:25@5V:34@5N:25@4FACE@5V:4@5N:26@5V:6@5N:26@5V:7@5N:26@4FACE@5V:31@5N:27@5V:33@5N:27@5V:36@5N:27@4FACE@5V:34@5N:28@5V:41@5N:28@5V:31@5N:28@4FACE@5V:36@5N:29@5V:33@5N:29@5V:14@5N:29@4FACE@5V:35@5N:30@5V:34@5N:30@5V:31@5N:30@4FACE@5V:43@5N:31@5V:14@5N:31@5V:44@5N:31@4FACE@5V:12@5N:32@5V:11@5N:32@5V:48@5N:32@4FACE@5V:16@5N:33@5V:20@5N:33@5V:37@5N:33@4FACE@5V:17@5N:34@5V:49@5N:34@5V:15@5N:34@4FACE@5V:22@5N:35@5V:11@5N:35@5V:50@5N:35@4FACE@5V:47@5N:36@5V:51@5N:36@5V:50@5N:36@4FACE@5V:52@5N:37@5V:48@5N:37@5V:11@5N:37@4FACE@5V:53@5N:38@5V:0@5N:38@5V:28@5N:38@4FACE@5V:54@5N:39@5V:38@5N:39@5V:55@5N:39@4FACE@5V:6@5N:40@5V:45@5N:40@5V:47@5N:40@4FACE@5V:4@5N:41@5V:35@5N:41@5V:5@5N:41@4FACE@5V:42@5N:42@5V:44@5N:42@5V:56@5N:42@4FACE@5V:17@5N:43@5V:37@5N:43@5V:48@5N:43@4FACE@5V:34@5N:44@5V:30@5N:44@5V:41@5N:44@4FACE@5V:43@5N:45@5V:3@5N:45@5V:14@5N:45@4FACE@5V:12@5N:46@5V:37@5N:46@5V:8@5N:46@4FACE@5V:10@5N:47@5V:50@5N:47@5V:11@5N:47@4FACE@5V:47@5N:48@5V:50@5N:48@5V:10@5N:48@4FACE@5V:9@5N:49@5V:34@5N:49@5V:35@5N:49@4FACE@5V:5@5N:50@5V:13@5N:50@5V:45@5N:50@4FACE@5V:5@5N:51@5V:45@5N:51@5V:6@5N:51@4FACE@5V:35@5N:52@5V:36@5N:52@5V:5@5N:52@4FACE@5V:4@5N:53@5V:9@5N:53@5V:35@5N:53@4FACE@5V:6@5N:54@5V:10@5N:54@5V:7@5N:54@4FACE@5V:57@5N:55@5V:55@5N:55@5V:26@5N:55@4FACE@5V:45@5N:56@5V:1@5N:56@5V:46@5N:56@4FACE@5V:58@5N:57@5V:29@5N:57@5V:23@5N:57@4FACE@5V:26@5N:58@5V:25@5N:58@5V:57@5N:58@4FACE@5V:58@5N:59@5V:51@5N:59@5V:46@5N:59@4FACE@5V:18@5N:60@5V:20@5N:60@5V:16@5N:60@4FACE@5V:27@5N:61@5V:20@5N:61@5V:19@5N:61@4FACE@5V:38@5N:62@5V:54@5N:62@5V:39@5N:62@4FACE@5V:19@5N:63@5V:18@5N:63@5V:26@5N:63@4FACE@5V:40@5N:64@5V:33@5N:64@5V:32@5N:64@4FACE@5V:13@5N:65@5V:3@5N:65@5V:1@5N:65@4FACE@5V:58@5N:66@5V:46@5N:66@5V:0@5N:66@4FACE@5V:48@5N:67@5V:52@5N:67@5V:17@5N:67@4FACE@5V:55@5N:68@5V:30@5N:68@5V:26@5N:68@4FACE@5V:26@5N:69@5V:30@5N:69@5V:19@5N:69@4FACE@5V:12@5N:70@5V:48@5N:70@5V:37@5N:70@4FACE@5V:23@5N:71@5V:50@5N:71@5V:51@5N:71@4FACE@5V:24@5N:72@5V:18@5N:72@5V:16@5N:72@4FACE@5V:52@5N:73@5V:59@5N:73@5V:49@5N:73@4FACE@5V:52@5N:74@5V:49@5N:74@5V:17@5N:74@4FACE@5V:24@5N:75@5V:16@5N:75@5V:15@5N:75@4FACE@5V:0@5N:76@5V:46@5N:76@5V:1@5N:76@4FACE@5V:53@5N:77@5V:58@5N:77@5V:0@5N:77@4FACE@5V:40@5N:78@5V:39@5N:78@5V:56@5N:78@4FACE@5V:38@5N:79@5V:32@5N:79@5V:41@5N:79@4FACE@5V:38@5N:80@5V:41@5N:80@5V:55@5N:80@4FACE@5V:58@5N:81@5V:53@5N:81@5V:29@5N:81@4FACE@5V:47@5N:82@5V:46@5N:82@5V:51@5N:82@4FACE@5V:56@5N:83@5V:44@5N:83@5V:40@5N:83@4FACE@5V:59@5N:84@5V:22@5N:84@5V:21@5N:84@4FACE@5V:59@5N:85@5V:52@5N:85@5V:22@5N:85@4FACE@5V:4@5N:86@5V:7@5N:86@5V:9@5N:86@4FACE@5V:13@5N:87@5V:1@5N:87@5V:45@5N:87@4FACE@5V:6@5N:88@5V:47@5N:88@5V:10@5N:88@4FACE@5V:43@5N:89@5V:60@5N:89@5V:2@5N:89@4FACE@5V:3@5N:90@5V:43@5N:90@5V:2@5N:90@4FACE@5V:44@5N:91@5V:14@5N:91@5V:33@5N:91@4FACE@5V:44@5N:92@5V:33@5N:92@5V:40@5N:92@4FACE@5V:55@5N:93@5V:41@5N:93@5V:30@5N:93@4FACE@5V:54@5N:94@5V:55@5N:94@5V:57@5N:94@4FACE@5V:7@5N:95@5V:10@5N:95@5V:12@5N:95@4FACE@5V:16@5N:96@5V:37@5N:96@5V:17@5N:96@4FACE@5V:52@5N:97@5V:11@5N:97@5V:22@5N:97@4FACE@5V:43@5N:98@5V:42@5N:98@5V:60@5N:98@4FACE@5V:7@5N:99@5V:12@5N:99@5V:8@5N:99@4FACE@5V:22@5N:100@5V:50@5N:100@5V:23@5N:100@4FACE@5V:2@5N:101@5V:60@5N:101@5V:28@5N:101@4FACE@5V:32@5N:102@5V:38@5N:102@5V:40@5N:102@4FACE@5V:5@5N:103@5V:36@5N:103@5V:13@5N:103@4FACE@5V:51@5N:104@5V:58@5N:104@5V:23@5N:104@0MODEL@1NAME:MDL-Group9160@1ID:3@1MODEL@2NAME:MDL-Mesh2@2ID:4@2MESH@3POSITIONLIST@4V:-3.86,4.02,-2.8@4V:-3.79,2.34,-1.66@4V:-4.67,4.08,-1.03@4V:-4.33,2.67,0@4V:0,0,0@4V:-1.74,0.33,0@4V:-0.54,0.33,-1.66@4V:1.41,0.33,-1.03@4V:2.87,0.94,0@4V:1.41,0.33,1.03@4V:0.89,0.94,-2.73@4V:2.09,2.34,-3.57@4V:2.63,1.26,-1.91@4V:-3.25,1.26,0@4V:-3.79,2.34,1.66@4V:4.67,5.59,-1.03@4V:4.77,4.02,0@4V:4.38,4.08,-1.91@4V:4.38,4.08,1.91@4V:3.5,2.67,2.54@4V:4.04,2.34,0.89@4V:0.47,5.59,-4.75@4V:1.47,4.02,-4.53@4V:-0.47,4.08,-4.75@4V:4.67,5.59,1.03@4V:3.86,5.66,2.8@4V:3.17,4.08,3.57@4V:2.63,1.26,1.91@4V:-4.38,5.59,-1.91@4V:-1.47,5.66,-4.53@4V:2.09,2.34,3.57@4V:-1.01,1.26,3.1@4V:-1.34,2.67,4.11@4V:-2.75,2.34,3.1@4V:0.89,0.94,2.73@4V:-0.54,0.33,1.66@4V:-2.32,0.94,1.69@4V:4.04,2.34,-0.89@4V:-0.47,4.08,4.75@4V:-1.47,5.66,4.53@4V:-2.42,4.08,4.12@4V:0.41,2.34,4.12@4V:-4.38,5.59,1.91@4V:-4.67,4.08,1.03@4V:-3.86,4.02,2.8@4V:-2.32,0.94,-1.69@4V:-2.75,2.34,-3.1@4V:-1.01,1.26,-3.1@4V:3.5,2.67,-2.54@4V:3.86,5.66,-2.8@4V:0.41,2.34,-4.12@4V:-1.34,2.67,-4.11@4V:3.17,4.08,-3.57@4V:-3.17,5.59,-3.57@4V:0.47,5.59,4.75@4V:1.47,4.02,4.53@4V:-3.17,5.59,3.57@4V:2.42,5.59,4.12@4V:-2.42,4.08,-4.12@4V:2.42,5.59,-4.12@4V:-4.77,5.66,0@4N:-0.87,-0.3,-0.39@4N:-0.9,-0.37,-0.21@4N:-0.18,-0.97,-0.13@4N:0.39,-0.92,0@4N:0.4,-0.7,-0.59@4N:-0.79,-0.6,0.13@4N:0.98,-0.07,-0.2@4N:0.86,-0.37,0.36@4N:0.11,-0.07,-0.99@4N:0.91,0.07,0.41@4N:0.81,-0.06,0.59@4N:0.68,-0.7,0.2@4N:-0.91,-0.07,-0.41@4N:-0.11,0.07,-0.99@4N:0.56,-0.6,0.57@4N:-0.37,-0.6,0.71@4N:0.35,-0.84,0.41@4N:-0.29,-0.84,0.46@4N:0.5,-0.84,0.2@4N:0.76,-0.64,0@4N:-0.67,-0.7,0.24@4N:-0.31,-0.06,0.95@4N:-0.12,-0.6,0.79@4N:-0.91,-0.07,0.41@4N:-0.43,-0.7,-0.56@4N:0.4,-0.7,0.59@4N:0.07,-0.97,-0.21@4N:-0.43,-0.7,0.56@4N:0.02,-0.7,0.71@4N:-0.62,-0.64,0.45@4N:-0.04,-0.84,0.54@4N:-0.87,-0.3,0.39@4N:0.56,-0.6,-0.57@4N:0.92,-0.4,0@4N:0.91,0.07,-0.41@4N:0.28,-0.4,-0.87@4N:-0.12,-0.6,-0.79@4N:0.6,-0.37,-0.7@4N:-0.81,0.06,-0.59@4N:0.11,-0.07,0.99@4N:-0.29,-0.84,-0.46@4N:-0.18,-0.97,0.13@4N:-0.81,0.06,0.59@4N:0.86,-0.37,-0.36@4N:0.24,-0.64,0.73@4N:-0.9,-0.37,0.21@4N:0.68,-0.7,-0.2@4N:0.24,-0.64,-0.73@4N:0.02,-0.7,-0.71@4N:0.12,-0.92,0.37@4N:-0.52,-0.84,-0.13@4N:-0.32,-0.92,-0.23@4N:-0.32,-0.92,0.23@4N:0.07,-0.97,0.21@4N:0.12,-0.92,-0.37@4N:0.49,-0.07,0.87@4N:-0.62,-0.64,-0.45@4N:-0.31,-0.06,-0.95@4N:0.67,0.07,0.74@4N:-0.48,-0.37,-0.79@4N:0.93,-0.3,0.2@4N:0.72,-0.6,0.36@4N:-0.11,0.07,0.99@4N:0.79,-0.23,0.57@4N:-0.48,-0.37,0.79@4N:-0.79,-0.6,-0.13@4N:-0.64,-0.3,-0.71@4N:0.79,-0.23,-0.57@4N:0.48,-0.3,0.83@4N:0.6,-0.37,0.7@4N:0.72,-0.6,-0.36@4N:-0.08,-0.37,-0.92@4N:0.98,-0.07,0.2@4N:0.67,0.07,-0.74@4N:0.81,-0.06,-0.59@4N:1,0.06,0@4N:-0.74,-0.4,-0.54@4N:-0.67,-0.07,-0.74@4N:-0.49,0.07,0.87@4N:-0.08,-0.37,0.92@4N:0.1,-0.3,0.95@4N:-0.49,0.07,-0.87@4N:-0.37,-0.6,-0.71@4N:-0.67,-0.07,0.74@4N:0.31,0.06,-0.95@4N:0.49,-0.07,-0.87@4N:0.22,-0.97,0@4N:-0.67,-0.7,-0.24@4N:-0.04,-0.84,-0.54@4N:-1,-0.06,0@4N:-0.97,-0.23,0@4N:-0.74,-0.4,0.54@4N:-0.64,-0.3,0.71@4N:0.28,-0.4,0.87@4N:0.31,0.06,0.95@4N:0.35,-0.84,-0.41@4N:0.93,-0.3,-0.2@4N:0.48,-0.3,-0.83@4N:-0.98,0.07,0.2@4N:0.5,-0.84,-0.2@4N:0.1,-0.3,-0.95@4N:-0.98,0.07,-0.2@4N:-0.3,-0.23,0.92@4N:-0.52,-0.84,0.13@4N:-0.3,-0.23,-0.92@3POLYGONLIST@4NAME:Faces2@4MATERIAL:White@4FACE@5V:0@5N:0@5V:1@5N:0@5V:2@5N:0@4FACE@5V:2@5N:1@5V:1@5N:1@5V:3@5N:1@4FACE@5V:4@5N:2@5V:5@5N:2@5V:6@5N:2@4FACE@5V:7@5N:3@5V:8@5N:3@5V:9@5N:3@4FACE@5V:10@5N:4@5V:11@5N:4@5V:12@5N:4@4FACE@5V:13@5N:5@5V:14@5N:5@5V:3@5N:5@4FACE@5V:15@5N:6@5V:16@5N:6@5V:17@5N:6@4FACE@5V:18@5N:7@5V:19@5N:7@5V:20@5N:7@4FACE@5V:21@5N:8@5V:22@5N:8@5V:23@5N:8@4FACE@5V:18@5N:9@5V:24@5N:9@5V:25@5N:9@4FACE@5V:18@5N:10@5V:25@5N:10@5V:26@5N:10@4FACE@5V:8@5N:11@5V:20@5N:11@5V:27@5N:11@4FACE@5V:28@5N:12@5V:0@5N:12@5V:2@5N:12@4FACE@5V:23@5N:13@5V:29@5N:13@5V:21@5N:13@4FACE@5V:27@5N:14@5V:19@5N:14@5V:30@5N:14@4FACE@5V:31@5N:15@5V:32@5N:15@5V:33@5N:15@4FACE@5V:9@5N:16@5V:27@5N:16@5V:34@5N:16@4FACE@5V:35@5N:17@5V:31@5N:17@5V:36@5N:17@4FACE@5V:9@5N:18@5V:8@5N:18@5V:27@5N:18@4FACE@5V:8@5N:19@5V:37@5N:19@5V:20@5N:19@4FACE@5V:36@5N:20@5V:14@5N:20@5V:13@5N:20@4FACE@5V:38@5N:21@5V:39@5N:21@5V:40@5N:21@4FACE@5V:31@5N:22@5V:41@5N:22@5V:32@5N:22@4FACE@5V:42@5N:23@5V:43@5N:23@5V:44@5N:23@4FACE@5V:45@5N:24@5V:46@5N:24@5V:47@5N:24@4FACE@5V:27@5N:25@5V:30@5N:25@5V:34@5N:25@4FACE@5V:4@5N:26@5V:6@5N:26@5V:7@5N:26@4FACE@5V:31@5N:27@5V:33@5N:27@5V:36@5N:27@4FACE@5V:34@5N:28@5V:41@5N:28@5V:31@5N:28@4FACE@5V:36@5N:29@5V:33@5N:29@5V:14@5N:29@4FACE@5V:35@5N:30@5V:34@5N:30@5V:31@5N:30@4FACE@5V:43@5N:31@5V:14@5N:31@5V:44@5N:31@4FACE@5V:12@5N:32@5V:11@5N:32@5V:48@5N:32@4FACE@5V:16@5N:33@5V:20@5N:33@5V:37@5N:33@4FACE@5V:17@5N:34@5V:49@5N:34@5V:15@5N:34@4FACE@5V:22@5N:35@5V:11@5N:35@5V:50@5N:35@4FACE@5V:47@5N:36@5V:51@5N:36@5V:50@5N:36@4FACE@5V:52@5N:37@5V:48@5N:37@5V:11@5N:37@4FACE@5V:53@5N:38@5V:0@5N:38@5V:28@5N:38@4FACE@5V:54@5N:39@5V:38@5N:39@5V:55@5N:39@4FACE@5V:6@5N:40@5V:45@5N:40@5V:47@5N:40@4FACE@5V:4@5N:41@5V:35@5N:41@5V:5@5N:41@4FACE@5V:42@5N:42@5V:44@5N:42@5V:56@5N:42@4FACE@5V:17@5N:43@5V:37@5N:43@5V:48@5N:43@4FACE@5V:34@5N:44@5V:30@5N:44@5V:41@5N:44@4FACE@5V:43@5N:45@5V:3@5N:45@5V:14@5N:45@4FACE@5V:12@5N:46@5V:37@5N:46@5V:8@5N:46@4FACE@5V:10@5N:47@5V:50@5N:47@5V:11@5N:47@4FACE@5V:47@5N:48@5V:50@5N:48@5V:10@5N:48@4FACE@5V:9@5N:49@5V:34@5N:49@5V:35@5N:49@4FACE@5V:5@5N:50@5V:13@5N:50@5V:45@5N:50@4FACE@5V:5@5N:51@5V:45@5N:51@5V:6@5N:51@4FACE@5V:35@5N:52@5V:36@5N:52@5V:5@5N:52@4FACE@5V:4@5N:53@5V:9@5N:53@5V:35@5N:53@4FACE@5V:6@5N:54@5V:10@5N:54@5V:7@5N:54@4FACE@5V:57@5N:55@5V:55@5N:55@5V:26@5N:55@4FACE@5V:45@5N:56@5V:1@5N:56@5V:46@5N:56@4FACE@5V:58@5N:57@5V:29@5N:57@5V:23@5N:57@4FACE@5V:26@5N:58@5V:25@5N:58@5V:57@5N:58@4FACE@5V:58@5N:59@5V:51@5N:59@5V:46@5N:59@4FACE@5V:18@5N:60@5V:20@5N:60@5V:16@5N:60@4FACE@5V:27@5N:61@5V:20@5N:61@5V:19@5N:61@4FACE@5V:38@5N:62@5V:54@5N:62@5V:39@5N:62@4FACE@5V:19@5N:63@5V:18@5N:63@5V:26@5N:63@4FACE@5V:40@5N:64@5V:33@5N:64@5V:32@5N:64@4FACE@5V:13@5N:65@5V:3@5N:65@5V:1@5N:65@4FACE@5V:58@5N:66@5V:46@5N:66@5V:0@5N:66@4FACE@5V:48@5N:67@5V:52@5N:67@5V:17@5N:67@4FACE@5V:55@5N:68@5V:30@5N:68@5V:26@5N:68@4FACE@5V:26@5N:69@5V:30@5N:69@5V:19@5N:69@4FACE@5V:12@5N:70@5V:48@5N:70@5V:37@5N:70@4FACE@5V:23@5N:71@5V:50@5N:71@5V:51@5N:71@4FACE@5V:24@5N:72@5V:18@5N:72@5V:16@5N:72@4FACE@5V:52@5N:73@5V:59@5N:73@5V:49@5N:73@4FACE@5V:52@5N:74@5V:49@5N:74@5V:17@5N:74@4FACE@5V:24@5N:75@5V:16@5N:75@5V:15@5N:75@4FACE@5V:0@5N:76@5V:46@5N:76@5V:1@5N:76@4FACE@5V:53@5N:77@5V:58@5N:77@5V:0@5N:77@4FACE@5V:40@5N:78@5V:39@5N:78@5V:56@5N:78@4FACE@5V:38@5N:79@5V:32@5N:79@5V:41@5N:79@4FACE@5V:38@5N:80@5V:41@5N:80@5V:55@5N:80@4FACE@5V:58@5N:81@5V:53@5N:81@5V:29@5N:81@4FACE@5V:47@5N:82@5V:46@5N:82@5V:51@5N:82@4FACE@5V:56@5N:83@5V:44@5N:83@5V:40@5N:83@4FACE@5V:59@5N:84@5V:22@5N:84@5V:21@5N:84@4FACE@5V:59@5N:85@5V:52@5N:85@5V:22@5N:85@4FACE@5V:4@5N:86@5V:7@5N:86@5V:9@5N:86@4FACE@5V:13@5N:87@5V:1@5N:87@5V:45@5N:87@4FACE@5V:6@5N:88@5V:47@5N:88@5V:10@5N:88@4FACE@5V:43@5N:89@5V:60@5N:89@5V:2@5N:89@4FACE@5V:3@5N:90@5V:43@5N:90@5V:2@5N:90@4FACE@5V:44@5N:91@5V:14@5N:91@5V:33@5N:91@4FACE@5V:44@5N:92@5V:33@5N:92@5V:40@5N:92@4FACE@5V:55@5N:93@5V:41@5N:93@5V:30@5N:93@4FACE@5V:54@5N:94@5V:55@5N:94@5V:57@5N:94@4FACE@5V:7@5N:95@5V:10@5N:95@5V:12@5N:95@4FACE@5V:16@5N:96@5V:37@5N:96@5V:17@5N:96@4FACE@5V:52@5N:97@5V:11@5N:97@5V:22@5N:97@4FACE@5V:43@5N:98@5V:42@5N:98@5V:60@5N:98@4FACE@5V:7@5N:99@5V:12@5N:99@5V:8@5N:99@4FACE@5V:22@5N:100@5V:50@5N:100@5V:23@5N:100@4FACE@5V:2@5N:101@5V:60@5N:101@5V:28@5N:101@4FACE@5V:32@5N:102@5V:38@5N:102@5V:40@5N:102@4FACE@5V:5@5N:103@5V:36@5N:103@5V:13@5N:103@4FACE@5V:51@5N:104@5V:58@5N:104@5V:23@5N:104";
_global.MODEL_Droid_2 = "@0MATERIALLIST@1MATERIAL@2NAME:FrontColor@2COLOR:255,225,225,200@1MATERIAL@2NAME:BackColor@2COLOR:255,128,128,200@1MATERIAL@2NAME:White@2COLOR:255,255,255,255@0MODEL@1NAME:MDL-Group1635@1ID:1@1MODEL@2NAME:MDL-Mesh1@2ID:2@2MESH@3POSITIONLIST@4V:-1.36,4.36,1.92@4V:-0.96,6.68,1.92@4V:-3.28,6.28,1.92@4V:2.72,8.43,0@4V:2.32,6.11,0@4V:1.36,7.07,-1.92@4V:-1.92,7.64,0@4V:0.4,8.03,0@4V:-0.56,8.99,-1.92@4V:0,5.72,3.84@4V:0.96,4.76,1.92@4V:3.28,5.15,-1.92@4V:1.92,3.8,0@4V:-0.56,8.99,1.92@4V:1.36,7.07,1.92@4V:0.96,4.76,-1.92@4V:0.56,2.44,-1.92@4V:-1.36,4.36,-1.92@4V:-0.96,6.68,-1.92@4V:-2.72,3,0@4V:-0.4,3.4,0@4V:3.28,5.15,1.92@4V:-2.32,5.32,0@4V:-3.28,6.28,-1.92@4V:0,5.72,-3.84@4V:0.56,2.44,1.92@4N:0,0,1@4N:0.85,-0.15,-0.5@4N:-0.15,0.85,0.5@4N:-0.15,0.85,-0.5@4N:0.15,-0.85,0.5@4N:0.85,-0.15,0.5@4N:0,0,1@4N:0,0,-1@4N:0,0,-1@4N:0.15,-0.85,0.5@4N:0.85,-0.15,-0.5@4N:0.15,-0.85,0.5@4N:-0.15,0.85,0.5@4N:0,0,-1@4N:0.85,-0.15,0.5@4N:-0.71,-0.71,0@4N:0.71,0.71,0@4N:-0.15,0.85,-0.5@4N:0.85,-0.15,0.5@4N:-0.71,-0.71,0@4N:0.15,-0.85,-0.5@4N:-0.15,0.85,0.5@4N:0.15,-0.85,0.5@4N:0,0,1@4N:0.15,-0.85,-0.5@4N:0.71,0.71,0@4N:0.71,0.71,0@4N:0.85,-0.15,0.5@4N:-0.85,0.15,-0.5@4N:-0.85,0.15,-0.5@4N:-0.71,-0.71,0@4N:-0.85,0.15,-0.5@4N:-0.85,0.15,0.5@4N:0.85,-0.15,-0.5@4N:0,0,1@4N:-0.85,0.15,0.5@4N:0.71,0.71,0@4N:-0.15,0.85,0.5@4N:-0.85,0.15,0.5@4N:-0.15,0.85,-0.5@4N:-0.15,0.85,-0.5@4N:0.15,-0.85,-0.5@4N:0,0,-1@4N:-0.71,-0.71,0@4N:-0.85,0.15,-0.5@4N:0.85,-0.15,-0.5@4N:-0.85,0.15,0.5@4N:0.15,-0.85,-0.5@3POLYGONLIST@4NAME:Faces1@4MATERIAL:White@4FACE@5V:0@5N:0@5V:1@5N:0@5V:2@5N:0@4FACE@5V:3@5N:1@5V:4@5N:1@5V:5@5N:1@4FACE@5V:6@5N:2@5V:7@5N:2@5V:8@5N:2@4FACE@5V:5@5N:3@5V:7@5N:3@5V:3@5N:3@4FACE@5V:9@5N:4@5V:0@5N:4@5V:10@5N:4@4FACE@5V:11@5N:5@5V:4@5N:5@5V:12@5N:5@4FACE@5V:13@5N:6@5V:1@5N:6@5V:14@5N:6@4FACE@5V:15@5N:7@5V:16@5N:7@5V:17@5N:7@4FACE@5V:18@5N:8@5V:8@5N:8@5V:5@5N:8@4FACE@5V:0@5N:9@5V:19@5N:9@5V:20@5N:9@4FACE@5V:16@5N:10@5V:15@5N:10@5V:12@5N:10@4FACE@5V:10@5N:11@5V:12@5N:11@5V:21@5N:11@4FACE@5V:3@5N:12@5V:7@5N:12@5V:14@5N:12@4FACE@5V:11@5N:13@5V:15@5N:13@5V:5@5N:13@4FACE@5V:4@5N:14@5V:3@5N:14@5V:14@5N:14@4FACE@5V:17@5N:15@5V:22@5N:15@5V:23@5N:15@4FACE@5V:8@5N:16@5V:7@5N:16@5V:5@5N:16@4FACE@5V:24@5N:17@5V:18@5N:17@5V:5@5N:17@4FACE@5V:10@5N:18@5V:25@5N:18@5V:12@5N:18@4FACE@5V:2@5N:19@5V:22@5N:19@5V:0@5N:19@4FACE@5V:25@5N:20@5V:20@5N:20@5V:12@5N:20@4FACE@5V:2@5N:21@5V:1@5N:21@5V:6@5N:21@4FACE@5V:12@5N:22@5V:20@5N:22@5V:16@5N:22@4FACE@5V:21@5N:23@5V:14@5N:23@5V:10@5N:23@4FACE@5V:17@5N:24@5V:20@5N:24@5V:19@5N:24@4FACE@5V:7@5N:25@5V:13@5N:25@5V:14@5N:25@4FACE@5V:21@5N:26@5V:4@5N:26@5V:14@5N:26@4FACE@5V:9@5N:27@5V:10@5N:27@5V:14@5N:27@4FACE@5V:19@5N:28@5V:22@5N:28@5V:17@5N:28@4FACE@5V:22@5N:29@5V:2@5N:29@5V:6@5N:29@4FACE@5V:17@5N:30@5V:16@5N:30@5V:20@5N:30@4FACE@5V:24@5N:31@5V:17@5N:31@5V:18@5N:31@4FACE@5V:9@5N:32@5V:1@5N:32@5V:0@5N:32@4FACE@5V:12@5N:33@5V:4@5N:33@5V:21@5N:33@4FACE@5V:25@5N:34@5V:10@5N:34@5V:0@5N:34@4FACE@5V:22@5N:35@5V:6@5N:35@5V:23@5N:35@4FACE@5V:5@5N:36@5V:4@5N:36@5V:11@5N:36@4FACE@5V:14@5N:37@5V:1@5N:37@5V:9@5N:37@4FACE@5V:1@5N:38@5V:13@5N:38@5V:6@5N:38@4FACE@5V:23@5N:39@5V:6@5N:39@5V:18@5N:39@4FACE@5V:7@5N:40@5V:6@5N:40@5V:13@5N:40@4FACE@5V:12@5N:41@5V:15@5N:41@5V:11@5N:41@4FACE@5V:23@5N:42@5V:18@5N:42@5V:17@5N:42@4FACE@5V:20@5N:43@5V:25@5N:43@5V:0@5N:43@4FACE@5V:18@5N:44@5V:6@5N:44@5V:8@5N:44@4FACE@5V:15@5N:45@5V:24@5N:45@5V:5@5N:45@4FACE@5V:0@5N:46@5V:22@5N:46@5V:19@5N:46@4FACE@5V:17@5N:47@5V:24@5N:47@5V:15@5N:47";
_global.MODEL_Droid_3 = "@0MATERIALLIST@1MATERIAL@2NAME:FrontColor@2COLOR:255,225,225,200@1MATERIAL@2NAME:BackColor@2COLOR:255,128,128,200@1MATERIAL@2NAME:White@2COLOR:255,255,255,255@0MODEL@1NAME:MDL-cone1822@1ID:1@1MODEL@2NAME:MDL-Mesh1@2ID:2@2MESH@3POSITIONLIST@4V:-0.26,0,-3.27@4V:-0.26,6.64,0.05@4V:1.02,0,-3.02@4V:2.09,0,-2.3@4V:2.81,0,-1.22@4V:3.07,0,0.05@4V:-0.26,0,3.37@4V:-1.53,0,3.12@4V:-2.61,0,2.4@4V:-3.33,0,1.32@4V:-3.58,0,0.05@4V:2.81,0,1.32@4V:2.09,0,2.4@4V:1.02,0,3.12@4V:-3.33,0,-1.22@4V:-2.61,0,-2.3@4V:-1.53,0,-3.02@4N:0,0.45,-0.89@4N:0,1,0@4N:0.34,0.45,-0.83@4N:0,1,0@4N:0.63,0.45,-0.63@4N:0,1,0@4N:0.83,0.45,-0.34@4N:0,1,0@4N:0.89,0.45,0@4N:0,0.45,0.89@4N:0,1,0@4N:-0.34,0.45,0.83@4N:0,1,0@4N:-0.63,0.45,0.63@4N:0,1,0@4N:-0.83,0.45,0.34@4N:0,1,0@4N:-0.89,0.45,0@4N:0,1,0@4N:0.83,0.45,0.34@4N:0,1,0@4N:0.63,0.45,0.63@4N:0,1,0@4N:0.34,0.45,0.83@4N:0,1,0@4N:0,1,0@4N:-0.83,0.45,-0.34@4N:0,1,0@4N:-0.63,0.45,-0.63@4N:0,1,0@4N:-0.34,0.45,-0.83@4N:0,1,0@3POLYGONLIST@4NAME:Faces1@4MATERIAL:White@4FACE@5V:0@5N:0@5V:1@5N:1@5V:2@5N:2@4FACE@5V:2@5N:2@5V:1@5N:3@5V:3@5N:4@4FACE@5V:3@5N:4@5V:1@5N:5@5V:4@5N:6@4FACE@5V:4@5N:6@5V:1@5N:7@5V:5@5N:8@4FACE@5V:6@5N:9@5V:1@5N:10@5V:7@5N:11@4FACE@5V:7@5N:11@5V:1@5N:12@5V:8@5N:13@4FACE@5V:8@5N:13@5V:1@5N:14@5V:9@5N:15@4FACE@5V:9@5N:15@5V:1@5N:16@5V:10@5N:17@4FACE@5V:5@5N:8@5V:1@5N:18@5V:11@5N:19@4FACE@5V:11@5N:19@5V:1@5N:20@5V:12@5N:21@4FACE@5V:12@5N:21@5V:1@5N:22@5V:13@5N:23@4FACE@5V:13@5N:23@5V:1@5N:24@5V:6@5N:9@4FACE@5V:10@5N:17@5V:1@5N:25@5V:14@5N:26@4FACE@5V:14@5N:26@5V:1@5N:27@5V:15@5N:28@4FACE@5V:15@5N:28@5V:1@5N:29@5V:16@5N:30@4FACE@5V:16@5N:30@5V:1@5N:31@5V:0@5N:0";
_global.MODEL_Wall = "@0MATERIALLIST@1MATERIAL@2NAME:FrontColor@2COLOR:255,225,225,200@1MATERIAL@2NAME:BackColor@2COLOR:255,128,128,200@1MATERIAL@2NAME:_White_1@2COLOR:255,255,255,255@0MODEL@1NAME:MDL-Mesh1@1ID:1@1MESH@2POSITIONLIST@3V:-4.99,10,4.8@3V:-4.99,10,-5.2@3V:-4.99,0,-5.2@3V:-4.99,0,4.8@3V:5.01,10,4.8@3V:5.01,0,4.8@3V:5.01,10,-5.2@3V:5.01,0,-5.2@3N:-1,0,0@3N:0,0,1@3N:0,0,-1@3N:1,0,0@3N:0,1,0@2POLYGONLIST@3NAME:Faces1@3MATERIAL:_White_1@3FACE@4V:0@4N:0@4V:1@4N:0@4V:2@4N:0@4V:3@4N:0@3FACE@4V:4@4N:1@4V:0@4N:1@4V:3@4N:1@4V:5@4N:1@3FACE@4V:1@4N:2@4V:6@4N:2@4V:7@4N:2@4V:2@4N:2@3FACE@4V:6@4N:3@4V:4@4N:3@4V:5@4N:3@4V:7@4N:3@3FACE@4V:0@4N:4@4V:4@4N:4@4V:6@4N:4@4V:1@4N:4";
_global.MODEL_Pickup = "@0MATERIALLIST@1MATERIAL@2NAME:FrontColor@2COLOR:255,225,225,200@1MATERIAL@2NAME:BackColor@2COLOR:255,128,128,200@1MATERIAL@2NAME:White@2COLOR:255,255,255,255@0MODEL@1NAME:MDL-Mesh1@1ID:1@1MESH@2POSITIONLIST@3V:-2.5,2,-2.5@3V:2.5,2,-2.5@3V:2.5,2,2.5@3V:-2.5,2,2.5@3V:2.5,7,-2.5@3V:-2.5,7,-2.5@3V:-2.5,7,2.5@3V:2.5,7,2.5@3N:0,-1,0@3N:0,1,0@3N:0,0,-1@3N:1,0,0@3N:0,0,1@3N:-1,0,0@2POLYGONLIST@3NAME:Faces1@3MATERIAL:White@3FACE@4V:0@4N:0@4V:1@4N:0@4V:2@4N:0@4V:3@4N:0@3FACE@4V:4@4N:1@4V:5@4N:1@4V:6@4N:1@4V:7@4N:1@3FACE@4V:1@4N:2@4V:0@4N:2@4V:5@4N:2@4V:4@4N:2@3FACE@4V:2@4N:3@4V:1@4N:3@4V:4@4N:3@4V:7@4N:3@3FACE@4V:3@4N:4@4V:2@4N:4@4V:7@4N:4@4V:6@4N:4@3FACE@4V:0@4N:5@4V:3@4N:5@4V:6@4N:5@4V:5@4N:5";
Frame 62
stop();
mDebug._alpha = 50;
Symbol 8 Button
on (release) {
getURL ("http://www.combots.seantcooper.com", "_blank");
}
Symbol 22 Button
on (release) {
getURL ("http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash", "_blank");
}
Symbol 469 MovieClip [__Packages.CProgrammer_Icon] Frame 0
class CProgrammer_Icon extends MovieClip
{
var _Highlight, _Debug, _width, mToolTip, cacheAsBitmap, mThing, mcProgrammer, mCommand, mcIconImage, attachMovie, getNextHighestDepth, mColorCode, enabled, __get__mEnabled, _Color, filters, __get__mHighlight, mClickAction, mcContainer, onRollOver, onRollOut;
function CProgrammer_Icon () {
super();
_Highlight._visible = false;
_Debug._visible = false;
mWidth = _width;
mHighlight = (false);
mToolTip = "None defined!";
cacheAsBitmap = true;
}
function Clone(mcParent) {
var _local3 = mcParent.getNextHighestDepth();
var _local2 = mcParent.attachMovie("Programmer.Icon", "_Icon" + _local3, _local3);
if (mThing != undefined) {
_local2.AssignThing(mcProgrammer, mThing);
} else {
_local2.AssignCommand(mcProgrammer, mCommand.Clone());
}
return(_local2);
}
function Dispose() {
}
function Process() {
}
function Draw() {
}
function AssignThing(tProgrammer, tThing, tState) {
CreateIcon(tThing.mcLinkID_Icon, tThing.mColorCode);
mThing = tThing;
mToolTip = mThing.mHelp_Text;
Enable(tProgrammer, tState);
}
function AssignCommand(tProgrammer, tCommand, tState) {
CreateIcon(tCommand.mcLinkID_Icon, tCommand.mColorCode);
mCommand = tCommand;
mToolTip = (mCommand.mThing.mHelp_Text + ": ") + mCommand.mHelp_Text;
Enable(tProgrammer, tState);
}
function CreateIcon(tLinkID, tColor) {
mcIconImage.removeMovieClip();
mcIconImage = attachMovie(tLinkID, "_IconImage", getNextHighestDepth());
mColorCode = tColor;
mcIconImage.filters = [new flash.filters.DropShadowFilter(0, 45, 0, 1, 4, 4, 0.34, 1)];
mHighlight = (false);
}
function Enable(tProgrammer, tState) {
tState = ((tState == undefined) ? true : (tState));
mcProgrammer = tProgrammer;
}
function set mEnabled(a) {
enabled = a;
//return(__get__mEnabled());
}
function set mHighlight(a) {
var _local3 = new flash.filters.DropShadowFilter(5, 45, 0, 1, 4, 4, 0.34, 1);
var _local2 = new flash.filters.BevelFilter(2, 45, 16777215, 1, 0, 1, 4, 4, 0.5, 1, "inner");
_Color.filters = [scidd.Draw.CColor.GetColorMatrixFilter(scidd.Draw.CColor.ColorMatrix_Colorize(scidd.Draw.CColor.FromRGB(mColorCode), 1, (a ? 0.5 : 0)))];
filters = [_local3, _local2];
if (a) {
_ShowTooltip();
} else {
_ClearTooltip();
}
//return(__get__mHighlight());
}
function set mSelected(a) {
_Highlight._visible = a;
//return(mSelected);
}
function get mSelected() {
return(_Highlight._visible);
}
function SetMousePress_SelectAndCopy(tContainer) {
mClickAction = "Copy";
mcContainer = tContainer;
onRollOver = function () {
this._RollOver();
};
onRollOut = function () {
this._RollOut();
};
}
function SetMousePress_SelectAndMove(tContainer) {
mClickAction = "Move";
mcContainer = tContainer;
onRollOver = function () {
this._RollOver();
};
onRollOut = function () {
this._RollOut();
};
}
function SetMousePress_None() {
mClickAction = "None";
onRollOver = function () {
this._ShowTooltip();
};
onRollOut = function () {
this._ClearTooltip();
};
}
function SetMousePress_Highlight() {
mClickAction = "None";
onRollOver = function () {
this.mHighlight = true;
};
onRollOut = function () {
this.mHighlight = false;
};
}
function _RollOver() {
mHighlight = (true);
mcProgrammer.mSelection.IconRollOver(this);
}
function _RollOut() {
mHighlight = (false);
mcProgrammer.mSelection.IconRollOut(this);
}
function _ShowTooltip() {
mcProgrammer.mcWindow.SetHelpText(mToolTip);
}
function _ClearTooltip() {
mcProgrammer.mcWindow.SetHelpText("");
}
function SetTooltip(tToolTip) {
mToolTip = tToolTip;
SetMousePress_Highlight();
}
var _CLASSID_ = "CProgrammer_Icon";
static var mWidth = 0;
}
Symbol 470 MovieClip [__Packages.CProgrammer] Frame 0
class CProgrammer extends MovieClip
{
var mcContainer, createEmptyMovieClip, mcBackground, mcPanel, mcWindow, mcSelection, mSelection, _xscale, _yscale, removeMovieClip, _visible, tLastDebug, mThing, mEventItems, mcComponents, mActionItems, mLearnType, mThingList;
function CProgrammer () {
super();
mcContainer = createEmptyMovieClip("_Container", 2);
mcBackground = mcContainer.createEmptyMovieClip("_Background", 2);
mcPanel = mcContainer.createEmptyMovieClip("_Panel", 3);
mcWindow = mcContainer.attachMovie("Programmer.Window", "_Window", 4);
mcSelection = mcContainer.createEmptyMovieClip("_Selection", 6);
mSelection = new CProgrammer_Selection(this, mcSelection);
mcWindow.SetTitleText("Program your Robot!");
mcWindow.mcProgrammer = this;
_xscale = (_yscale = 75);
}
function Dispose() {
ResetThing();
removeMovieClip();
}
function Hide() {
ResetThing();
_visible = false;
}
function Monitor() {
for (var _local4 in tLastDebug) {
tLastDebug[_local4]._Debug._visible = false;
}
if ((mThing.mCommand_CurrentEvent == undefined) || (mThing.mCommand_CurrentCommand == undefined)) {
return(undefined);
}
for (var _local4 in mEventItems) {
var _local2 = mEventItems[_local4];
if (_local2.mCommand == mThing.mCommand_CurrentEvent) {
var _local3 = _local2.FindCommand(mThing.mCommand_CurrentCommand);
if (_local3 == undefined) {
return(undefined);
}
tLastDebug = [_local3, _local2.mcMainIcon];
for (var _local4 in tLastDebug) {
tLastDebug[_local4]._Debug._visible = true;
}
return(undefined);
}
}
}
function CentreOnScreen() {
}
function Reposition(tHard) {
tHard = ((tHard == undefined) ? false : (tHard));
var _local6 = (mcComponents._visible ? 1 : 0);
mcWindow.Update(_CountVisible(mEventItems) + _local6, _CountVisible(mActionItems));
mcComponents._y = mcWindow.GetEventPosition().y;
var _local2 = 0;
var _local3 = ((mcComponents._visible == false) ? 0 : (mEventItems[_local2]._height)) + mcWindow.GetEventPosition().y;
while (_local2 < mEventItems.length) {
if (mEventItems[_local2]._visible) {
if (tHard) {
mEventItems[_local2]._y = _local3;
} else {
mEventItems[_local2].startY = mEventItems[_local2]._y;
mEventItems[_local2].newY = _local3;
mEventItems[_local2].mTimer = getTimer();
mEventItems[_local2].onEnterFrame = function () {
var _local2 = (getTimer() - this.mTimer) / 200;
if (_local2 > 1) {
_local2 = 1;
delete this.onEnterFrame;
}
this._y = this.startY + ((this.newY - this.startY) * _local2);
};
}
_local3 = _local3 + mEventItems[_local2]._height;
}
_local2++;
}
_local2 = 0;
while (_local2 < mActionItems.length) {
mActionItems[_local2]._y = mcWindow.GetActionPosition().y + (_local2 * mActionItems[_local2]._height);
_local2++;
}
}
function _CountVisible(tList) {
var _local2 = 0;
for (var _local3 in tList) {
_local2 = _local2 + (tList[_local3]._visible ? 1 : 0);
}
return(_local2);
}
function Process() {
}
function Draw() {
}
function Reset() {
for (var _local2 in mEventItems) {
mEventItems[_local2].removeMovieClip();
}
for (var _local2 in mActionItems) {
mActionItems[_local2].removeMovieClip();
}
mActionItems = new Array();
mEventItems = new Array();
}
function AddBaseThing(tThing, tLearnType) {
mLearnType = ((tLearnType == undefined) ? "none" : (tLearnType));
Reset();
SetupThing(tThing);
InitComponents();
var _local5 = 0;
while (_local5 < mThingList.length) {
var _local2 = mcComponents.attachMovie("Programmer.Icon", "_Icon" + _local5, 1 + _local5);
mcComponents.mIconList[_local5] = _local2;
_local2._x = mcComponents._Icon._x + (_local5 * _local2._width);
_local2._y = mcComponents._Icon._y;
_local2.AssignThing(this, mThingList[_local5], mThingList[_local5].mHasEvents);
_local2.pClass = this;
_local2.onRelease = function () {
this.pClass.SelectComponent(this);
};
_local2.SetMousePress_Highlight();
if (mThingList[_local5].mHasActions) {
var _local3 = mcPanel.getNextHighestDepth();
var _local4 = mcPanel.attachMovie("Icon.Container", "IconContainer" + _local3, _local3);
_local4.AssignThing(this, mThingList[_local5], true);
mActionItems[mActionItems.length] = _local4;
}
_local5++;
}
for (_local5 in mcComponents.mIconList) {
SelectComponent(mcComponents.mIconList[_local5]);
}
mSelection.Add(mActionItems[0].mIconList[0]);
Reposition();
mcComponents._Bin.pClass = this;
mcComponents._Bin.onRollOver = function () {
this.pClass.mcWindow.SetHelpText("Drag ICON onto this to delete!");
};
mcComponents._Bin.onRollOut = function () {
this.pClass.mcWindow.SetHelpText("");
};
}
function SetupThing(tThing) {
mThing = tThing;
mThingList = mThing.GetThingList();
mThing.SetTint(mColorCode);
}
function ResetThing(tFlag) {
tFlag = ((tFlag == undefined) ? false : true);
mThingList = mThing.GetThingList();
if (tFlag) {
mThing.SetTint(mColorCode);
} else {
mThing.SetTint();
}
}
function MakeEventExclusive(tCommand) {
mcComponents._visible = false;
var _local2 = 0;
while (_local2 < mEventItems.length) {
mEventItems[_local2]._visible = ((mEventItems[_local2].mCommand == tCommand) ? true : false);
_local2++;
}
mcWindow.SetTitleText(((mThingList[0].mHelp_Title + ".") + tCommand.mHelp_Title) + ": What do you want it to do?");
Reposition();
}
function InitComponents() {
mcComponents = mcPanel.attachMovie("Programmer.Components", "_Components", 1);
mcComponents._Icon._visible = false;
mcComponents.mIconList = new Array();
}
function CreateComponentEvents(tIcon) {
for (var _local10 in mEventItems) {
mEventItems[_local10].removeMovieClip();
}
mEventItems = new Array();
var _local8 = 0;
while (_local8 < mcComponents.mIconList.length) {
tIcon = mcComponents.mIconList[_local8];
if (!tIcon.__get__mSelected()) {
} else if (tIcon.mThing != undefined) {
var _local6 = tIcon.mThing;
if (_local6.mHasEvents) {
var _local2 = 0;
var _local9 = 0;
while (_local2 < _local6.mCommand_RegisterList.length) {
var _local3 = _local6.mCommand_RegisterList[_local2];
if (_local3.mEvent) {
var _local4 = mcPanel.getNextHighestDepth();
var _local5 = mcPanel.attachMovie("Icon.Container.2", "IconContainer" + _local4, _local4);
_local5.AssignCommand(this, _local3, true);
mEventItems[mEventItems.length] = _local5;
}
_local2++;
}
}
}
_local8++;
}
SortComponentEvents(true);
}
function SortComponentEvents(tHard) {
mEventItems.sort(sortOrder);
var _local3 = 0;
while (_local3 < mEventItems.length) {
mEventItems[_local3].mIndex = _local3;
var _local2 = mEventItems[_local3].mcPriorityIcon;
_local2._visible = true;
_local2._Move_Up.enabled = true;
_local2._Move_Down.enabled = true;
_local2._Move_Up._alpha = 100;
_local2._Move_Down._alpha = 100;
_local3++;
}
mEventItems[0].mcPriorityIcon._visible = false;
mEventItems[1].mcPriorityIcon._Move_Up.enabled = false;
mEventItems[1].mcPriorityIcon._Move_Up._alpha = 50;
mEventItems[mEventItems.length - 1].mcPriorityIcon._Move_Down.enabled = false;
mEventItems[mEventItems.length - 1].mcPriorityIcon._Move_Down._alpha = 50;
mThing.SortEvents();
Reposition(tHard);
}
function sortOrder(a, b) {
return(((a.mCommand.mPriority > b.mCommand.mPriority) ? 1 : (((a.mCommand.mPriority == b.mCommand.mPriority) ? 0 : -1))));
}
function IconContainer_MoveUp(mc) {
if (mc.mIndex < 1) {
return(undefined);
}
var _local4 = mEventItems[mc.mIndex].mCommand.mPriority;
var _local3 = mEventItems[mc.mIndex - 1].mCommand.mPriority;
mEventItems[mc.mIndex].mCommand.mPriority = _local3;
mEventItems[mc.mIndex - 1].mCommand.mPriority = _local4;
SortComponentEvents();
}
function IconContainer_MoveDown(mc) {
if (mc.mIndex > (mEventItems.length - 2)) {
return(undefined);
}
var _local4 = mEventItems[mc.mIndex].mCommand.mPriority;
var _local3 = mEventItems[mc.mIndex + 1].mCommand.mPriority;
mEventItems[mc.mIndex].mCommand.mPriority = _local3;
mEventItems[mc.mIndex + 1].mCommand.mPriority = _local4;
SortComponentEvents();
}
function SelectComponent(tIcon) {
tIcon.__set__mSelected((tIcon.__get__mSelected() ? false : true));
CreateComponentEvents();
}
var _CLASSID_ = "CProgrammer";
static var mColorCode = [6810983, 15558503, 14934786, 52479, 15558637, 11622657, 16613421, 10066329];
}
Symbol 471 MovieClip [__Packages.scidd.Draw.F3D.CProjection3D] Frame 0
class scidd.Draw.F3D.CProjection3D
{
function CProjection3D () {
}
static function Isometric(tv_list) {
for (var _local3 in tv_list) {
var _local1 = tv_list[_local3];
_local1.mY = _local1.mY + ((_local1.mX + _local1.mZ) * 0.5);
_local1.mX = _local1.mX - _local1.mZ;
}
}
static function Perspective(tv_list, tlens) {
for (var _local5 in tv_list) {
var _local1 = tv_list[_local5];
var _local2 = _local1.mZ;
_local1.mX = (tlens * _local1.mX) / _local2;
_local1.mY = (tlens * _local1.mY) / _local2;
}
}
var _CLASSID_ = "scidd.Draw.F3D.CProjection3D";
var mType_Perspective = 1;
var mType_Isometric = 2;
var mType_Pushed = 3;
var mType = scidd.Draw.F3D.CProjection3D.prototype.mType_Perspective;
}
Symbol 472 MovieClip [__Packages.scidd.Math.CVector3] Frame 0
class scidd.Math.CVector3
{
var mX, mY, mZ;
function CVector3 (tx, ty, tz) {
mX = tx;
mY = ty;
mZ = tz;
}
function Clone() {
return(new scidd.Math.CVector3(mX, mY, mZ));
}
function Add(tv) {
mX = mX + tv.mX;
mY = mY + tv.mY;
mZ = mZ + tv.mZ;
return(this);
}
function Sub(tv) {
mX = mX - tv.mX;
mY = mY - tv.mY;
mZ = mZ - tv.mZ;
return(this);
}
function Equals(tv) {
return(((mX == tv.mX) && (mY == tv.mY)) && (mZ == tv.mZ));
}
function Equals0() {
return(((mX == 0) && (mY == 0)) && (mZ == 0));
}
function Set(tv) {
mX = tv.mX;
mY = tv.mY;
mZ = tv.mZ;
return(this);
}
function Clear() {
mX = 0;
mY = 0;
mZ = 0;
return(this);
}
function Invert() {
mX = -mX;
mY = -mY;
mZ = -mZ;
return(this);
}
function Inverse() {
return(new scidd.Math.CVector3(-mX, -mY, -mZ));
}
function Abs() {
return(new scidd.Math.CVector3(Math.abs(mX), Math.abs(mY), Math.abs(mZ)));
}
function ScaleN(tScale) {
mX = mX * tScale;
mY = mY * tScale;
mZ = mZ * tScale;
return(this);
}
function Scale(tScale) {
mX = mX * tScale.mX;
mY = mY * tScale.mY;
mZ = mZ * tScale.mZ;
return(this);
}
function _Length() {
return(Math.sqrt(((mX * mX) + (mY * mY)) + (mZ * mZ)));
}
function Distance(tVector3) {
var _local4 = mX - tVector3.mX;
var _local3 = mY - tVector3.mY;
var _local2 = mZ - tVector3.mZ;
return(Math.sqrt(((_local4 * _local4) + (_local3 * _local3)) + (_local2 * _local2)));
}
function Normalize(tLength) {
if (_Length() != 0) {
ScaleN(tLength / _Length());
}
return(this);
}
function DotProduct(tv) {
return(((mX * tv.mX) + (mY * tv.mY)) + (mZ * tv.mZ));
}
function CrossProduct(tv) {
return(new scidd.Math.CVector3((mY * tv.mZ) - (mZ * tv.mY), (mZ * tv.mX) - (mX * tv.mZ), (mX * tv.mY) - (mY * tv.mX)));
}
function Precision(tPrecision) {
var _local2 = ((tPrecision == 0) ? 1 : (Math.pow(10, tPrecision)));
mX = Math.round(mX * _local2) / _local2;
mY = Math.round(mY * _local2) / _local2;
mZ = Math.round(mZ * _local2) / _local2;
return(this);
}
static function Average(tvlist) {
var _local3 = tvlist[0].Clone();
var _local1 = 1;
while (_local1 < tvlist.length) {
_local3.Add(tvlist[_local1]);
_local1++;
}
return(new scidd.Math.CVector3(_local3.mX / tvlist.length, _local3.mY / tvlist.length, _local3.mZ / tvlist.length));
}
function RotateY(tRads) {
var _local3 = Math.cos(tRads);
var _local2 = Math.sin(tRads);
var _local5 = (mX * _local3) - (mZ * _local2);
var _local4 = (mZ * _local3) + (mX * _local2);
mX = _local5;
mZ = _local4;
}
function toString() {
return(((((("{mX=" + mX) + ", mY=") + mY) + ", mZ=") + mZ) + "}");
}
var _CLASSID_ = "scidd.Math.CVector3";
}
Symbol 473 MovieClip [__Packages.scidd.Draw.F3D.CProjection3D_Pushed] Frame 0
class scidd.Draw.F3D.CProjection3D_Pushed extends scidd.Draw.F3D.CProjection3D
{
var mType, mType_Pushed, mPitch, mAxisScale;
function CProjection3D_Pushed (tPitch) {
super();
mType = mType_Pushed;
mPitch = tPitch;
var _local4 = Math.cos(tPitch);
var _local3 = Math.sin(tPitch);
mAxisScale = new scidd.Math.CVector3(1, Math.abs((0 * _local4) - (1 * _local3)), Math.abs((1 * _local4) + (0 * _local3)));
mAxisScale.mY = Math.round(mAxisScale.mY * 10) / 10;
mAxisScale.mZ = Math.round(mAxisScale.mZ * 10) / 10;
}
function Project(tMesh, tRotation, tWorldPosition, tScale) {
var _local8 = Math.cos(tRotation);
var _local7 = Math.sin(tRotation);
for (var _local17 in tMesh.mPosition_List) {
var _local6 = tMesh.mPosition_List[_local17];
var _local2 = tMesh.mPosition_List_Projected[_local17];
var _local11 = -_local6.mX;
var _local13 = -_local6.mY;
var _local9 = _local6.mZ;
_local2.mX = (((_local11 * _local8) - (_local9 * _local7)) * tScale.mX) + tWorldPosition.mX;
_local2.mY = (_local13 * tScale.mY) + tWorldPosition.mY;
_local2.mZ = (((_local9 * _local8) + (_local11 * _local7)) * tScale.mZ) + tWorldPosition.mZ;
_local2.mSort = (-_local2.mY) + (_local2.mZ / 100000);
_local2.mY = (_local2.mY * mAxisScale.mY) + (_local2.mZ * mAxisScale.mZ);
_local2.mX = _local2.mX;
}
for (var _local17 in tMesh.mNormal_List) {
var _local5 = tMesh.mNormal_List[_local17];
var _local3 = tMesh.mNormal_List_Projected[_local17];
var _local12 = -_local5.mX;
var _local14 = -_local5.mY;
var _local10 = _local5.mZ;
_local3.mX = (_local12 * _local8) - (_local10 * _local7);
_local3.mY = _local14;
_local3.mZ = (_local10 * _local8) + (_local12 * _local7);
_local3.mY = (_local3.mY * mAxisScale.mY) + (_local3.mZ * mAxisScale.mZ);
_local3.mX = _local3.mX;
}
}
function Project_Shadow(tMesh, tRotation, tWorldPosition, tScale, tLight, tHeight, tShadowScalar) {
tShadowScalar = ((tShadowScalar == undefined) ? 1 : (tShadowScalar));
var _local12 = Math.cos(tRotation);
var _local11 = Math.sin(tRotation);
for (var _local15 in tMesh.mPosition_List) {
var _local3 = tMesh.mPosition_List[_local15];
var _local2 = tMesh.mPosition_List_Projected[_local15];
var _local5 = -_local3.mX;
var _local6 = -_local3.mY;
var _local4 = _local3.mZ;
_local2.mX = (((_local5 * _local12) - (_local4 * _local11)) * tScale.mX) + tWorldPosition.mX;
_local2.mY = ((_local6 * tScale.mY) + tWorldPosition.mY) + tHeight;
_local2.mZ = (((_local4 * _local12) + (_local5 * _local11)) * tScale.mZ) + tWorldPosition.mZ;
_local2.mX = _local2.mX + ((tLight.mX * _local2.mY) * tShadowScalar);
_local2.mZ = _local2.mZ + ((tLight.mZ * _local2.mY) * tShadowScalar);
_local2.mY = 0;
_local2.mY = (_local2.mY * mAxisScale.mY) + (_local2.mZ * mAxisScale.mZ);
_local2.mX = _local2.mX;
}
}
function Transform_X(x) {
return(x);
}
function Transform_Y(y) {
return(y * mAxisScale.mY);
}
function Transform_Z(z) {
return(z * mAxisScale.mZ);
}
var _CLASSID_ = "scidd.Draw.F3D.CProjection3D_Pushed";
}
Symbol 474 MovieClip [__Packages.scidd.Draw.F3D.CMesh3D] Frame 0
class scidd.Draw.F3D.CMesh3D
{
var mPosition_List, mPosition_List_Projected, mNormal_List, mNormal_List_Projected, mUV_List, mFace_List, mFace_List_Render, mMaterial_List, mEdge_List, mID, mUniqueID, mXMLLoaded, mLightSourceDef, mMin, mMax, mOriginalSize, mUnitSize;
function CMesh3D (tID) {
mPosition_List = new Array();
mPosition_List_Projected = new Array();
mNormal_List = new Array();
mNormal_List_Projected = new Array();
mUV_List = new Array();
mFace_List = new Array();
mFace_List_Render = new Array();
mMaterial_List = new Array();
mEdge_List = new Array();
mID = ((tID == undefined) ? "DEFAULT" : (tID));
mUniqueID = 0;
mXMLLoaded = false;
AddPosition(new scidd.Math.CVector3(0, 0, 0));
mLightSourceDef = new scidd.Math.CVector3(0, 0, -1);
}
function Render(tDraw_MC, tLightSource, tNoDisplacement, tOverRideMaterial) {
if (!tDraw_MC._visible) {
return(undefined);
}
if (tLightSource == undefined) {
tLightSource = mLightSourceDef;
}
mFace_List_Render = new Array();
for (var _local8 in mFace_List) {
var _local2 = mFace_List[_local8];
if (_local2.Backface()) {
mFace_List_Render[mFace_List_Render.length] = _local2;
} else if (_local2.mMaterial.mType == scidd.Draw.F3D.CMaterial.mType_MovieClip) {
_local2.mMaterial.ClearMC(tDraw_MC, _local2.mID);
}
}
if ((tNoDisplacement == undefined) || (!tNoDisplacement)) {
var _local9 = mPosition_List_Projected[0].Clone();
Render_Displace(_local9);
tDraw_MC._x = _local9.mX;
tDraw_MC._y = _local9.mY;
tDraw_MC._xscale = 100;
tDraw_MC._yscale = 100;
}
tDraw_MC._z = mPosition_List_Projected[0].mZ;
tDraw_MC.mZSort = tDraw_MC._z;
tDraw_MC.mZRender = tDraw_MC._z;
tDraw_MC.cacheAsBitmap = false;
tDraw_MC.clear();
for (var _local8 in mFace_List_Render) {
var _local2 = mFace_List_Render[_local8];
var _local4 = mNormal_List_Projected[_local2.mN_List[0]];
var _local5 = ((tOverRideMaterial == undefined) ? (_local2.mMaterial) : (tOverRideMaterial));
_local5.Render(tDraw_MC, _local2, scidd.Draw.F3D.CMesh3DFace.NormalToLight(tLightSource, _local4));
}
}
function QRender_MCList(mcList, tMaterialList, tLightSource, tShadow) {
if (tLightSource == undefined) {
tLightSource = mLightSourceDef;
}
tShadow = ((tShadow == undefined) ? false : (tShadow));
if (tShadow) {
mFace_List_Render = mFace_List;
} else {
mFace_List_Render = new Array();
for (var _local3 in mFace_List) {
var _local2 = mFace_List[_local3];
if (_local2.Backface()) {
_local2.SetSort_Min();
mFace_List_Render[mFace_List_Render.length] = _local2;
} else if (_local2.mMaterial.mType == scidd.Draw.F3D.CMaterial.mType_MovieClip) {
_local2.mMaterial.ClearMC(tDraw_MC, _local2.mID);
}
}
mFace_List_Render = mFace_List_Render.sortOn("mSort", Array.NUMERIC | Array.DESCENDING);
}
for (var _local10 in mcList) {
var tDraw_MC = mcList[_local10];
var _local6 = tMaterialList[_local10];
tDraw_MC._z = mPosition_List_Projected[0].mZ;
tDraw_MC.mZSort = tDraw_MC._z;
tDraw_MC.mZRender = tDraw_MC._z;
tDraw_MC.clear();
var _local3 = mFace_List_Render.length - 1;
while (_local3 >= 0) {
var _local2 = mFace_List_Render[_local3];
var _local4 = mNormal_List_Projected[_local2.mN_List[0]];
var _local5 = ((_local6 == undefined) ? (_local2.mMaterial) : (_local6));
_local5.Render(tDraw_MC, _local2, scidd.Draw.F3D.CMesh3DFace.NormalToLight(tLightSource, _local4));
_local3--;
}
}
}
function Render_Displace(tDisp) {
for (var _local4 in mPosition_List_Projected) {
var _local2 = mPosition_List_Projected[_local4];
_local2.mX = _local2.mX - tDisp.mX;
_local2.mY = _local2.mY - tDisp.mY;
}
}
function UpdatePosition(tDraw_MC, tPosition) {
if (tDraw_MC._visible) {
var _local3 = tPosition;
tDraw_MC._x = _local3.mX;
tDraw_MC._y = _local3.mY;
var _local4 = ZAlpha(_local3.mZ);
if (tDraw_MC._alpha != _local4) {
tDraw_MC._alpha = _local4;
}
tDraw_MC.mZSort = _local3.mZ;
if (tDraw_MC.cacheAsBitmap == false) {
tDraw_MC.cacheAsBitmap = true;
}
}
}
function ZAlpha(tz) {
var _local1 = 2500;
var _local2 = (_local1 - (Math.abs(tz) - _local1)) / _local1;
if (_local2 > 1) {
return(100);
}
return(_local2 * 100);
}
function Finalize(tCompress, tTriangulateTextures, tRenewNormal) {
if ((tCompress != undefined) && (tCompress)) {
Compress();
}
if ((tTriangulateTextures != undefined) && (tTriangulateTextures)) {
TriangulateTextures();
}
Create_ListProjected();
MakeUnitLength();
if ((mEdge_List != undefined) && (mEdge_List.length > 0)) {
var _local2 = 0;
while (_local2 < mFace_List.length) {
mFace_List[_local2].AssignEdges(mEdge_List, mPosition_List);
_local2++;
}
}
}
function Create_ListProjected() {
var _local2 = 0;
while (_local2 < mPosition_List.length) {
mPosition_List_Projected[_local2] = new scidd.Math.CVector3(0, 0, 0);
_local2++;
}
_local2 = 0;
while (_local2 < mNormal_List.length) {
mNormal_List_Projected[_local2] = new scidd.Math.CVector3(0, 0, 0);
_local2++;
}
var _local3 = 0;
while (_local3 < mFace_List.length) {
mFace_List[_local3].Cache(mPosition_List_Projected, mNormal_List_Projected, mUV_List);
_local3++;
}
}
function RenewNormals() {
var _local4 = mFace_List.length - 1;
while (_local4 >= 0) {
var _local3 = mFace_List[_local4];
var _local7 = mPosition_List[_local3.mV_List[0]];
var _local6 = mPosition_List[_local3.mV_List[1]];
var _local5 = mPosition_List[_local3.mV_List[2]];
var _local2 = _local3.mN_List.length - 1;
while (_local2 >= 0) {
mNormal_List[_local3.mN_List[_local2]] = PlaneNormal(_local5, _local6, _local7);
_local2--;
}
_local4--;
}
}
function TriangulateTextures() {
var _local3 = mFace_List.length - 1;
while (_local3 >= 0) {
var _local2 = mFace_List[_local3];
if ((_local2.mV_List.length == 4) && (_local2.mMaterial.__get__mNeedsTriangluation())) {
var _local13 = mUV_List[_local2.mUV_List[0]];
var _local12 = mUV_List[_local2.mUV_List[1]];
var _local11 = mUV_List[_local2.mUV_List[2]];
var _local10 = mUV_List[_local2.mUV_List[3]];
var _local8 = new Array(_local2.mV_List[0], _local2.mV_List[1], _local2.mV_List[2]);
var _local9 = new Array(_local2.mV_List[0], _local2.mV_List[2], _local2.mV_List[3]);
var _local4 = new Array(_local2.mN_List[0], _local2.mN_List[1], _local2.mN_List[2]);
var _local5 = new Array(_local2.mN_List[0], _local2.mN_List[2], _local2.mN_List[3]);
var _local7 = new Array(_local2.mUV_List[0], _local2.mUV_List[1], _local2.mUV_List[2]);
var _local6 = new Array(_local2.mUV_List[0], _local2.mUV_List[2], _local2.mUV_List[3]);
AddFace(new scidd.Draw.F3D.CMesh3DFace(_local8, _local4, _local7, _local2.mMaterial));
AddFace(new scidd.Draw.F3D.CMesh3DFace(_local9, _local5, _local6, _local2.mMaterial));
delete mFace_List[_local3];
mFace_List.splice(_local3, 1);
}
_local3--;
}
}
function SetP(tp, x, y) {
tp.x = x;
tp.y = y;
}
function MakeUnitLength() {
mMin = mPosition_List[0].Clone();
mMax = mPosition_List[0].Clone();
var _local2 = 1;
while (_local2 < mPosition_List.length) {
if (mPosition_List[_local2].mX < mMin.mX) {
mMin.mX = mPosition_List[_local2].mX;
} else if (mPosition_List[_local2].mX > mMax.mX) {
mMax.mX = mPosition_List[_local2].mX;
}
if (mPosition_List[_local2].mY < mMin.mY) {
mMin.mY = mPosition_List[_local2].mY;
} else if (mPosition_List[_local2].mY > mMax.mY) {
mMax.mY = mPosition_List[_local2].mY;
}
if (mPosition_List[_local2].mZ < mMin.mZ) {
mMin.mZ = mPosition_List[_local2].mZ;
} else if (mPosition_List[_local2].mZ > mMax.mZ) {
mMax.mZ = mPosition_List[_local2].mZ;
}
_local2++;
}
mOriginalSize = mMax.Clone().Sub(mMin);
mUnitSize = mOriginalSize.Clone().Normalize(1);
var _local3 = mOriginalSize.Clone();
if ((_local3.mX > _local3.mY) && (_local3.mX > _local3.mZ)) {
mScaleFactor = _local3.mX;
} else if ((_local3.mY > _local3.mX) && (_local3.mY > _local3.mZ)) {
mScaleFactor = _local3.mY;
} else {
mScaleFactor = _local3.mZ;
}
if (mScaleFactor > 0) {
}
}
function Compress() {
var _local5 = Compress_1(mPosition_List);
var _local4 = Compress_1(mNormal_List);
var _local2 = mFace_List.length - 1;
while (_local2 >= 0) {
var _local3 = mFace_List[_local2];
_local3.RemapV(_local5);
_local3.RemapN(_local4);
_local2--;
}
}
function Compress_1(tPositionList) {
var _local4 = new Array(tPositionList.length);
var _local3 = 0;
while (_local3 < _local4.length) {
_local4[_local3] = -1;
_local3++;
}
_local3 = 0;
while (_local3 < (tPositionList.length - 1)) {
var _local1 = _local3 + 1;
while (_local1 < tPositionList.length) {
if (tPositionList[_local3].Equals(tPositionList[_local1])) {
delete tPositionList[_local1];
_local4[_local1] = _local3;
}
_local1++;
}
_local3++;
}
_local3 = 0;
var _local5 = 0;
while (_local3 < tPositionList.length) {
if (_local4[_local3] == -1) {
_local4[_local3] = _local5;
_local5++;
}
_local3++;
}
_local3 = 0;
while (_local3 < tPositionList.length) {
if (tPositionList[_local3] == undefined) {
tPositionList.splice(_local3, 1);
_local3--;
}
_local3++;
}
return(_local4);
}
function AddFace(tFace) {
tFace.mID = ++mUniqueID;
mFace_List[mFace_List.length] = tFace;
}
function AddPosition(tVector3) {
mPosition_List[mPosition_List.length] = tVector3;
return(mPosition_List.length - 1);
}
function AddNormal(tVector3, tInvert) {
if ((tInvert != undefined) && (tInvert)) {
tVector3.Invert();
}
mNormal_List[mNormal_List.length] = tVector3;
return(mNormal_List.length - 1);
}
function AddUV(tPoint) {
mUV_List[mUV_List.length] = tPoint;
return(mUV_List.length - 1);
}
function AddEdge(tV1, tV2) {
mEdge_List[mEdge_List.length] = {v1:tV1, v2:tV2};
return(mEdge_List.length - 1);
}
function AddMaterial(tMaterial) {
mMaterial_List[mMaterial_List] = tMaterial;
}
function PlaneNormal(tv1, tv2, tv3) {
var _local1 = tv3.Clone();
var _local3 = tv1.Clone();
_local1.Sub(tv2);
_local3.Sub(tv2);
var _local2 = _local1.CrossProduct(_local3);
_local2.Normalize(1);
return(_local2);
}
function ApplyTransformation(tMatrix) {
for (var _local5 in mPosition_List) {
var _local3 = new scidd.Math.CVector3(0, 0, 0);
tMatrix.TransformVector(mPosition_List[_local5], _local3);
mPosition_List[_local5] = _local3;
}
for (var _local5 in mNormal_List) {
var _local2 = new scidd.Math.CVector3(0, 0, 0);
tMatrix.TransformVector_NoTranslate(mNormal_List[_local5], _local2);
_local2.Normalize(1);
mNormal_List[_local5] = _local2;
}
}
var _CLASSID_ = "scidd.Draw.F3D.CMesh3D";
var mScaleFactor = 1;
}
Symbol 475 MovieClip [__Packages.scidd.Math.CMatrix4] Frame 0
class scidd.Math.CMatrix4
{
var mE00, mE01, mE02, mE03, mE10, mE11, mE12, mE13, mE20, mE21, mE22, mE23, mE30, mE31, mE32, mE33;
function CMatrix4 () {
Identity();
}
function Identity() {
mE00 = 1;
mE01 = 0;
mE02 = 0;
mE03 = 0;
mE10 = 0;
mE11 = 1;
mE12 = 0;
mE13 = 0;
mE20 = 0;
mE21 = 0;
mE22 = 1;
mE23 = 0;
mE30 = 0;
mE31 = 0;
mE32 = 0;
mE33 = 1;
return(this);
}
static function Identity_Matrix() {
var _local1 = new scidd.Math.CMatrix4();
_local1.mE00 = 1;
_local1.mE01 = 0;
_local1.mE02 = 0;
_local1.mE03 = 0;
_local1.mE10 = 0;
_local1.mE11 = 1;
_local1.mE12 = 0;
_local1.mE13 = 0;
_local1.mE20 = 0;
_local1.mE21 = 0;
_local1.mE22 = 1;
_local1.mE23 = 0;
_local1.mE30 = 0;
_local1.mE31 = 0;
_local1.mE32 = 0;
_local1.mE33 = 1;
return(_local1);
}
function toString() {
var _local2 = "CMatrix4 = \n";
_local2 = _local2 + ((((((((("[" + mE00) + ", ") + mE01) + ", ") + mE02) + ", ") + mE03) + "]") + newline);
_local2 = _local2 + ((((((((("[" + mE10) + ", ") + mE11) + ", ") + mE12) + ", ") + mE13) + "]") + newline);
_local2 = _local2 + ((((((((("[" + mE20) + ", ") + mE21) + ", ") + mE22) + ", ") + mE23) + "]") + newline);
_local2 = _local2 + (((((((("[" + mE30) + ", ") + mE31) + ", ") + mE32) + ", ") + mE33) + "]");
return(_local2);
}
function Clone() {
var _local2 = new scidd.Math.CMatrix4();
_local2.mE00 = mE00;
_local2.mE01 = mE01;
_local2.mE02 = mE02;
_local2.mE03 = mE03;
_local2.mE10 = mE10;
_local2.mE11 = mE11;
_local2.mE12 = mE12;
_local2.mE13 = mE13;
_local2.mE20 = mE20;
_local2.mE21 = mE21;
_local2.mE22 = mE22;
_local2.mE23 = mE23;
_local2.mE30 = mE30;
_local2.mE31 = mE31;
_local2.mE32 = mE32;
_local2.mE33 = mE33;
return(_local2);
}
function Copy(tMatrix) {
mE00 = tMatrix.mE00;
mE01 = tMatrix.mE01;
mE02 = tMatrix.mE02;
mE03 = tMatrix.mE03;
mE10 = tMatrix.mE10;
mE11 = tMatrix.mE11;
mE12 = tMatrix.mE12;
mE13 = tMatrix.mE13;
mE20 = tMatrix.mE20;
mE21 = tMatrix.mE21;
mE22 = tMatrix.mE22;
mE23 = tMatrix.mE23;
mE30 = tMatrix.mE30;
mE31 = tMatrix.mE31;
mE32 = tMatrix.mE32;
mE33 = tMatrix.mE33;
return(this);
}
function Normalize() {
var _local2 = 1 / Math.sqrt(((mE00 * mE00) + (mE01 * mE01)) + (mE02 * mE02));
mE00 = mE00 * _local2;
mE01 = mE01 * _local2;
mE02 = mE02 * _local2;
_local2 = 1 / Math.sqrt(((mE10 * mE10) + (mE11 * mE11)) + (mE12 * mE12));
mE10 = mE10 * _local2;
mE11 = mE11 * _local2;
mE12 = mE12 * _local2;
_local2 = 1 / Math.sqrt(((mE20 * mE20) + (mE21 * mE21)) + (mE22 * mE22));
mE20 = mE20 * _local2;
mE21 = mE21 * _local2;
mE22 = mE22 * _local2;
return(this);
}
function Multiply(a, b) {
mE00 = ((a.mE00 * b.mE00) + (a.mE01 * b.mE10)) + (a.mE02 * b.mE20);
mE01 = ((a.mE00 * b.mE01) + (a.mE01 * b.mE11)) + (a.mE02 * b.mE21);
mE02 = ((a.mE00 * b.mE02) + (a.mE01 * b.mE12)) + (a.mE02 * b.mE22);
mE03 = 0;
mE10 = ((a.mE10 * b.mE00) + (a.mE11 * b.mE10)) + (a.mE12 * b.mE20);
mE11 = ((a.mE10 * b.mE01) + (a.mE11 * b.mE11)) + (a.mE12 * b.mE21);
mE12 = ((a.mE10 * b.mE02) + (a.mE11 * b.mE12)) + (a.mE12 * b.mE22);
mE13 = 0;
mE20 = ((a.mE20 * b.mE00) + (a.mE21 * b.mE10)) + (a.mE22 * b.mE20);
mE21 = ((a.mE20 * b.mE01) + (a.mE21 * b.mE11)) + (a.mE22 * b.mE21);
mE22 = ((a.mE20 * b.mE02) + (a.mE21 * b.mE12)) + (a.mE22 * b.mE22);
mE23 = 0;
mE30 = (((a.mE30 * b.mE00) + (a.mE31 * b.mE10)) + (a.mE32 * b.mE20)) + b.mE30;
mE31 = (((a.mE30 * b.mE01) + (a.mE31 * b.mE11)) + (a.mE32 * b.mE21)) + b.mE31;
mE32 = (((a.mE30 * b.mE02) + (a.mE31 * b.mE12)) + (a.mE32 * b.mE22)) + b.mE32;
mE33 = 1;
return(this);
}
function MultiplyNew(b) {
var _local2 = new scidd.Math.CMatrix4();
return(_local2.Multiply(this, b));
}
function Multiply_Inverse(b, a) {
return(Multiply(a, b));
}
function TransformVector(tVecS, tVecD) {
var _local4 = tVecS.mX;
var _local3 = tVecS.mY;
var _local2 = tVecS.mZ;
tVecD.mX = (((_local4 * mE00) + (_local3 * mE10)) + (_local2 * mE20)) + mE30;
tVecD.mY = (((_local4 * mE01) + (_local3 * mE11)) + (_local2 * mE21)) + mE31;
tVecD.mZ = (((_local4 * mE02) + (_local3 * mE12)) + (_local2 * mE22)) + mE32;
}
function TransformVectors(tArrS, tArrD) {
for (var _local9 in tArrS) {
var _local5 = tArrS[_local9];
var _local6 = tArrD[_local9];
var _local4 = _local5.mX;
var _local3 = _local5.mY;
var _local2 = _local5.mZ;
_local6.mZ = (((_local4 * mE02) + (_local3 * mE12)) + (_local2 * mE22)) + mE32;
_local6.mY = (((_local4 * mE01) + (_local3 * mE11)) + (_local2 * mE21)) + mE31;
_local6.mX = (((_local4 * mE00) + (_local3 * mE10)) + (_local2 * mE20)) + mE30;
}
}
function TransformVectors_NoTranslate(tArrS, tArrD) {
for (var _local9 in tArrS) {
var _local5 = tArrS[_local9];
var _local6 = tArrD[_local9];
var _local4 = _local5.mX;
var _local3 = _local5.mY;
var _local2 = _local5.mZ;
_local6.mZ = ((_local4 * mE02) + (_local3 * mE12)) + (_local2 * mE22);
_local6.mY = ((_local4 * mE01) + (_local3 * mE11)) + (_local2 * mE21);
_local6.mX = ((_local4 * mE00) + (_local3 * mE10)) + (_local2 * mE20);
}
}
function TransformVectors_WithLens(tArrS, tArrD, tLens) {
for (var _local10 in tArrS) {
var _local6 = tArrS[_local10];
var _local2 = tArrD[_local10];
var _local5 = _local6.mX;
var _local4 = _local6.mY;
var _local3 = _local6.mZ;
_local2.mZ = (((_local5 * mE02) + (_local4 * mE12)) + (_local3 * mE22)) + mE32;
_local2.mY = (tLens * ((((_local5 * mE01) + (_local4 * mE11)) + (_local3 * mE21)) + mE31)) / _local2.mZ;
_local2.mX = (tLens * ((((_local5 * mE00) + (_local4 * mE10)) + (_local3 * mE20)) + mE30)) / _local2.mZ;
}
}
function TransformVector_Inverse(tVecS, tVecD) {
var _local4 = tVecS.mX;
var _local3 = tVecS.mY;
var _local2 = tVecS.mZ;
tVecD.mX = (((_local4 * mE00) + (_local3 * mE01)) + (_local2 * mE02)) - mE30;
tVecD.mY = (((_local4 * mE10) + (_local3 * mE11)) + (_local2 * mE12)) - mE31;
tVecD.mZ = (((_local4 * mE20) + (_local3 * mE21)) + (_local2 * mE22)) - mE32;
}
function TransformVector_NoTranslate(tVecS, tVecD) {
var _local4 = tVecS.mX;
var _local3 = tVecS.mY;
var _local2 = tVecS.mZ;
tVecD.mX = ((_local4 * mE00) + (_local3 * mE10)) + (_local2 * mE20);
tVecD.mY = ((_local4 * mE01) + (_local3 * mE11)) + (_local2 * mE21);
tVecD.mZ = ((_local4 * mE02) + (_local3 * mE12)) + (_local2 * mE22);
}
function TransformVector_NoTranslate_Inverse(tVecS, tVecD) {
var _local4 = tVecS.mX;
var _local3 = tVecS.mY;
var _local2 = tVecS.mZ;
tVecD.mX = ((_local4 * mE00) + (_local3 * mE01)) + (_local2 * mE02);
tVecD.mY = ((_local4 * mE10) + (_local3 * mE11)) + (_local2 * mE12);
tVecD.mZ = ((_local4 * mE20) + (_local3 * mE21)) + (_local2 * mE22);
}
function Inverse() {
var _local2 = new scidd.Math.CMatrix4();
_local2.mE00 = (((-mE12) * mE21) * 1) + ((mE11 * mE22) * 1);
_local2.mE01 = ((mE02 * mE21) * 1) - ((mE01 * mE22) * 1);
_local2.mE02 = (((-mE02) * mE11) * 1) + ((mE01 * mE12) * 1);
_local2.mE03 = 0;
_local2.mE10 = ((mE12 * mE20) * 1) - ((mE10 * mE22) * 1);
_local2.mE11 = (((-mE02) * mE20) * 1) + ((mE00 * mE22) * 1);
_local2.mE12 = ((mE02 * mE10) * 1) - ((mE00 * mE12) * 1);
_local2.mE13 = 0;
_local2.mE20 = (((-mE11) * mE20) * 1) + ((mE10 * mE21) * 1);
_local2.mE21 = ((mE01 * mE20) * 1) - ((mE00 * mE21) * 1);
_local2.mE22 = (((-mE01) * mE10) * 1) + ((mE00 * mE11) * 1);
_local2.mE23 = 0;
_local2.mE30 = 0;
_local2.mE31 = 0;
_local2.mE32 = 0;
_local2.mE33 = 1;
var _local3 = 1 / Determinant();
_local2.mE00 = _local2.mE00 * _local3;
_local2.mE01 = _local2.mE01 * _local3;
_local2.mE02 = _local2.mE02 * _local3;
_local2.mE10 = _local2.mE10 * _local3;
_local2.mE11 = _local2.mE11 * _local3;
_local2.mE12 = _local2.mE12 * _local3;
_local2.mE20 = _local2.mE20 * _local3;
_local2.mE21 = _local2.mE21 * _local3;
_local2.mE22 = _local2.mE22 * _local3;
return(_local2);
}
function Determinant() {
return((((((((-mE02) * mE11) * mE20) + ((mE01 * mE12) * mE20)) + ((mE02 * mE10) * mE21)) - ((mE00 * mE12) * mE21)) - ((mE01 * mE10) * mE22)) + ((mE00 * mE11) * mE22));
}
function Translate(tTrans, tInvert) {
var _local3 = Translate_Matrix(tTrans, tInvert);
var _local2 = Clone();
return(Multiply(_local2, _local3));
}
static function Translate_Matrix(tTrans, tInvert) {
var _local1 = Identity_Matrix();
_local1.mE30 = (tInvert ? (-tTrans.mX) : (tTrans.mX));
_local1.mE31 = (tInvert ? (-tTrans.mY) : (tTrans.mY));
_local1.mE32 = (tInvert ? (-tTrans.mZ) : (tTrans.mZ));
return(_local1);
}
function Scale(tScale) {
var _local3 = Scale_Matrix(tScale);
var _local2 = Clone();
return(Multiply(_local2, _local3));
}
static function Scale_Matrix(tScale) {
var _local1 = Identity_Matrix();
_local1.mE00 = tScale.mX;
_local1.mE11 = tScale.mY;
_local1.mE22 = tScale.mZ;
return(_local1);
}
function RotateX(tRadians, tInvert) {
var _local3 = RotateX_Matrix(tRadians, tInvert);
var _local2 = Clone();
return(Multiply(_local2, _local3));
}
function RotateY(tRadians, tInvert) {
var _local3 = RotateY_Matrix(tRadians, tInvert);
var _local2 = Clone();
return(Multiply(_local2, _local3));
}
function RotateZ(tRadians, tInvert) {
var _local3 = RotateZ_Matrix(tRadians, tInvert);
var _local2 = Clone();
return(Multiply(_local2, _local3));
}
static function RotateX_Matrix(tRadians, tInvert) {
var _local1 = Identity_Matrix();
_local1.mE11 = Math.cos(tRadians);
_local1.mE12 = ((tInvert && (tInvert != undefined)) ? (Math.sin(tRadians)) : (-Math.sin(tRadians)));
_local1.mE21 = ((tInvert && (tInvert != undefined)) ? (-Math.sin(tRadians)) : (Math.sin(tRadians)));
_local1.mE22 = Math.cos(tRadians);
return(_local1);
}
static function RotateY_Matrix(tRadians, tInvert) {
var _local1 = Identity_Matrix();
_local1.mE00 = Math.cos(tRadians);
_local1.mE02 = ((tInvert && (tInvert != undefined)) ? (Math.sin(tRadians)) : (-Math.sin(tRadians)));
_local1.mE20 = ((tInvert && (tInvert != undefined)) ? (-Math.sin(tRadians)) : (Math.sin(tRadians)));
_local1.mE22 = Math.cos(tRadians);
return(_local1);
}
static function RotateZ_Matrix(tRadians, tInvert) {
var _local1 = Identity_Matrix();
_local1.mE00 = Math.cos(tRadians);
_local1.mE01 = ((tInvert && (tInvert != undefined)) ? (Math.sin(tRadians)) : (-Math.sin(tRadians)));
_local1.mE10 = ((tInvert && (tInvert != undefined)) ? (-Math.sin(tRadians)) : (Math.sin(tRadians)));
_local1.mE11 = Math.cos(tRadians);
return(_local1);
}
static function RotateXYZ_Matrix(tAxisS) {
var _local1 = Identity_Matrix();
var _local8 = tAxisS.Clone();
var _local7 = _local8._Length();
if (_local7 > 0.0001) {
var _local5 = _local8.mX / _local7;
var _local4 = _local8.mY / _local7;
var _local3 = _local8.mZ / _local7;
var _local10 = _local7 / 500;
var _local9 = Math.cos(_local10);
var _local6 = Math.sin(_local10);
var _local2 = 1 - _local9;
_local1.mE00 = ((_local2 * _local5) * _local5) + _local9;
_local1.mE01 = ((_local2 * _local5) * _local4) - (_local6 * _local3);
_local1.mE02 = ((_local2 * _local5) * _local3) + (_local6 * _local4);
_local1.mE10 = ((_local2 * _local5) * _local4) + (_local6 * _local3);
_local1.mE11 = ((_local2 * _local4) * _local4) + _local9;
_local1.mE12 = ((_local2 * _local4) * _local3) - (_local6 * _local5);
_local1.mE20 = ((_local2 * _local5) * _local3) - (_local6 * _local4);
_local1.mE21 = ((_local2 * _local4) * _local3) + (_local6 * _local5);
_local1.mE22 = ((_local2 * _local3) * _local3) + _local9;
}
return(_local1);
}
var _CLASSID_ = "scidd.Math.CMatrix4";
}
Symbol 476 MovieClip [__Packages.scidd.Draw.F3D.CMaterial] Frame 0
class scidd.Draw.F3D.CMaterial
{
var mName, mColor, mSmooth, mType, mMatrix, mSkewMatrix, mUVMatrix, mBrightnessOffset, mSourceBitmapData, mUVMatrixDefault, mLinkageID, mThickness;
function CMaterial (tName) {
mName = tName;
mColor = new scidd.Draw.CColor(255, 255, 0);
mSmooth = false;
mType = mType_None;
mMatrix = new flash.geom.Matrix();
mSkewMatrix = new flash.geom.Matrix();
mUVMatrix = new Array();
mBrightnessOffset = 0;
}
function Clone() {
var _local2 = new scidd.Draw.F3D.CMaterial(mName);
_local2.mColor = mColor.Clone();
_local2.mSourceBitmapData = mSourceBitmapData.clone();
_local2.mSmooth = mSmooth;
_local2.mUVMatrixDefault = mUVMatrixDefault.clone();
_local2.mType = mType;
_local2.mLinkageID = mLinkageID;
return(_local2);
}
function get mNeedsTriangluation() {
return(mType == mType_Texture);
}
static function newSolidColor(tName, tColor) {
var _local1 = new scidd.Draw.F3D.CMaterial(tName);
_local1.mColor = tColor;
_local1.mType = mType_Solid;
return(_local1);
}
static function newLineColor(tName, tColor, tThickness) {
var _local1 = new scidd.Draw.F3D.CMaterial(tName);
_local1.mColor = tColor;
_local1.mType = mType_Line;
_local1.mThickness = ((tThickness == undefined) ? 0 : (tThickness));
return(_local1);
}
static function newBitmapData(tName, tBitmapData) {
var _local1 = new scidd.Draw.F3D.CMaterial(tName);
if (tBitmapData != undefined) {
_local1.mSourceBitmapData = tBitmapData;
_local1.mColor = scidd.Draw.CColor.FromRGB(_local1.mSourceBitmapData.getPixel(0, 0));
_local1.mType = mType_Texture;
} else {
_local1.mType = mType_Solid;
}
return(_local1);
}
static function newMaterial(tLinkageID, tColor) {
var _local1;
_local1 = newBitmapData(tLinkageID, flash.display.BitmapData.loadBitmap(tLinkageID));
return(_local1);
}
static function newMovieClip(tName, tLinkageID) {
var _local1 = new scidd.Draw.F3D.CMaterial(tName);
_local1.mType = mType_MovieClip;
_local1.mLinkageID = tLinkageID;
return(_local1);
}
function Render(tDraw_MC, tFace, tBrightness) {
var _local17 = tFace.mID;
var _local2 = tFace.mPosition_List_Projected;
switch (mType) {
case mType_Texture :
var _local5 = _local2[0];
var _local8 = _local2[1];
var _local7 = _local2[2];
var _local12 = new flash.geom.Matrix();
var _local14 = _local8.mX - _local5.mX;
var _local15 = _local7.mY - _local5.mY;
_local12.b = (_local8.mY - _local5.mY) / _local14;
_local12.c = (_local7.mX - _local5.mX) / _local15;
var _local9 = new flash.geom.Matrix();
_local9.scale(_local14 / mSourceBitmapData.width, _local15 / mSourceBitmapData.height);
_local9.concat(_local12);
_local9.translate(_local5.mX, _local5.mY);
var _local19 = tFace.mUVMatrix.clone();
_local19.concat(_local9);
tDraw_MC.lineStyle();
tDraw_MC.beginBitmapFill(mSourceBitmapData, _local19, false, false);
if (_local2.length == 3) {
tDraw_MC.moveTo(_local5.mX, _local5.mY);
tDraw_MC.lineTo(_local8.mX, _local8.mY);
tDraw_MC.lineTo(_local7.mX, _local7.mY);
tDraw_MC.lineTo(_local5.mX, _local5.mY);
} else {
tDraw_MC.moveTo(_local5.mX, _local5.mY);
var _local4 = 1;
while (_local4 < _local2.length) {
tDraw_MC.lineTo(_local2[_local4].mX, _local2[_local4].mY);
_local4++;
}
tDraw_MC.lineTo(_local5.mX, _local5.mY);
}
tDraw_MC.endFill();
var _local16 = scidd.Math.CMath.Range(tBrightness, -1, 1);
var _local21 = ((_local16 < 0) ? 0 : 16777215);
var _local20 = Math.abs(_local16) * 100;
tDraw_MC.beginFill(_local21, _local20);
if (_local2.length == 3) {
tDraw_MC.moveTo(_local5.mX, _local5.mY);
tDraw_MC.lineTo(_local8.mX, _local8.mY);
tDraw_MC.lineTo(_local7.mX, _local7.mY);
tDraw_MC.lineTo(_local5.mX, _local5.mY);
} else {
tDraw_MC.moveTo(_local5.mX, _local5.mY);
var _local4 = 1;
while (_local4 < _local2.length) {
tDraw_MC.lineTo(_local2[_local4].mX, _local2[_local4].mY);
_local4++;
}
tDraw_MC.lineTo(_local5.mX, _local5.mY);
}
tDraw_MC.endFill();
break;
case mType_Solid :
case mType_None :
mColor.mBrightness = scidd.Math.CMath.Range(tBrightness + mBrightnessOffset, -1, 1);
tDraw_MC.beginFill(mColor.getRGB(), mColor.__get__mAlpha100());
tDraw_MC.moveTo(_local2[0].mX, _local2[0].mY);
var _local4 = 1;
while (_local4 < _local2.length) {
tDraw_MC.lineTo(_local2[_local4].mX, _local2[_local4].mY);
_local4++;
}
tDraw_MC.lineTo(_local2[0].mX, _local2[0].mY);
tDraw_MC.endFill();
break;
case mType_Line :
tDraw_MC.lineStyle(mThickness, mColor.getRGB(), mColor.__get__mAlpha100());
tDraw_MC.moveTo(_local2[0].mX, _local2[0].mY);
_local4 = 1;
while (_local4 < _local2.length) {
tDraw_MC.lineTo(_local2[_local4].mX, _local2[_local4].mY);
_local4++;
}
tDraw_MC.lineTo(_local2[0].mX, _local2[0].mY);
break;
case mType_MovieClip :
if (_local2.length != 4) {
} else {
_local5 = _local2[0];
_local8 = _local2[1];
_local7 = _local2[2];
var _local6 = _local2[3];
var _local11 = GetMovieClip("A", tDraw_MC, (mLinkageID + _local17) + "A", tBrightness);
_local11._visible = true;
var _local10 = _local11.mSize;
mSkewMatrix.b = N0(_local8.mY - _local5.mY) / N0(_local8.mX - _local5.mX);
mSkewMatrix.c = N0(_local7.mX - _local8.mX) / N0(_local7.mY - _local8.mY);
mMatrix.identity();
mMatrix.scale(N0(_local8.mX - _local5.mX) / _local10.x, N0(_local7.mY - _local8.mY) / _local10.y);
mMatrix.concat(mSkewMatrix);
mMatrix.translate(_local5.mX, _local5.mY);
_local11.transform.matrix = mMatrix;
if (tDraw_MC.mPerpendicular != false) {
break;
}
var _local13 = GetMovieClip("B", tDraw_MC, (mLinkageID + _local17) + "B", tBrightness);
_local13._visible = true;
mSkewMatrix.b = N0(_local7.mY - _local6.mY) / N0(_local7.mX - _local6.mX);
mSkewMatrix.c = N0(_local5.mX - _local6.mX) / N0(_local5.mY - _local6.mY);
mMatrix.identity();
mMatrix.scale(N0(_local7.mX - _local6.mX) / _local10.x, N0(_local6.mY - _local5.mY) / _local10.y);
mMatrix.concat(mSkewMatrix);
mMatrix.translate(_local5.mX, _local5.mY);
_local13.transform.matrix = mMatrix;
}
}
}
function ClearMC(tDraw_MC, tFaceID) {
var tMC_A = eval (((tDraw_MC + ".") + (mLinkageID + tFaceID)) + "A");
var tMC_B = eval (((tDraw_MC + ".") + (mLinkageID + tFaceID)) + "B");
tMC_A._visible = false;
tMC_B._visible = false;
}
function GetMovieClip(tSide, tDraw_MC, tLinkageID, tBrightness) {
var tMC = eval ((tDraw_MC + ".") + tLinkageID);
if (tMC == undefined) {
tMC = tDraw_MC.attachMovie(mLinkageID, tLinkageID, tDraw_MC.getNextHighestDepth());
tMC.mLinkageID = tLinkageID;
tMC.mSize = new flash.geom.Point(tMC._width, tMC._height);
var tval = scidd.Math.CMath.Range(128, -128, 128);
tMC.mColorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, tval, tval, tval, 0);
tMC.mTransform = new flash.geom.Transform(tMC);
if (tDraw_MC.mPerpendicular == false) {
tMC.mMaskMC = tMC.createEmptyMovieClip("_mask", tMC.getNextHighestDepth());
tMC.mMaskMC.beginFill(0, 100);
tMC.mMaskMC.moveTo(0, 0);
if (tSide == "A") {
tMC.mMaskMC.lineTo(tMC.mSize.x, 0);
} else {
tMC.mMaskMC.lineTo(0, tMC.mSize.y);
}
tMC.mMaskMC.lineTo(tMC.mSize.x, tMC.mSize.y);
tMC.mMaskMC.lineTo(0, 0);
tMC.mMaskMC.endFill();
tMC.setMask(tMC.mMaskMC);
}
}
tMC.mColorTransform.blueOffset = (tMC.mColorTransform.greenOffset = (tMC.mColorTransform.redOffset = scidd.Math.CMath.Range(tBrightness * 128, -128, 128)));
tMC.mTransform.colorTransform = tMC.mColorTransform;
return(tMC);
}
function N0(tNumber) {
return(((tNumber == 0) ? 1E-6 : (tNumber)));
}
var _CLASSID_ = "scidd.Draw.F3D.CMaterial";
static var mType_None = 0;
static var mType_Texture = 1;
static var mType_MovieClip = 2;
static var mType_Solid = 3;
static var mType_Line = 4;
}
Symbol 477 MovieClip [__Packages.scidd.Draw.CColor] Frame 0
class scidd.Draw.CColor
{
var mRed, mGreen, mBlue, mAlpha, mBrightness;
function CColor (tRed, tGreen, tBlue, tAlpha, tBrightness) {
mRed = scidd.Math.CMath.Define(tRed, 255);
mGreen = scidd.Math.CMath.Define(tGreen, 255);
mBlue = scidd.Math.CMath.Define(tBlue, 255);
mAlpha = scidd.Math.CMath.Define(tAlpha, 255);
mBrightness = scidd.Math.CMath.Define(tBrightness, 0);
}
function toString() {
return(((((((("{R:" + mRed) + ", G:") + mGreen) + ", B:") + mBlue) + ", A:") + mAlpha) + "}");
}
function Clone() {
return(new scidd.Draw.CColor(mRed, mGreen, mBlue, mAlpha, mBrightness));
}
static function Red(tAmount) {
tAmount = scidd.Math.CMath.Define(tAmount, 255);
return(new scidd.Draw.CColor(tAmount, 0, 0));
}
static function Green(tAmount) {
tAmount = scidd.Math.CMath.Define(tAmount, 255);
return(new scidd.Draw.CColor(0, tAmount, 0));
}
static function Blue(tAmount) {
tAmount = scidd.Math.CMath.Define(tAmount, 255);
return(new scidd.Draw.CColor(0, 0, tAmount));
}
static function White(tAmount) {
tAmount = scidd.Math.CMath.Define(tAmount, 255);
return(new scidd.Draw.CColor(tAmount, tAmount, tAmount));
}
static function Grey(tAmount) {
tAmount = scidd.Math.CMath.Define(tAmount, 128);
return(new scidd.Draw.CColor(tAmount, tAmount, tAmount));
}
static function Clear() {
return(new scidd.Draw.CColor(0, 0, 0, 0));
}
static function Black() {
return(new scidd.Draw.CColor(0, 0, 0));
}
static function Blank() {
return(new scidd.Draw.CColor(0, 0, 0, 0));
}
static function Random() {
return(new scidd.Draw.CColor(random(256), random(256), random(256)));
}
static function FromRGB(tRGB) {
var _local3 = (tRGB >> 16) & 255;
var _local1 = (tRGB >> 8) & 255;
var _local4 = (tRGB >> 0) & 255;
return(new scidd.Draw.CColor(_local3, _local1, _local4, 255));
}
static function FromRGB32(tARGB) {
var _local4 = (tARGB >> 16) & 255;
var _local2 = (tARGB >> 8) & 255;
var _local5 = (tARGB >> 0) & 255;
var _local3 = (tARGB >> 24) & 255;
return(new scidd.Draw.CColor(_local4, _local2, _local5, _local3));
}
function Combine(combineColor) {
var _local2 = new scidd.Draw.CColor(0, 0, 0, 0);
_local2.mRed = (mRed + combineColor.mRed) / 2;
_local2.mGreen = (mGreen + combineColor.mGreen) / 2;
_local2.mBlue = (mBlue + combineColor.mBlue) / 2;
_local2.mAlpha = (mAlpha + combineColor.mAlpha) / 2;
_local2.mBrightness = (mBrightness + combineColor.mBrightness) / 2;
return(_local2);
}
function GetBaseColor() {
var _local2 = Clone();
return(_local2);
}
function getRGB() {
if (mBrightness < 0) {
var _local3 = scidd.Math.CMath.Range(mRed + (mRed * mBrightness), 0, 255) << 16;
var _local2 = scidd.Math.CMath.Range(mGreen + (mGreen * mBrightness), 0, 255) << 8;
var _local4 = scidd.Math.CMath.Range(mBlue + (mBlue * mBrightness), 0, 255) << 0;
return((_local3 | _local2) | _local4);
}
if (mBrightness > 0) {
var _local3 = scidd.Math.CMath.Range(mRed + ((255 - mRed) * mBrightness), 0, 255) << 16;
var _local2 = scidd.Math.CMath.Range(mGreen + ((255 - mGreen) * mBrightness), 0, 255) << 8;
var _local4 = scidd.Math.CMath.Range(mBlue + ((255 - mBlue) * mBrightness), 0, 255) << 0;
return((_local3 | _local2) | _local4);
}
return(((mRed << 16) + (mGreen << 8)) + mBlue);
}
function getRGB32() {
return(getRGB() + (mAlpha << 24));
}
function get mAlpha100() {
return(Math.round((mAlpha * 100) / 255));
}
static function GetColorMatrixFilter(dMat) {
return(new flash.filters.ColorMatrixFilter(dMat));
}
static function ColorMatrix_Identity() {
return(new Array(1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0));
}
static function _BlendMatrix(mat1, mat2, tAmount) {
var _local3 = ColorMatrix_Identity();
var _local1 = 0;
while (_local1 < mat1.length) {
_local3[_local1] = scidd.Math.CMath.Tween(mat1[_local1], mat2[_local1], tAmount);
_local1++;
}
return(_local3);
}
static function ColorMatrix_Colorize(tColor, tAmount, tLightness) {
tLightness = scidd.Math.CMath.Define(tLightness, 1);
var _local1 = tAmount;
var _local5 = 1 - _local1;
var _local3 = (tColor.mRed / 255) * (tLightness + 1);
var _local6 = (tColor.mGreen / 255) * (tLightness + 1);
var _local2 = (tColor.mBlue / 255) * (tLightness + 1);
var _local7 = new Array(_local5 + ((_local1 * _local3) * _LumR), (_local1 * _local3) * _LumG, (_local1 * _local3) * _LumB, 0, 0, (_local1 * _local6) * _LumR, _local5 + ((_local1 * _local6) * _LumG), (_local1 * _local6) * _LumB, 0, 0, (_local1 * _local2) * _LumR, (_local1 * _local2) * _LumG, _local5 + ((_local1 * _local2) * _LumB), 0, 0, 0, 0, 0, 1, 0);
return(_local7);
}
static function ColorMatrix_Serpia(tAmount) {
tAmount = scidd.Math.CMath.Define(tAmount, 1);
var _local1 = new Array(0.393, 0.769, 0.189, 0, 0, 0.349, 0.686, 0.168, 0, 0, 0.272, 0.534, 0.131, 0, 0, 0, 0, 0, 1, 0);
return(_BlendMatrix(ColorMatrix_Identity(), _local1, tAmount));
}
static function ColorMatrix_GreyScale(tAmount) {
tAmount = scidd.Math.CMath.Define(tAmount, 1);
var _local1 = new Array(_LumR, _LumG, _LumB, 0, 0, _LumR, _LumG, _LumB, 0, 0, _LumR, _LumG, _LumB, 0, 0, 0, 0, 0, 1, 0);
return(_BlendMatrix(ColorMatrix_Identity(), _local1, tAmount));
}
static function ColorMatrix_HUE(tHue) {
if (tHue != 0) {
var _local1 = Math.cos(tHue);
var _local2 = Math.sin(tHue);
var _local5 = 0.213;
var _local4 = 0.715;
var _local3 = 0.072;
var _local6 = new Array((_local5 + (_local1 * (1 - _local5))) + (_local2 * (-_local5)), (_local4 + (_local1 * (-_local4))) + (_local2 * (-_local4)), (_local3 + (_local1 * (-_local3))) + (_local2 * (1 - _local3)), 0, 0, (_local5 + (_local1 * (-_local5))) + (_local2 * 0.143), (_local4 + (_local1 * (1 - _local4))) + (_local2 * 0.14), (_local3 + (_local1 * (-_local3))) + (_local2 * -0.283), 0, 0, (_local5 + (_local1 * (-_local5))) + (_local2 * (-(1 - _local5))), (_local4 + (_local1 * (-_local4))) + (_local2 * _local4), (_local3 + (_local1 * (1 - _local3))) + (_local2 * _local3), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1);
return(_local6);
}
return(ColorMatrix_Identity());
}
static function ColorMatrix_Saturation(tSaturation) {
if (tSaturation != 0) {
if (tSaturation > 0) {
tSaturation = (tSaturation * 5) + 1;
} else if (tSaturation < 0) {
tSaturation = tSaturation + 1;
}
var _local2 = (1 - tSaturation) * _LumR;
var _local3 = (1 - tSaturation) * _LumG;
var _local4 = (1 - tSaturation) * _LumB;
var _local5 = new Array(_local2 + tSaturation, _local3, _local4, 0, 0, _local2, _local3 + tSaturation, _local4, 0, 0, _local2, _local3, _local4 + tSaturation, 0, 0, 0, 0, 0, 1, 0);
return(_local5);
}
return(ColorMatrix_Identity());
}
static function ColorMatrix_Alpha(tAlpha) {
if (tAlpha != 1) {
var _local1 = new Array(1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, tAlpha, 0);
return(_local1);
}
return(ColorMatrix_Identity());
}
static function ColorMatrix_Contrast(tContrast) {
if (tContrast != 0) {
if (tContrast > 0) {
tContrast = tContrast * 5;
}
tContrast = tContrast + 1;
var _local2 = new Array(tContrast, 0, 0, 0, 128 * (1 - tContrast), 0, tContrast, 0, 0, 128 * (1 - tContrast), 0, 0, tContrast, 0, 128 * (1 - tContrast), 0, 0, 0, 1, 0);
return(_local2);
}
return(ColorMatrix_Identity());
}
static function ColorMatrix_Brightness(tBrightness) {
if (tBrightness != 0) {
tBrightness = tBrightness * 255;
var _local2 = new Array(1, 0, 0, 0, tBrightness, 0, 1, 0, 0, tBrightness, 0, 0, 1, 0, tBrightness, 0, 0, 0, 1, 0);
return(_local2);
}
return(ColorMatrix_Identity());
}
static function MatrixMulti(sMat, dMat) {
var _local6 = new Array();
var _local5 = 0;
var _local2 = 0;
while (_local5 < 4) {
var _local1 = 0;
while (_local1 < 5) {
_local6[_local2 + _local1] = ((((sMat[_local2] * dMat[_local1]) + (sMat[_local2 + 1] * dMat[_local1 + 5])) + (sMat[_local2 + 2] * dMat[_local1 + 10])) + (sMat[_local2 + 3] * dMat[_local1 + 15])) + ((_local1 == 4) ? (sMat[_local2 + 4]) : 0);
_local1++;
}
_local5++;
_local2 = _local2 + 5;
}
return(_local6);
}
var _CLASSID_ = "scidd.Draw.CColor";
static var _LumR = 0.3086;
static var _LumG = 0.6094;
static var _LumB = 0.082;
}
Symbol 478 MovieClip [__Packages.scidd.Math.CMath] Frame 0
class scidd.Math.CMath
{
function CMath () {
}
static function DotProduct(p1, p2) {
return((p1.x * p2.x) + (p1.y * p2.y));
}
static function CrossProduct(p1, p2) {
return(new flash.geom.Point((p1.y * p2.x) - (p1.x * p2.y), (p1.x * p2.y) - (p1.y * p2.x)));
}
static function CrossProduct_Origin(o, p1, p2) {
return(CrossProduct(p1.subtract(o), p2.subtract(o)));
}
static function Range(tNumber, tMin, tMax) {
return(((tNumber > tMax) ? (tMax) : (((tNumber < tMin) ? (tMin) : (tNumber)))));
}
static function Never0(tNumber) {
return(((tNumber == 0) ? 1E-6 : (tNumber)));
}
static function Sign(tNumber) {
return(((tNumber < 0) ? -1 : (((tNumber > 0) ? 1 : 0))));
}
static function Tween(tMin, tMax, tFactor, tEaseIn, pow) {
tEaseIn = ((tEaseIn == undefined) ? 0 : (tEaseIn));
if (tEaseIn != 0) {
pow = ((pow == undefined) ? 15 : (pow));
tFactor = ((tEaseIn > 0) ? (1 - Math.pow(1 - tFactor, (pow * tEaseIn) + 1)) : (Math.pow(tFactor, (pow * (-tEaseIn)) + 1)));
}
return(((tMax - tMin) * tFactor) + tMin);
}
static function Define(tObject, tDefault) {
return(((tObject == undefined) ? (tDefault) : (tObject)));
}
static function Round(tNumber, tAmount) {
return(Math.round(tNumber / tAmount) * tAmount);
}
static function DecimalPlaces(tNumber) {
var _local2 = 0;
while ((tNumber % 1) != 0) {
tNumber = tNumber * 10;
_local2++;
}
return(_local2);
}
static function GetLineNormal(p1, p2) {
var _local1 = new flash.geom.Matrix();
_local1.rotate(-1.5707963267949);
var _local2 = _local1.transformPoint(new flash.geom.Point(p2.x - p1.x, p2.y - p1.y));
_local2.normalize(1);
return(_local2);
}
static function GetAngle(p1, p2) {
return(Math.atan2(p2.y - p1.y, p2.x - p1.x));
}
static function SideOfLine(p, p1, p2) {
return(((p1.x - p.x) * (p2.y - p.y)) - ((p2.x - p.x) * (p1.y - p.y)));
}
static function SideOfLine_SIGN(p, p1, p2) {
return(Sign(SideOfLine(p, p1, p2)));
}
static function PointInTriangle(p, pList) {
var _local4 = SideOfLine_SIGN(p, pList[0], pList[1]);
var _local3 = SideOfLine_SIGN(p, pList[1], pList[2]);
var _local2 = SideOfLine_SIGN(p, pList[2], pList[0]);
return((((_local4 == _local3) || (_local4 == 0)) && ((_local3 == _local2) || (_local3 == 0))) && ((_local2 == _local4) || (_local2 == 0)));
}
static function PointInShape(p, pShape) {
var _local1 = 0;
while (_local1 < (pShape.length - 1)) {
if (SideOfLine(p, pShape[_local1], pShape[_local1 + 1]) < 0) {
return(false);
}
_local1++;
}
if (SideOfLine(p, pShape[pShape.length - 1], pShape[0]) < 0) {
return(false);
}
return(true);
}
static function PointInShape_Closed(p, pShape) {
var _local1 = 0;
while (_local1 < (pShape.length - 1)) {
if (SideOfLine(p, pShape[_local1], pShape[_local1 + 1]) < 0) {
return(false);
}
_local1++;
}
return(true);
}
static function LineIntersection(l1p1, l1p2, l2p1, l2p2) {
var _local5 = l2p2.x - l2p1.x;
var _local4 = l2p2.y - l2p1.y;
var _local8 = l1p2.x - l1p1.x;
var _local7 = l1p2.y - l1p1.y;
var _local3 = (((l2p1.y - l1p1.y) * _local8) - ((l2p1.x - l1p1.x) * _local7)) / ((_local5 * _local7) - (_local4 * _local8));
var _local6 = new flash.geom.Point(l2p1.x + (_local3 * _local5), l2p1.y + (_local3 * _local4));
if (isNaN(_local6.x)) {
_local6 = (l2p1.equals(l2p2) ? (l2p2.clone()) : ((l1p1.equals(l1p2) ? (l1p1.clone()) : undefined)));
}
var _local10 = (((l1p1.y - l2p1.y) * _local5) - ((l1p1.x - l2p1.x) * _local4)) / ((_local8 * _local4) - (_local7 * _local5));
return((((((_local3 >= 0) && (_local3 <= 1)) && (_local10 >= 0)) && (_local10 <= 1)) ? (_local6) : undefined));
}
static function LineIntersection2(l1p1, l1p2, l2p1, l2p2) {
var _local11 = l1p2.y - l1p1.y;
var _local9 = l1p1.x - l1p2.x;
var _local10 = l2p2.y - l2p1.y;
var _local7 = l2p1.x - l2p2.x;
var _local1 = (_local11 * _local7) - (_local10 * _local9);
if (Math.abs(_local1) < 1E-5) {
return(undefined);
}
var _local8 = (l1p2.x * l1p1.y) - (l1p1.x * l1p2.y);
var _local6 = (l2p2.x * l2p1.y) - (l2p1.x * l2p2.y);
return(new flash.geom.Point(((_local9 * _local6) - (_local7 * _local8)) / _local1, ((_local10 * _local8) - (_local11 * _local6)) / _local1));
}
static function LineIntersection3(l1p1, l1p2, l2p1, l2p2, rp) {
if ((l1p2.x == l1p1.x) || (l2p2.x == l2p1.x)) {
return(false);
}
var _local4 = (l1p2.y - l1p1.y) / (l1p2.x - l1p1.x);
var _local7 = (l2p2.y - l2p1.y) / (l2p2.x - l2p1.x);
if (_local4 == _local7) {
return(false);
}
var _local8 = l1p1.y - (_local4 * l1p1.x);
var _local9 = l2p1.y - (_local7 * l2p1.x);
rp.x = (_local9 - _local8) / (_local4 - _local7);
if ((rp.x < Math.min(l1p1.x, l1p2.x)) || (rp.x > Math.max(l1p1.x, l1p2.x))) {
return(false);
}
if ((rp.x < Math.min(l2p1.x, l2p2.x)) || (rp.x > Math.max(l2p1.x, l2p2.x))) {
return(false);
}
rp.y = (_local4 * rp.x) + _local8;
return(true);
}
static function LineIntersection4(l1p1, l1p2, l2p1, l2p2, rp) {
if (SideOfLine(l1p1, l2p1, l2p2) > 0) {
return(false);
}
var _local1 = LineIntersection(l1p1, l1p2, l2p1, l2p2);
if (_local1 == undefined) {
return(false);
}
rp.x = _local1.x;
rp.y = _local1.y;
return(true);
}
static function GetIntersectionPoint2(l1p1, l1p2, l2p1, l2p2, tOut) {
var _local1 = (l2p1.y * l2p2.x) - (l2p1.x * l2p2.y);
if (Math.abs(_local1) < 1E-5) {
return(false);
}
var _local2 = l1p2.subtract(l1p1);
var _local5 = ((l2p2.y * _local2.x) - (l2p2.x * _local2.y)) / _local1;
tOut.x = l1p1.x - (l2p1.x * _local5);
tOut.y = l1p1.y - (l2p1.y * _local5);
return(true);
}
static function LineToLine_Parallel(l1p1, l1p2, l2p1, l2p2) {
var _local1 = (l2p1.y * l2p2.x) - (l2p1.x * l2p2.y);
return(Math.abs(_local1) >= 1E-5);
}
static function Distance_PointToLine(p, lp1, lp2) {
return(Math.sqrt(Distance_PointToLine_Sqr(p, lp1, lp2)));
}
static function Distance_PointToLine_Sqr(p, lp1, lp2) {
var _local1 = lp2.subtract(lp1);
var _local8 = p.subtract(lp1);
var _local5 = DotProduct(_local8, _local1);
var _local4 = DotProduct(_local1, _local1);
var _local3 = _local5 / _local4;
var _local7 = lp1.add(new flash.geom.Point(_local1.x * _local3, _local1.y * _local3));
var _local2 = p.subtract(_local7);
return((_local2.x * _local2.x) + (_local2.y * _local2.y));
}
static function Distance_PointToLine2(p, lp1, lp2) {
return(Math.abs(CrossProduct_Origin(lp1, lp2, p) / flash.geom.Point.distance(lp1, lp2)));
}
static function Distance_Sqr(p1, p2) {
var _local1 = p2.subtract(p1);
return((_local1.x * _local1.x) + (_local1.y * _local1.y));
}
var _CLASSID_ = "scidd.Math.CMath";
}
Symbol 479 MovieClip [__Packages.scidd.Draw.F3D.CMesh3DFace] Frame 0
class scidd.Draw.F3D.CMesh3DFace
{
var mV_List, mN_List, mUV_List, mMaterial, mHighlight, mID, mE_List, mPosition_List_Projected, mUVMatrix;
function CMesh3DFace (tV_List, tN_List, tUV_List, tMaterial) {
mV_List = tV_List;
mN_List = tN_List;
mUV_List = tUV_List;
mMaterial = tMaterial;
mHighlight = false;
mID = 0;
}
function AssignEdges(tEdge_List, tVectorList) {
mE_List = new Array(mV_List.length);
var _local2 = tEdge_List.length - 1;
while (_local2 >= 0) {
_CheckForEdge(tEdge_List[_local2].v1, tEdge_List[_local2].v2, tVectorList);
_CheckForEdge(tEdge_List[_local2].v2, tEdge_List[_local2].v1, tVectorList);
_local2--;
}
var _local5 = 0;
_local2 = 0;
while (_local2 < mE_List.length) {
_local5 = _local5 + ((mE_List[_local2] == true) ? 1 : 0);
_local2++;
}
if (_local5 == 0) {
delete mE_List;
}
}
function _CheckForEdge(tv1, tv2, tVectorList) {
var _local2 = 0;
var _local3 = 1;
while (_local2 < mV_List.length) {
if (tv1.Equals(tVectorList[mV_List[_local2]]) && (tv2.Equals(tVectorList[mV_List[_local3]]))) {
mE_List[_local2] = true;
}
_local2++;
_local3 = (_local3 + 1) % mV_List.length;
}
}
function MouseOver(txmouse, tymouse, tVectorList) {
var _local3 = 0;
while (_local3 < mV_List.length) {
var _local2 = tVectorList[mV_List[_local3]];
var _local4 = tVectorList[mV_List[(_local3 + 1) % mV_List.length]];
if (((_local4.mX - _local2.mX) * (tymouse - _local2.mY)) < ((txmouse - _local2.mX) * (_local4.mY - _local2.mY))) {
return(false);
}
_local3++;
}
return(true);
}
function Highlight() {
mHighlight = true;
}
function Cache(tPosition_List_Projected, tNormal_List_Projected, tUV_List) {
if (mPosition_List_Projected == undefined) {
mPosition_List_Projected = new Array();
for (var _local3 in mV_List) {
mPosition_List_Projected[_local3] = tPosition_List_Projected[mV_List[_local3]];
}
}
SetUVMatrix(tUV_List);
}
function Backface() {
var _local2 = mPosition_List_Projected[0];
var _local4 = mPosition_List_Projected[1];
var _local3 = mPosition_List_Projected[2];
return(((_local4.mX - _local2.mX) * (_local3.mY - _local2.mY)) >= ((_local3.mX - _local2.mX) * (_local4.mY - _local2.mY)));
}
function Backface2(tNormalList) {
return(tNormalList[mN_List[0]].mZ < 0);
}
static function NormalToLight(tLightSource, tNormal) {
return((tNormal.DotProduct(tLightSource) * 0.6) - 0.5);
}
function RemapV(tRemapTable) {
var _local2 = 0;
while (_local2 < mV_List.length) {
mV_List[_local2] = tRemapTable[mV_List[_local2]];
_local2++;
}
}
function RemapN(tRemapTable) {
var _local2 = 0;
while (_local2 < mN_List.length) {
mN_List[_local2] = tRemapTable[mN_List[_local2]];
_local2++;
}
}
function SetUVMatrix(tUV_List) {
var _local2 = tUV_List[mUV_List[0]];
var _local4 = tUV_List[mUV_List[1]];
var _local3 = tUV_List[mUV_List[2]];
var _local6 = mMaterial.mSourceBitmapData.width / mMaterial.mSourceBitmapData.height;
mUVMatrix = new flash.geom.Matrix();
var _local5 = new flash.geom.Matrix();
_local5.b = N0(_local4.y - _local2.y) / (N0(_local4.x - _local2.x) * _local6);
_local5.c = (N0(_local3.x - _local2.x) * _local6) / N0(_local3.y - _local2.y);
mUVMatrix.scale(N0(_local4.x - _local2.x), N0(_local3.y - _local2.y));
mUVMatrix.concat(_local5);
mUVMatrix.translate(_local2.x * mMaterial.mSourceBitmapData.width, _local2.y * mMaterial.mSourceBitmapData.height);
mUVMatrix.invert();
}
function N0(tNumber) {
return(((tNumber == 0) ? 1E-6 : (tNumber)));
}
function SetSort_Min() {
mSort = mPosition_List_Projected[0].mSort;
var _local2 = 1;
while (_local2 < mPosition_List_Projected.length) {
var _local3 = mPosition_List_Projected[_local2].mSort;
if (_local3 < mSort) {
mSort = _local3;
}
_local2++;
}
}
function SetSort_Max() {
mSort = mPosition_List_Projected[0].mSort;
var _local2 = 1;
while (_local2 < mPosition_List_Projected.length) {
var _local3 = mPosition_List_Projected[_local2].mSort;
if (_local3 > mSort) {
mSort = _local3;
}
_local2++;
}
}
function SetSort_Avg() {
mSort = 0;
var _local2 = 0;
while (_local2 < mPosition_List_Projected.length) {
mSort = mSort + mPosition_List_Projected[_local2].mSort;
_local2++;
}
mSort = mSort / mPosition_List_Projected.length;
}
var _CLASSID_ = "scidd.Draw.F3D.CMesh3DFace";
var mZ_Min = 0;
var mZ_Avg = 0;
var mZ_Max = 0;
var mSort = 0;
}
Symbol 480 MovieClip [__Packages.CArena] Frame 0
class CArena extends MovieClip
{
static var mEndStats;
var mThingList, mArena_Data, mMapIndex, mcMaster, createEmptyMovieClip, getNextHighestDepth, mcContainer, mcMapPlane, mcThingPlane, mMap, mMapWho, mStartSortDepth, mCombotList, mState_Play, mTick, _TrackThing, mComplete, mCompleteState, mcTimer, mAreaMask, removeMovieClip, mState_Step, _parent, mTimerStart, mTimeAmount, mSortList, mCompleteTick, mAreaMin, mAreaMax;
function CArena () {
super();
CSpriteISO.mPitch = mProjection.mPitch;
mThingList = new Array();
CThing.mRenderID = 0;
CScoreCard.RemoveAll();
mArena_Data = new CArena_Data(mMapIndex);
mcMaster = createEmptyMovieClip("_ArenaContainer", getNextHighestDepth());
mcContainer = mcMaster.createEmptyMovieClip("_ArenaContainer", mcMaster.getNextHighestDepth());
mcMapPlane = mcContainer.createEmptyMovieClip("_MapPlane", mcContainer.getNextHighestDepth());
mcThingPlane = mcContainer.createEmptyMovieClip("_ThingPlane", mcContainer.getNextHighestDepth());
mMap = new CArena_Map(this, mcMapPlane, mArena_Data, 1000);
mMapWho = new CArena_MapWho(this, mMap.mSize.x, mMap.mSize.y);
mStartSortDepth = mcThingPlane.getNextHighestDepth() + 50000;
mMap.SpawnMap(mCombotList);
mTrackThing = (mMap.mTrackThing);
mState_Play = false;
CSpriteISO.PreRenderAll();
mTick = 0;
SetZoom();
}
function set mTrackThing(a) {
_TrackThing = a;
_TrackThing.mScoreCard.mSelected = true;
CTankCommand.mcProgrammer_Controller.SetBaseThing(_TrackThing);
//return(mTrackThing);
}
function get mTrackThing() {
return(_TrackThing);
}
function SetCompleteState(tState) {
mComplete = true;
mCompleteState = tState;
}
function Dispose() {
if (CSaveData.obj.__get__mDetail()) {
_root._quality = "high";
}
for (var _local3 in mThingList) {
mThingList[_local3].Dispose();
}
delete mThingList;
mcTimer.removeMovieClip();
mcThingPlane.removeMovieClip();
mcContainer.removeMovieClip();
mAreaMask.removeMovieClip();
mcMaster.removeMovieClip();
removeMovieClip();
}
function AddThing(tThing) {
mThingList[mThingList.length] = tThing;
return(tThing);
}
function DeleteThing(tThing) {
for (var _local3 in mThingList) {
if (tThing == mThingList[_local3]) {
mThingList.splice(_local3, 1);
return(undefined);
}
}
}
function Process() {
if (mState_Step || (mState_Play)) {
if (mFirstTime) {
if ((mArena_Data.mObjective == "compete") && (CSaveData.obj.__get__mCompete_OptionTimeLimit() != -1)) {
mcTimer = _parent.attachMovie("Timer", "_Timer", _parent.getNextHighestDepth());
mcTimer._x = CTankCommand.mScreenSize.x;
mTimerStart = getTimer();
mTimeAmount = CSaveData.obj.__get__mCompete_OptionTimeLimit() * 1000;
}
mFirstTime = false;
CSound.mStart_Arena.PlaySound();
CSound.mSong1_Track1.StopSound();
CSound.mSong1_Track2.PlaySound();
mAreaMask = _parent.createEmptyMovieClip("_AreaMask", _parent.getNextHighestDepth());
var _local18 = new flash.geom.Point(-mTrackThing.mWorldPosition.x, -mTrackThing.mWorldPosition.y);
mcContainer._x = mcContainer._x + (_local18.x - mcContainer._x);
mcContainer._y = mcContainer._y + (_local18.y - mcContainer._y);
}
if (mcTimer != undefined) {
mcTimer.SetTime(mTimeAmount - (getTimer() - mTimerStart));
}
var _local21 = function () {
};
if (mState_Step) {
CTankCommand.mcProgrammer_Controller.Control_Pause();
}
var _local6 = 0;
while (_local6 < mThingList.length) {
if (mThingList[_local6].mDelete) {
mThingList[_local6].Dispose();
DeleteThing(mThingList[_local6]);
}
_local6++;
}
mSortList = new Array();
var _local17 = 0;
var _local16 = 0;
var _local3 = new Array();
CProfiler.Timer_Start("Arena.Update");
_local6 = 0;
while (_local6 < mThingList.length) {
var _local4 = mThingList[_local6];
_local4.Process();
_local4.Draw();
_local4.mcSort._visible = _local4.mOnScreen;
if ((_local4.mcSort != undefined) && (_local4.mOnScreen)) {
mSortList[mSortList.length] = _local4.mcSort;
}
if (_local4._CLASSID_ == "CRobot_Chassis1") {
_local17++;
if (_local4.mIsAlive) {
_local16++;
}
_local3[_local3.length] = _local4;
}
_local6++;
}
if (((((mcTimer != undefined) && ((mTimeAmount - (getTimer() - mTimerStart)) < 0)) || ((_local17 > 1) && (_local16 <= 1))) || (Key.isDown(36))) && (mArena_Data.mObjective == "compete")) {
if (mCompleteTick == 0) {
CSound.mEnd_Arena.PlaySound();
}
if ((++mCompleteTick) > 90) {
mEndStats = new Array();
for (_local6 in _local3) {
mEndStats[_local6] = {mHealth:int((_local3[_local6].mLife / _local3[_local6].mMaxLife) * 100), mKills:_local3[_local6].mKills, mRobotName:_local3[_local6].mRobotName, mRobotCode:_local3[_local6].mRobotCode, mScore:_local3[_local6].mScore, mTint:_local3[_local6].mTint, mDamageInflicted:_local3[_local6].mDamageInflicted, mShotsFired:_local3[_local6].mShotsFired};
}
mComplete = true;
mCompleteState = "success";
}
} else {
mCompleteTick = 0;
}
CProfiler.Timer_Stop("Arena.Update");
CProfiler.Timer_Start("SortOrder");
mSortList.sort(_SortOrder);
_local6 = 0;
var _local5 = mStartSortDepth;
while (_local6 < mSortList.length) {
var _local7 = mSortList[_local6];
if (_local7.getDepth() != _local5) {
_local7.swapDepths(_local5);
}
_local6++;
_local5++;
}
CProfiler.Timer_Stop("SortOrder");
CProfiler.Timer_Start("Prog&ScoreCard");
CScoreCard.UpdateAll();
CTankCommand.mcProgrammer_Controller.Process();
CProfiler.Timer_Stop("Prog&ScoreCard");
var _local19 = new flash.geom.Point(CTankCommand.mcProgrammer_Controller.mPanelWidth, 0);
var _local20 = new flash.geom.Point(CTankCommand.mScreenSize.x, CTankCommand.mScreenSize.y - CScoreCard.PanelHeight());
if (!(_local19.equals(mAreaMin) && (_local20.equals(mAreaMax)))) {
mAreaMin = _local19;
mAreaMax = _local20;
mAreaMask.clear();
mAreaMask.beginFill(16711680, 100);
mAreaMask.moveTo(mAreaMin.x, mAreaMin.y);
mAreaMask.lineTo(mAreaMax.x, mAreaMin.y);
mAreaMask.lineTo(mAreaMax.x, mAreaMax.y);
mAreaMask.lineTo(mAreaMin.x, mAreaMax.y);
mAreaMask.lineTo(mAreaMin.x, mAreaMin.y);
mAreaMask.endFill();
mcMaster._x = (CTankCommand.mScreenSize.x + mAreaMin.x) / 2;
mcMaster._y = (CTankCommand.mScreenSize.y + mAreaMin.y) / 2;
mcMaster.setMask(mAreaMask);
}
_root.mDebug.text = CProfiler.GetString();
mTick++;
}
if (Key.isDown(38)) {
ZoomIn();
}
if (Key.isDown(40)) {
ZoomOut();
}
ScrollTheArena();
}
function ScrollTheArena() {
var _local7 = mTrackThing.mWorldPosition;
var _local6 = new flash.geom.Point(-_local7.x, -_local7.y);
var _local9 = (_local6.x - mcContainer._x) * 0.25;
var _local8 = (_local6.y - mcContainer._y) * 0.25;
var _local3 = mAreaMin.clone();
var _local4 = mAreaMax.clone();
_local3.y = _local3.y + CTankCommand.mcProgrammer_Controller.mPanelHeight;
var _local10 = 25;
var _local2 = new flash.geom.Point((((mcContainer._x + _local9) * mcMaster._xscale) / 100) + mcMaster._x, (((mcContainer._y + _local8) * mcMaster._yscale) / 100) + mcMaster._y);
var _local5 = new flash.geom.Point((mcMapPlane._width * mcMaster._xscale) / 100, (mcMapPlane._height * mcMaster._yscale) / 100);
if (_local5.x < (_local4.x - _local3.x)) {
_local2.x = _local3.x + (((_local4.x - _local3.x) - _local5.x) / 2);
} else if (_local2.x > _local3.x) {
_local2.x = _local3.x;
} else if ((_local2.x + _local5.x) < _local4.x) {
_local2.x = _local4.x - _local5.x;
}
if (_local5.y < (_local4.y - _local3.y)) {
_local2.y = _local3.y + (((_local4.y - _local3.y) - _local5.y) / 2);
} else if (_local2.y > _local3.y) {
_local2.y = _local3.y;
} else if ((_local2.y + _local5.y) < _local4.y) {
_local2.y = _local4.y - _local5.y;
}
mcContainer._x = (_local2.x - mcMaster._x) / (mcMaster._xscale / 100);
mcContainer._y = (_local2.y - mcMaster._y) / (mcMaster._yscale / 100);
}
function ZoomIn() {
if (mcMaster._xscale < 100) {
CSaveData.obj.mArenaScale = CSaveData.obj.mArenaScale + 5;
}
SetZoom();
}
function ZoomOut() {
if (mcMaster._xscale > 50) {
CSaveData.obj.mArenaScale = CSaveData.obj.mArenaScale - 5;
}
SetZoom();
}
function SetZoom() {
mcMaster._xscale = (mcMaster._yscale = CSaveData.obj.mArenaScale);
}
function InDrawArea(mc) {
var _local2 = mc.getBounds(mcMaster._parent);
var _local3 = 0;
var _local4 = (((_local2.xMax >= (mAreaMin.x + _local3)) && (_local2.xMin <= (mAreaMax.x - _local3))) && (_local2.yMax >= (mAreaMin.y + _local3))) && (_local2.yMin <= (mAreaMax.y - _local3));
return(_local4);
}
function _SortOrder(a, b) {
return(a._sortKey - b._sortKey);
}
function Draw() {
}
var _CLASSID_ = "CArena";
var mFirstTime = true;
static var mScale = 0.5;
static var mProjection = new scidd.Draw.F3D.CProjection3D_Pushed((Math.PI/4));
}
Symbol 481 MovieClip [__Packages.CArena_Map] Frame 0
class CArena_Map
{
var mcArena, mArena_Data, mcDraw, mSize, mWorldSize, mWorldSizeCentre, mWorldDiag, mDrawCellSize, mDrawSize, mMap, mSpawnList, mSpawnTick, mTrackThing, mcFloor;
function CArena_Map (tArena, drawPlane, tArena_Data, sDepth) {
mcArena = tArena;
mArena_Data = tArena_Data;
mcDraw = drawPlane;
mSize = new flash.geom.Point(mArena_Data.mSize.x, mArena_Data.mSize.y);
mWorldSize = new flash.geom.Point(mSize.x * mCellSize, mSize.y * mCellSize);
mWorldSizeCentre = new flash.geom.Point((mSize.x * mCellSize) / 2, (mSize.y * mCellSize) / 2);
mWorldDiag = Math.sqrt((mWorldSize.x * mWorldSize.x) + (mWorldSize.y * mWorldSize.y));
mDrawCellSize = new flash.geom.Point(mCellSize, CArena.mProjection.Transform_Z(mCellSize));
mDrawSize = new flash.geom.Point(mDrawCellSize.x * mSize.x, mDrawCellSize.y * mSize.y);
SetupMap();
Render(sDepth);
}
function SetupMap() {
mMap = new Array();
mSpawnList = new Array();
var _local3 = 0;
while (_local3 < (mSize.x * mSize.y)) {
mMap[_local3] = 0;
_local3++;
}
_local3 = 0;
while (_local3 < (mSize.x * mSize.y)) {
var _local2 = new flash.geom.Point(((_local3 % mSize.x) * mCellSize) + (mCellSize / 2), (Math.floor(_local3 / mSize.x) * mCellSize) + (mCellSize / 2));
switch (mArena_Data.mMapData.substring(_local3, _local3 + 1)) {
case "." :
break;
case "0" :
break;
case "C" :
mSpawnList[mSpawnList.length] = {mPosition:_local2, mClassID:"CRobot_Chassis1", mSpawnTime:"startup"};
break;
case "N" :
mSpawnList[mSpawnList.length] = {mPosition:_local2, mClassID:"CRobot_Chassis1", mSpawnTime:"startup", mRotation:0};
break;
case "E" :
mSpawnList[mSpawnList.length] = {mPosition:_local2, mClassID:"CRobot_Chassis1", mSpawnTime:"startup", mRotation:90};
break;
case "W" :
mSpawnList[mSpawnList.length] = {mPosition:_local2, mClassID:"CRobot_Chassis1", mSpawnTime:"startup", mRotation:270};
break;
case "S" :
mSpawnList[mSpawnList.length] = {mPosition:_local2, mClassID:"CRobot_Chassis1", mSpawnTime:"startup", mRotation:180};
break;
case "1" :
mSpawnList[mSpawnList.length] = {mPosition:_local2, mClassID:"CWall", mSpawnType:"startup"};
break;
case "2" :
mSpawnList[mSpawnList.length] = {mPosition:_local2, mClassID:"CDroid_Roamer", mSpawnType:"periodic"};
break;
case "3" :
mSpawnList[mSpawnList.length] = {mPosition:_local2, mClassID:"CDroid_Sitter", mSpawnType:"periodic"};
break;
case "4" :
mSpawnList[mSpawnList.length] = {mPosition:_local2, mClassID:"CDroid_Spike", mSpawnType:"periodic"};
break;
case "P" :
mSpawnList[mSpawnList.length] = {mPosition:_local2, mClassID:"CPickup", mSpawnType:"startup"};
}
_local3++;
}
mSpawnTick = 0;
}
function Randomize(tArray) {
var _local6 = 0;
while (_local6 < 10) {
var _local2 = 0;
while (_local2 < tArray.length) {
var _local3 = random(tArray.length);
var _local5 = tArray[_local2];
var _local4 = tArray[_local3];
tArray[_local2] = _local4;
tArray[_local3] = _local5;
_local2++;
}
_local6++;
}
}
function SpawnMap(tCombotList) {
CThing.mCountColorIndex = 0;
mTrackThing = undefined;
var _local6 = 0;
Randomize(mSpawnList);
var _local5 = 0;
while (_local5 < mSpawnList.length) {
var _local2 = mSpawnList[_local5];
var _local3 = _local2.mPosition;
var _local4 = Math.round((Math.atan2(_local3.y - mWorldSizeCentre.y, _local3.x - mWorldSizeCentre.x) * 180) / Math.PI) + 180;
switch (_local2.mClassID) {
case "CRobot_Chassis1" :
if (_local6 < tCombotList.length) {
_local2.mThing = mcArena.AddThing(new CRobot_Chassis1(mcArena, _local3.clone(), ((_local2.mRotation == undefined) ? (_local4) : (_local2.mRotation - 90))));
mTrackThing = ((mTrackThing == undefined) ? (_local2.mThing) : (mTrackThing));
_local2.mThing.mCodeIndex = tCombotList[_local6];
_local2.mThing.mRobotCode = CSaveData.obj.Combot_IndexToCode(tCombotList[_local6]);
CCommand_Compiler.Decode_Thing(CSaveData.obj.Combot_IndexToCode(tCombotList[_local6]), _local2.mThing);
_local6++;
}
break;
case "CWall" :
if ((mcArena.mArena_Data.mObjective == "compete") && (CSaveData.obj.__get__mCompete_OptionWalls() == false)) {
break;
}
_local2.mThing = mcArena.AddThing(new CWall(mcArena, _local3.clone(), 0));
break;
case "CDroid_Roamer" :
if ((mcArena.mArena_Data.mObjective == "compete") && (CSaveData.obj.__get__mCompete_OptionDroids() == false)) {
} else {
_local2.mThing = mcArena.AddThing(new CDroid_Roamer(mcArena, _local3.clone(), _local4));
break;
if ((mcArena.mArena_Data.mObjective == "compete") && (CSaveData.obj.__get__mCompete_OptionDroids() == false)) {
} else {
_local2.mThing = mcArena.AddThing(new CDroid_Sitter(mcArena, _local3.clone(), _local4));
break;
if ((mcArena.mArena_Data.mObjective == "compete") && (CSaveData.obj.__get__mCompete_OptionDroids() == false)) {
} else {
_local2.mThing = mcArena.AddThing(new CDroid_Spike(mcArena, _local3.clone(), _local4));
break;
if ((mcArena.mArena_Data.mObjective == "compete") && (CSaveData.obj.__get__mCompete_OptionPickups() == false)) {
} else {
_local2.mThing = mcArena.AddThing(new CPickup(mcArena, _local3.clone(), _local4));
}
}
}
}
case "CDroid_Sitter" :
if ((mcArena.mArena_Data.mObjective == "compete") && (CSaveData.obj.__get__mCompete_OptionDroids() == false)) {
} else {
_local2.mThing = mcArena.AddThing(new CDroid_Sitter(mcArena, _local3.clone(), _local4));
break;
if ((mcArena.mArena_Data.mObjective == "compete") && (CSaveData.obj.__get__mCompete_OptionDroids() == false)) {
} else {
_local2.mThing = mcArena.AddThing(new CDroid_Spike(mcArena, _local3.clone(), _local4));
break;
if ((mcArena.mArena_Data.mObjective == "compete") && (CSaveData.obj.__get__mCompete_OptionPickups() == false)) {
} else {
_local2.mThing = mcArena.AddThing(new CPickup(mcArena, _local3.clone(), _local4));
}
}
}
case "CDroid_Spike" :
if ((mcArena.mArena_Data.mObjective == "compete") && (CSaveData.obj.__get__mCompete_OptionDroids() == false)) {
} else {
_local2.mThing = mcArena.AddThing(new CDroid_Spike(mcArena, _local3.clone(), _local4));
break;
if ((mcArena.mArena_Data.mObjective == "compete") && (CSaveData.obj.__get__mCompete_OptionPickups() == false)) {
} else {
_local2.mThing = mcArena.AddThing(new CPickup(mcArena, _local3.clone(), _local4));
}
}
case "CPickup" :
if ((mcArena.mArena_Data.mObjective == "compete") && (CSaveData.obj.__get__mCompete_OptionPickups() == false)) {
} else {
_local2.mThing = mcArena.AddThing(new CPickup(mcArena, _local3.clone(), _local4));
}
}
_local5++;
}
mSpawnTick++;
}
function _MapCell(x, y) {
return((((((x >= mSize.x) || (y >= mSize.y)) || (x < 0)) || (y < 0)) ? 1 : (mMap[x + (y * mSize.x)])));
}
function PointInMap(p) {
return((((((p.x >= mWorldSize.x) || (p.y >= mWorldSize.y)) || (p.x < 0)) || (p.y < 0)) ? false : true));
}
function Dispose() {
}
function Render(sDepth) {
mcFloor = mcDraw.createEmptyMovieClip("_mapFloor", sDepth);
mcFloor.beginFill(16777215, 100);
mcFloor.moveTo(0, 0);
mcFloor.lineTo(mCellSize * mSize.x, 0);
mcFloor.lineTo(mCellSize * mSize.x, mCellSize * mSize.y);
mcFloor.lineTo(0, mCellSize * mSize.y);
mcFloor.lineTo(0, 0);
mcFloor.endFill();
mcFloor.lineStyle(0, 0, 10);
var _local2 = 0;
while (_local2 <= mSize.y) {
var _local4 = mCellSize * _local2;
mcFloor.moveTo(0, _local4);
mcFloor.lineTo(mCellSize * mSize.x, _local4);
_local2++;
}
var _local3 = 0;
while (_local3 <= mSize.x) {
var _local5 = mCellSize * _local3;
mcFloor.moveTo(_local5, 0);
mcFloor.lineTo(_local5, mCellSize * mSize.y);
_local3++;
}
mcFloor.lineStyle(0, 0, 20);
_local2 = 0;
while (_local2 <= mSize.y) {
var _local4 = mCellSize * _local2;
mcFloor.moveTo(0, _local4);
mcFloor.lineTo(mCellSize * mSize.x, _local4);
_local2 = _local2 + 5;
}
_local3 = 0;
while (_local3 <= mSize.x) {
var _local5 = mCellSize * _local3;
mcFloor.moveTo(_local5, 0);
mcFloor.lineTo(_local5, mCellSize * mSize.y);
_local3 = _local3 + 5;
}
mcFloor.lineStyle(1, 0, 20);
_local2 = 0;
while (_local2 <= mSize.y) {
var _local4 = mCellSize * _local2;
mcFloor.moveTo(0, _local4);
mcFloor.lineTo(mCellSize * mSize.x, _local4);
_local2 = _local2 + 5;
}
_local3 = 0;
while (_local3 <= mSize.x) {
var _local5 = mCellSize * _local3;
mcFloor.moveTo(_local5, 0);
mcFloor.lineTo(_local5, mCellSize * mSize.y);
_local3 = _local3 + 5;
}
mcFloor.lineStyle(2, 0, 100);
mcFloor.moveTo(0, 0);
mcFloor.lineTo(mCellSize * mSize.x, 0);
mcFloor.lineTo(mCellSize * mSize.x, mCellSize * mSize.y);
mcFloor.lineTo(0, mCellSize * mSize.y);
mcFloor.lineTo(0, 0);
mcFloor._xscale = 100;
mcFloor._yscale = (CArena.mProjection.Transform_Z(mCellSize) / mCellSize) * 100;
mcFloor.cacheAsBitmap = true;
}
function PointCollide(tPoint) {
var _local2 = new flash.geom.Point(Math.floor(tPoint.x / mCellSize), Math.floor(tPoint.y / mCellSize));
return(_MapCell(_local2.x, _local2.y) != 0);
}
function ShapeCollide(tShape) {
var _local2 = 0;
while (_local2 < (tShape.length - 1)) {
if (LineCollideQ(tShape[_local2], tShape[_local2 + 1])) {
return(true);
}
_local2++;
}
if (LineCollideQ(tShape[tShape.length - 1], tShape[0])) {
return(true);
}
return(false);
}
function LineCollide(p1, p2, tHeight) {
var _local8 = new flash.geom.Point(0, 0);
var _local7 = new flash.geom.Point(mWorldSize.x, 0);
var _local6 = new flash.geom.Point(mWorldSize.x, mWorldSize.y);
var _local5 = new flash.geom.Point(0, mWorldSize.y);
var _local2;
if (p2.x < 0) {
_local2 = scidd.Math.CMath.LineIntersection(_local5, _local8, p1, p2);
if (_local2 != undefined) {
return(_local2);
}
} else if (p2.x >= mWorldSize.x) {
_local2 = scidd.Math.CMath.LineIntersection(_local7, _local6, p1, p2);
if (_local2 != undefined) {
return(_local2);
}
}
if (p2.y < 0) {
_local2 = scidd.Math.CMath.LineIntersection(_local8, _local7, p1, p2);
if (_local2 != undefined) {
return(_local2);
}
} else if (p2.y >= mWorldSize.y) {
_local2 = scidd.Math.CMath.LineIntersection(_local6, _local5, p1, p2);
if (_local2 != undefined) {
return(_local2);
}
}
return(_local2);
}
function LineCollideQ(p1, p2) {
return(((LineCollide(p1, p2) == undefined) ? false : true));
}
function CircularCollide(p, r) {
var _local5 = new flash.geom.Point(p.x - r, p.y - r);
var _local4 = new flash.geom.Point(p.x + r, p.y + r);
return(!(PointInMap(_local5) && (PointInMap(_local4))));
}
var _CLASSID_ = "CArena_Map";
static var mCellSize = 100 * CArena.mScale;
}
Symbol 482 MovieClip [__Packages.CArena_Data] Frame 0
class CArena_Data
{
var mName, mSize, mMapData, mLearnType, mObjective, mSpawnTime, mSpawnCount, mSpawnCountAtATime;
function CArena_Data (tMapIndex) {
var _local2 = [Data_0, Data_1, Data_2, Data_3, Data_4, Data_5, Data_6, Data_7, Data_8];
_local2[tMapIndex].call(this);
}
function Data_0() {
mName = "Movement Tutorial";
mSize = new flash.geom.Point(9, 9);
mMapData = "000000000";
mMapData = mMapData + "0P00P00P0";
mMapData = mMapData + "000000000";
mMapData = mMapData + "000000000";
mMapData = mMapData + "0P00N00P0";
mMapData = mMapData + "000000000";
mMapData = mMapData + "000000000";
mMapData = mMapData + "0P00P00P0";
mMapData = mMapData + "000000000";
mLearnType = "movement";
mObjective = "collectpickups";
}
function Data_1() {
mName = "Combat Tutorial";
mSize = new flash.geom.Point(9, 9);
mMapData = "000000000";
mMapData = mMapData + "040000040";
mMapData = mMapData + "000000000";
mMapData = mMapData + "000000000";
mMapData = mMapData + "0000N0000";
mMapData = mMapData + "000000000";
mMapData = mMapData + "000000000";
mMapData = mMapData + "040000040";
mMapData = mMapData + "000000000";
mSpawnTime = 60;
mSpawnCount = 1;
mSpawnCountAtATime = 1;
mLearnType = "combat";
mObjective = "killalldroids";
}
function Data_2() {
mName = "Combat and Movement Tutorial";
mSize = new flash.geom.Point(9, 9);
mMapData = "000000000";
mMapData = mMapData + "0400P0040";
mMapData = mMapData + "000000000";
mMapData = mMapData + "0000P0000";
mMapData = mMapData + "000000000";
mMapData = mMapData + "000111000";
mMapData = mMapData + "000000000";
mMapData = mMapData + "040000040";
mMapData = mMapData + "0000N0000";
mSpawnTime = 60;
mSpawnCount = 1;
mSpawnCountAtATime = 2;
mLearnType = "combat&movement";
mObjective = "killalldroids";
}
function Data_3() {
mName = "Compete 1";
mSize = new flash.geom.Point(11, 7);
mMapData = "00000000000";
mMapData = mMapData + "00000000000";
mMapData = mMapData + "00000P00000";
mMapData = mMapData + "0S0001000N0";
mMapData = mMapData + "00000P00000";
mMapData = mMapData + "00000000000";
mMapData = mMapData + "00000000000";
mLearnType = "none";
mObjective = "compete";
}
function Data_4() {
mName = "Compete 2";
mSize = new flash.geom.Point(11, 7);
mMapData = "00000100000";
mMapData = mMapData + "00000000000";
mMapData = mMapData + "00010P00000";
mMapData = mMapData + "0E0001000W0";
mMapData = mMapData + "00000P01000";
mMapData = mMapData + "00000000000";
mMapData = mMapData + "00000100000";
mLearnType = "none";
mObjective = "compete";
}
function Data_5() {
mName = "Compete 3";
mSize = new flash.geom.Point(13, 11);
mMapData = "0000000000000";
mMapData = mMapData + "00E000000P000";
mMapData = mMapData + "0000000000000";
mMapData = mMapData + "0010000000001";
mMapData = mMapData + "0000000000000";
mMapData = mMapData + "00E000000P000";
mMapData = mMapData + "0000000000000";
mMapData = mMapData + "0010000000001";
mMapData = mMapData + "0000000000000";
mMapData = mMapData + "00E000000P000";
mMapData = mMapData + "0000000000000";
mLearnType = "none";
mObjective = "compete";
}
function Data_6() {
mName = "Compete 4";
mSize = new flash.geom.Point(13, 13);
mMapData = "......C......";
mMapData = mMapData + ".............";
mMapData = mMapData + "..P...1...P..";
mMapData = mMapData + ".............";
mMapData = mMapData + ".............";
mMapData = mMapData + ".............";
mMapData = mMapData + "C.1.......1.C";
mMapData = mMapData + ".............";
mMapData = mMapData + ".............";
mMapData = mMapData + ".............";
mMapData = mMapData + "..P...1...P..";
mMapData = mMapData + ".............";
mMapData = mMapData + "......C......";
mLearnType = "none";
mObjective = "compete";
}
function Data_7() {
mName = "Compete 5";
mSize = new flash.geom.Point(13, 13);
mMapData = "E...........S";
mMapData = mMapData + ".............";
mMapData = mMapData + "..1...P...1..";
mMapData = mMapData + ".............";
mMapData = mMapData + "....1...1....";
mMapData = mMapData + ".............";
mMapData = mMapData + "..P.......P..";
mMapData = mMapData + ".............";
mMapData = mMapData + "....1...1....";
mMapData = mMapData + ".............";
mMapData = mMapData + "..1...P...1..";
mMapData = mMapData + ".............";
mMapData = mMapData + "N...........W";
mLearnType = "none";
mObjective = "compete";
}
function Data_8() {
Data_6();
mName = "SandBox";
mSize = new flash.geom.Point(15, 15);
mMapData = "000000000000000";
mMapData = mMapData + "0p00000400000p0";
mMapData = mMapData + "000000000000000";
mMapData = mMapData + "000000000000000";
mMapData = mMapData + "000000010000000";
mMapData = mMapData + "000000000000000";
mMapData = mMapData + "0000000p0000000";
mMapData = mMapData + "040010p1p010040";
mMapData = mMapData + "0000000p0000000";
mMapData = mMapData + "000000000000000";
mMapData = mMapData + "000000010000000";
mMapData = mMapData + "000040000000400";
mMapData = mMapData + "000000000000000";
mMapData = mMapData + "0p00000N00000p0";
mMapData = mMapData + "000000000000000";
mLearnType = "none";
mObjective = "sandbox";
}
function Dispose() {
}
var _CLASSID_ = "CArena_Data";
}
Symbol 483 MovieClip [__Packages.CThing] Frame 0
class CThing
{
var mcArena, mPosition, mRotation, mHasEvents, mHasActions, _AttachHeight, mCollidable, mID, mDamageEffect, mDrawOnce, mOnScreen, mState, mStateCount, mSprite, mcSort, mThingList, mcRender, mCommand_RegisterList, _WorldMatrix, mcThingParent, mcDraw, mDrawPosition, mDrawRotation, mDrawTint, mTint, _cacheRenderList, _cacheNonRenderList, mLife, _ColorCode, mRobotColorIndex;
function CThing (tArena, tPosition, tRotation) {
mcArena = tArena;
mPosition = tPosition.clone();
mRotation = ((tRotation == undefined) ? 0 : (tRotation));
mHasEvents = (mHasActions = false);
_AttachHeight = 0;
mCollidable = false;
mID = ++counterID;
mDamageEffect = 0;
mDrawOnce = false;
SetState("null");
mOnScreen = true;
}
function SetState(nState) {
mState = nState;
mStateCount = 0;
}
function RotationToDelta(tSpeed) {
tSpeed = ((tSpeed == undefined) ? 1 : (tSpeed));
var _local3 = new flash.geom.Matrix();
_local3.rotate((mRotation * Math.PI) / 180);
return(_local3.transformPoint(new flash.geom.Point(tSpeed, 0)));
}
function CreateSprite(tID, tCompileString, tNumberOfRotations, tTint, tScaleAdjust) {
mSprite = CSpriteISO.Exists(tID);
if (mSprite == undefined) {
mSprite = new CSpriteISO(tID, tCompileString, tNumberOfRotations, tTint, tScaleAdjust);
}
}
function GetMC(tID) {
return(mcArena.mcThingPlane.createEmptyMovieClip(tID, mcArena.mcThingPlane.getNextHighestDepth()));
}
function PlaySound(tSound) {
var _local2 = new flash.geom.Point();
mcSort.localToGlobal(_local2);
tSound.PlaySound(_local2);
}
function toString() {
return((((_BASECLASSID_ + "::") + _CLASSID_) + ".") + mID);
}
function Dispose() {
for (var _local2 in mThingList) {
mThingList[_local2].Dispose();
}
delete mThingList;
mcRender.removeMovieClip();
}
function NextCommand() {
return(mCommand_RegisterList[0].NextCommand());
}
function Process_Children() {
for (var _local3 in mThingList) {
var _local2 = mThingList[_local3];
_local2.Process();
}
}
function Move(op, np) {
mcArena.mMapWho.Move(op, np);
}
function Setup_WorldMatrix() {
_WorldMatrix = new flash.geom.Matrix();
}
function UpdateWorldMatrix(tPosition, tRotation) {
tRotation = ((tRotation == undefined) ? (mRotation) : (tRotation));
tPosition = ((tPosition == undefined) ? (mPosition) : (tPosition));
_WorldMatrix.identity();
_WorldMatrix.rotate((tRotation * Math.PI) / 180);
_WorldMatrix.translate(tPosition.x, tPosition.y);
if (mcThingParent != undefined) {
_WorldMatrix.concat(mcThingParent._WorldMatrix);
}
}
function get mWorldPosition() {
var _local2 = ((_WorldMatrix == undefined) ? (mPosition.clone()) : (_WorldMatrix.transformPoint(zPoint)));
_local2.y = CArena.mProjection.Transform_Z(_local2.y) - CArena.mProjection.Transform_Y(mAttachHeight);
return(_local2);
}
function GetWorldRotation() {
if (_WorldMatrix == undefined) {
return(mRotation);
}
var _local2 = _WorldMatrix.deltaTransformPoint(new flash.geom.Point(1, 0));
return((Math.atan2(_local2.y, _local2.x) * 180) / Math.PI);
}
function ShapeToWorld(tShape) {
var _local3 = new Array();
if (_WorldMatrix == undefined) {
return(_local3);
}
var _local4 = _WorldMatrix;
for (var _local5 in tShape) {
_local3[_local5] = _local4.transformPoint(tShape[_local5]);
}
return(_local3);
}
function Draw() {
if (mcArena.mTick > 0) {
if (mDrawOnce) {
return(undefined);
}
}
mcSort = ((mSprite != undefined) ? (mcRender) : (mcDraw));
var _local3 = CArena.mProjection.Transform_Y(mAttachHeight);
if (_WorldMatrix == undefined) {
mcSort._x = mPosition.x;
mcSort._y = CArena.mProjection.Transform_Z(mPosition.y) - _local3;
} else {
mDrawPosition = _WorldMatrix.transformPoint(zPoint);
mDrawPosition.y = CArena.mProjection.Transform_Z(mDrawPosition.y);
mcSort._x = mDrawPosition.x;
mcSort._y = mDrawPosition.y - _local3;
}
mcSort._sortKey = ((mcSort._y + _local3) * 50) - (mcSort._x / 1000);
for (var _local2 in mThingList) {
mThingList[_local2].Draw();
}
mDrawRotation = ((GetWorldRotation() * Math.PI) / 180) + Math.PI;
mDrawTint = mTint;
if (mOnScreen) {
_RenderAsBitmap();
}
if (mDamageEffect > 0) {
mDamageEffect--;
var _local4 = (((mDamageEffect / 30) > 1) ? 1 : (mDamageEffect / 30));
mcSort.filters = ((((int(mDamageEffect) % 2) == 0) || (!mOnScreen)) ? ([]) : ([scidd.Draw.CColor.GetColorMatrixFilter(scidd.Draw.CColor.ColorMatrix_Colorize(new scidd.Draw.CColor(255, 255, 255), _local4, _local4))]));
}
}
function RenderAsBitmap() {
if (mcRender == undefined) {
mcRender = GetMC(_CLASSID_ + (mRenderID++));
}
}
function Render_GetThingList() {
if (_cacheRenderList == undefined) {
var _local3 = GetThingList();
_cacheNonRenderList = new Array();
_cacheRenderList = new Array();
for (var _local4 in _local3) {
var _local2 = _local3[_local4];
if (_local2.mSprite == undefined) {
_cacheNonRenderList[_cacheNonRenderList.length] = _local2;
} else {
_cacheRenderList[_cacheRenderList.length] = _local2;
}
}
}
}
function _RenderAsBitmap() {
if (mcRender == undefined) {
return(undefined);
}
Render_GetThingList();
mSprite.RenderAsBitmap(mcRender, _cacheRenderList);
if (mIsAlive) {
for (var _local2 in _cacheNonRenderList) {
mcArena.mSortList[mcArena.mSortList.length] = _cacheNonRenderList[_local2].mcSort;
}
}
mcSort = mcRender;
}
function ApplyDamage(aThing, tDamage) {
if ((aThing.mLife == undefined) || (aThing.mLife < 0)) {
return(undefined);
}
var _local5 = aThing.mLife;
var _local3 = GetParentByID(mID);
aThing.mDamageEffect = tDamage * 3;
aThing.mLife = aThing.mLife - tDamage;
_local3.mScore = _local3.mScore + (tDamage * 10);
_local3.mDamageInflicted = _local3.mDamageInflicted + tDamage;
if ((aThing.mLife < 0) && (_local5 >= 0)) {
_local3.mKills++;
aThing.mDeath = true;
aThing.mKilledBy = _local3;
aThing.mKilledBy.mScore = aThing.mKilledBy.mScore + ((aThing.mMaxLife + 1) * 10);
return(false);
}
return(true);
}
function get mIsAlive() {
return(mLife >= 0);
}
function get mHierarchyList() {
var _local2 = this;
var _local3 = new Array();
do {
_local3[_local3.length] = _local2;
_local2 = _local2.mcParent;
} while (_local2 != undefined);
return(_local3);
}
function get mAttachHeight() {
if (mcThingParent == undefined) {
return(_AttachHeight);
}
return(_AttachHeight + mcThingParent.mAttachHeight);
}
function set mAttachHeight(a) {
_AttachHeight = a;
//return(mAttachHeight);
}
function RegisterCommand(tCommand) {
mCommand_RegisterList = ((mCommand_RegisterList == undefined) ? (new Array()) : (mCommand_RegisterList));
tCommand.mThing = this;
mCommand_RegisterList[mCommand_RegisterList.length] = tCommand;
if (tCommand.mEvent) {
mHasEvents = true;
}
if (tCommand.mAction) {
mHasActions = true;
}
return(tCommand);
}
function FindCommand(tClassID) {
for (var _local3 in mCommand_RegisterList) {
if (tClassID == mCommand_RegisterList[_local3]._CLASSID_) {
return(mCommand_RegisterList[_local3]);
}
}
return(undefined);
}
function GetCommand_Events() {
var _local2 = new Array();
for (var _local3 in mCommand_RegisterList) {
if (mCommand_RegisterList[_local3].mEvent == true) {
_local2[_local2.length] = mCommand_RegisterList[_local3];
}
}
return(_local2);
}
function GetCommand_Actions() {
var _local2 = new Array();
for (var _local3 in mCommand_RegisterList) {
if (mCommand_RegisterList[_local3].mAction == true) {
_local2[_local2.length] = mCommand_RegisterList[_local3];
}
}
return(_local2);
}
function GetAllEvents() {
var _local3 = new Array();
var _local4 = GetThingList();
for (var _local5 in _local4) {
var _local2 = _local4[_local5].GetCommand_Events();
_local3 = _local3.concat(_local2);
}
return(_local3);
}
function Attach(tThing, tAttachPosition) {
tAttachPosition = ((tAttachPosition == undefined) ? (new scidd.Math.CVector3(0, 0, 0)) : (tAttachPosition));
mThingList = ((mThingList == undefined) ? (new Array()) : (mThingList));
tThing.mcThingParent = this;
tThing.SetAttachPosition(tAttachPosition.Clone());
mThingList[mThingList.length] = tThing;
return(tThing);
}
function SetAttachPosition(tOffset) {
var _local3 = mcThingParent.mSprite.mBounds;
mPosition.x = ((tOffset.mX >= 0) ? (tOffset.mX * _local3.mMax.mX) : (Math.abs(tOffset.mX) * _local3.mMin.mX));
mPosition.y = ((tOffset.mZ >= 0) ? (tOffset.mZ * _local3.mMax.mZ) : (Math.abs(tOffset.mZ) * _local3.mMin.mZ));
_AttachHeight = tOffset.mY * _local3.mMax.mY;
mSprite.mGroundHeight = -_AttachHeight;
}
function GetParentByID(tID) {
for (var _local3 in mcArena.mThingList) {
var _local2 = mcArena.mThingList[_local3];
if ((_local2.mParentClass == true) && (_local2.mID == tID)) {
return(_local2);
}
}
return(undefined);
}
function GetThingList() {
var _local2 = new Array();
_local2[_local2.length] = this;
for (var _local3 in mThingList) {
_local2 = _local2.concat(mThingList[_local3].GetThingList());
}
return(_local2);
}
function GetThingList_Filter(tLearnType) {
switch (tLearnType) {
case "movement" :
var _local2 = new Array();
_local2[_local2.length] = this;
for (var _local3 in mThingList) {
if (mThingList[_local3]._CLASSID_ == "CSensor") {
_local2[_local2.length] = mThingList[_local3];
}
}
return(_local2);
case "combat" :
case "combat&movement" :
}
return(GetThingList());
}
function set mColorCode(a) {
_ColorCode = a;
mTint = _ColorCode;
//return(mColorCode);
}
function get mColorCode() {
return(_ColorCode);
}
function SetTint(tColor) {
var _local2 = GetThingList();
tColor = ((tColor == undefined) ? (((mRobotColor[mRobotColorIndex] == undefined) ? 16777215 : (mRobotColor[mRobotColorIndex]))) : (tColor));
for (var _local5 in _local2) {
_local2[_local5].mColorCode = ((typeof(tColor) == "number") ? (tColor) : (tColor[_local5]));
for (var _local4 in _local2[_local5].mCommand_RegisterList) {
_local2[_local5].mCommand_RegisterList[_local4].mColorCode = _local2[_local5].mColorCode;
}
}
}
function SetDepth(depth) {
var _local4 = ((mSprite == undefined) ? (mcDraw) : (mSprite));
if (_local4.getDepth() != depth) {
_local4.swapDepths(depth);
}
depth++;
for (var _local3 in mThingList) {
depth = mThingList[_local3].SetDepth(depth);
}
return(depth);
}
var _CLASSID_ = "CThing";
var _BASECLASSID_ = "CThing";
static var zPoint = new flash.geom.Point(0, 0);
static var counterID = 0;
static var mRobotColor = [6810983, 15558503, 14934786, 52479, 15558637, 11622657, 16613421, 10066329];
var mProgrammerEnabled = true;
static var mRenderID = 0;
}
Symbol 484 MovieClip [__Packages.CCommand] Frame 0
class CCommand
{
var mThing, mColorCode, mVariableList;
function CCommand () {
}
function toString() {
return(_CLASSID_);
}
function toString2() {
var _local2 = _CLASSID_ + newline;
for (var _local3 in this) {
_local2 = _local2 + (((("--->" + _local3) + " = ") + this[_local3]) + newline);
}
return(_local2);
}
function Copy(tCommand) {
mThing = tCommand.mThing;
mColorCode = tCommand.mColorCode;
}
function Dispose() {
}
function Process() {
}
function Draw() {
}
function AddVariable(tFieldName, tType, tDefault, tValue) {
var _local2 = {mFieldName:tFieldName, mFieldType:tType};
if (!(tType === "list")) {
} else {
_local2.mDefaultIndex = tDefault;
_local2.mList = tValue;
_local2.mValue = _local2.mList[_local2.mDefaultIndex];
}
mVariableList = ((mVariableList == undefined) ? (new Array()) : (mVariableList));
mVariableList[mVariableList.length] = _local2;
}
function SetVariableField(tFieldName, tProp, tValue) {
}
function GetVariableField(tFieldName, tProp) {
for (var _local3 in mVariableList) {
if (mVariableList[_local3].mFieldName == tFieldName) {
return(mVariableList[_local3][tProp]);
}
}
return(undefined);
}
var _CLASSID_ = "CCommand";
var mcLinkID_Icon = "_Blank";
var mProgrammerEnabled = true;
}
Symbol 485 MovieClip [__Packages.CCommand_Event] Frame 0
class CCommand_Event extends CCommand
{
var mPriority, _Trigger, mCommandList, mEndOfList, mCurrentIndex, mCurrentCommand;
function CCommand_Event (tPri) {
super();
mPriority = ((tPri == undefined) ? 1 : (tPri));
ClearTrigger();
}
function set mTrigger(a) {
if (a != false) {
_Trigger = a;
}
//return(mTrigger);
}
function get mTrigger() {
return(_Trigger);
}
function ClearTrigger() {
_Trigger = false;
}
function NextCommand() {
if (mCommandList.length == 0) {
mEndOfList = true;
return(undefined);
}
mCurrentIndex = ((mCurrentCommand == undefined) ? ((mCurrentIndex = -1)) : (FindCommand(mCurrentCommand)));
mEndOfList = false;
if (mCurrentIndex == -1) {
mCurrentIndex = 0;
mCurrentCommand = mCommandList[mCurrentIndex];
mCurrentCommand.mTick = mCurrentCommand.mTickCount;
} else if ((mCurrentCommand.mTick <= 0) || (mCurrentCommand == undefined)) {
mCurrentIndex++;
if (mCurrentIndex >= mCommandList.length) {
mCurrentIndex = 0;
}
mCurrentCommand = mCommandList[mCurrentIndex];
mCurrentCommand.mTick = mCurrentCommand.mTickCount;
}
mCurrentCommand.mTick--;
mEndOfList = (mCurrentIndex == (mCommandList.length - 1)) && (mCurrentCommand.mTick <= 0);
return(mCurrentCommand);
}
function Reset() {
mCurrentCommand = undefined;
mEndOfList = false;
}
function FindCommand(tCommand) {
var _local2 = 0;
while (_local2 < mCommandList.length) {
if (tCommand == mCommandList[_local2]) {
return(_local2);
}
_local2++;
}
return(-1);
}
function Copy(tCommand) {
super.Copy(tCommand);
}
function get mCommandListFull() {
mCommandList = ((mCommandList == undefined) ? (new Array()) : (mCommandList));
return(mCommandList.length >= mMaxCommands);
}
function AddCommand(tThing, tCommand, tInsertIndex) {
if (mCommandListFull) {
return("error.toomany");
}
tCommand.mThing = tThing;
tInsertIndex = ((tInsertIndex == undefined) ? (mCommandList.length) : (tInsertIndex));
if (tInsertIndex <= 0) {
mCommandList = [tCommand].concat(mCommandList);
} else if (tInsertIndex >= mCommandList.length) {
mCommandList[mCommandList.length] = tCommand;
} else {
var _local4 = mCommandList.splice(0, tInsertIndex);
mCommandList = _local4.concat([tCommand].concat(mCommandList));
}
return("success");
}
function DeleteCommand(tCommand) {
for (var _local3 in mCommandList) {
if (tCommand == mCommandList[_local3]) {
mCommandList.splice(_local3, 1);
break;
}
}
}
var _CLASSID_ = "CCommand_Event";
var mEvent = true;
var mHelp_Type = "Event";
static var mMaxCommands = 16;
}
Symbol 486 MovieClip [__Packages.CSpriteISO] Frame 0
class CSpriteISO
{
static var mcRenderPlane, mSpriteList, mPreRendering;
var mEngine3D, mProjection, mGroundHeight, mID, mTint, mMesh3D, mMeshScale, mMeshOffset, mNumberOfFrames, mRadianStep, mFrameList, mShadow_MaxBitmapSize, mOutline_MaxBitmapSize, mSolid_MaxBitmapSize, _CollisionShape2D, _CollisionShape2DI, _Radius2D, _Radius2D_D, _Height2D, mDrawPosition, __get__mPosition, __get__mWorldPosition;
function CSpriteISO (tID, tCompileString, tNumberOfFrames, tTint, tScaleAdjust) {
mEngine3D = new scidd.Draw.F3D.CEngine3D(mcRenderPlane);
mProjection = new scidd.Draw.F3D.CProjection3D_Pushed(mPitch);
mGroundHeight = 0;
mID = tID;
mTint = tTint;
mMesh3D = (new scidd.Draw.F3D.CMesh3D_FromString(tCompileString)).mMesh3D;
mEngine3D.AddMesh(mMesh3D);
var _local4 = (10 * ((tScaleAdjust == undefined) ? 1 : (tScaleAdjust))) * CArena.mScale;
mMeshScale = new scidd.Math.CVector3(_local4, _local4, _local4);
mMeshOffset = new scidd.Math.CVector3(0, 0, 0);
mNumberOfFrames = tNumberOfFrames;
mRadianStep = (Math.PI*2) / mNumberOfFrames;
mFrameList = new Array();
var _local2 = 0;
var _local3 = 0;
while (_local2 < mNumberOfFrames) {
mFrameList[_local2] = new Object();
mFrameList[_local2].mRendered = false;
mFrameList[_local2].mRadians = _local3;
mFrameList[_local2].mIndex = _local2;
_local2++;
_local3 = _local3 + mRadianStep;
}
mSpriteList = ((mSpriteList == undefined) ? (new Array()) : (mSpriteList));
mSpriteList[mSpriteList.length] = {mSprite:this, mID:mID, mProgressIndex:0, mProgressTotal:mFrameList.length};
}
function toString() {
return((("CSpriteISO::" + mID) + " Frames = ") + mFrameList.length);
}
function Dispose() {
}
function RenderAsBitmap(mcRender, tRenderThingList) {
var _local19 = 1;
if (mcRender.mInitialised == undefined) {
mcRender.mInitialised = true;
mcRender.mcShadow = mcRender.createEmptyMovieClip("_Shadow", mcRender.getNextHighestDepth());
mcRender.mcOutline = mcRender.createEmptyMovieClip("_Outline", mcRender.getNextHighestDepth());
mcRender.mcSolid = mcRender.createEmptyMovieClip("_Solid", mcRender.getNextHighestDepth());
mcRender.mcShadow._alpha = 50;
mcRender.bmShadow = new flash.display.BitmapData(mShadow_MaxBitmapSize.x, mShadow_MaxBitmapSize.y, true, 4294901760);
mcRender.bmOutline = new flash.display.BitmapData(mOutline_MaxBitmapSize.x, mOutline_MaxBitmapSize.y, true, 4294901760);
mcRender.bmSolid = new flash.display.BitmapData(mSolid_MaxBitmapSize.x, mSolid_MaxBitmapSize.y, true, 4294901760);
var _local18 = new flash.geom.Point(mcRender.bmShadow.width * 0.5, mcRender.bmShadow.height * 0.75);
mcRender.mcShadow._x = mcRender.mcShadow._x - _local18.x;
mcRender.mcShadow._y = mcRender.mcShadow._y - _local18.y;
_local18 = new flash.geom.Point(mcRender.bmOutline.width * 0.5, mcRender.bmOutline.height * 0.75);
mcRender.mcOutline._x = mcRender.mcOutline._x - _local18.x;
mcRender.mcOutline._y = mcRender.mcOutline._y - _local18.y;
_local18 = new flash.geom.Point(mcRender.bmSolid.width * 0.5, mcRender.bmSolid.height * 0.75);
mcRender.mcSolid._x = mcRender.mcSolid._x - _local18.x;
mcRender.mcSolid._y = mcRender.mcSolid._y - _local18.y;
mcRender.mcShadow.attachBitmap(mcRender.bmShadow, 1, "auto", true);
mcRender.mcOutline.attachBitmap(mcRender.bmOutline, 1, "auto", true);
mcRender.mcSolid.attachBitmap(mcRender.bmSolid, 1, "auto", true);
}
var _local13 = false;
for (var _local17 in tRenderThingList) {
var _local3 = tRenderThingList[_local17];
var _local4 = _local3.mSprite;
var _local8 = GetFrameIndex(_local3.mDrawRotation);
var _local5 = _local4.mFrameList[_local8];
if (!((_local3.mSpriteDetails.mDrawIndex == _local8) && (_local3.mSpriteDetails.mDrawTint == _local3.mDrawTint))) {
_local13 = true;
break;
}
}
if (_local13) {
if (mcRender.cacheAsBitmap != false) {
mcRender.cacheAsBitmap = false;
}
mcRender.bmShadow.fillRect(mcRender.bmShadow.rectangle, 0);
mcRender.bmOutline.fillRect(mcRender.bmOutline.rectangle, 0);
mcRender.bmSolid.fillRect(mcRender.bmSolid.rectangle, 0);
var _local16 = new flash.geom.Point(mcRender.bmShadow.width * 0.5, mcRender.bmShadow.height * 0.75);
var _local14 = new flash.geom.Point(mcRender.bmSolid.width * 0.5, mcRender.bmSolid.height * 0.75);
var _local15 = new flash.geom.Point(mcRender.bmOutline.width * 0.5, mcRender.bmOutline.height * 0.75);
var _local9 = tRenderThingList.length > 1;
var _local6 = true;
for (var _local17 in tRenderThingList) {
var _local3 = tRenderThingList[_local17];
var _local4 = _local3.mSprite;
var _local8 = GetFrameIndex(_local3.mDrawRotation);
var _local5 = _local4.mFrameList[_local8];
_local3.mSpriteDetails = {mDrawIndex:_local8, mDrawRotation:_local3.mDrawRotation, mDrawTint:_local3.mDrawTint};
_local4.Render_Shadow(_local5, _local16, mcRender.bmShadow, undefined, ((_local6 == true) ? false : (_local9)));
_local4.Render_Outline(_local5, _local15, mcRender.bmOutline, _local3.mDrawTint, ((_local6 == true) ? false : (_local9)));
_local4.Render_Solid(_local5, _local14, mcRender.bmSolid, _local3.mDrawTint, ((_local6 == true) ? false : (_local9)));
_local6 = false;
}
} else if (mcRender.cacheAsBitmap != true) {
mcRender.cacheAsBitmap = true;
}
}
function Render_Solid(tCurrentFrame, tOrigin, dBMD, tColor, tAlphaMask) {
_RenderComponent(tCurrentFrame.mSolid, tOrigin, dBMD, tColor, tAlphaMask);
}
function Render_Outline(tCurrentFrame, tOrigin, dBMD, tColor, tAlphaMask) {
_RenderComponent(tCurrentFrame.mOutline, tOrigin, dBMD, tColor, tAlphaMask);
}
function Render_Shadow(tCurrentFrame, tOrigin, dBMD, tColor, tAlphaMask) {
_RenderComponent(tCurrentFrame.mShadow, tOrigin, dBMD, tColor, tAlphaMask);
}
function _RenderComponent(tBitmapObject, tOrigin, dBMD, tColor, tAlphaMask) {
var _local2 = new flash.geom.Point(tOrigin.x + tBitmapObject.mDisp.x, tOrigin.y + tBitmapObject.mDisp.y);
if (tColor == undefined) {
dBMD.copyPixels(tBitmapObject.sBMD, tBitmapObject.sBMD.rectangle, _local2, undefined, undefined, tAlphaMask);
} else {
if ((tBitmapObject._cacheBuffer == undefined) || (tBitmapObject.mColor != tColor)) {
var _local4 = scidd.Draw.CColor.GetColorMatrixFilter(scidd.Draw.CColor.ColorMatrix_Colorize(scidd.Draw.CColor.FromRGB(tColor), 1, 0));
tBitmapObject._cacheBuffer = ((tBitmapObject._cacheBuffer == undefined) ? (tBitmapObject.sBMD.clone()) : (tBitmapObject._cacheBuffer));
tBitmapObject.mColor = tColor;
tBitmapObject._cacheBuffer.applyFilter(tBitmapObject.sBMD, tBitmapObject.sBMD.rectangle, zPoint, _local4);
}
dBMD.copyPixels(tBitmapObject._cacheBuffer, tBitmapObject._cacheBuffer.rectangle, _local2, undefined, undefined, tAlphaMask);
}
}
function Render(tFrame) {
if (tFrame.mRendered == false) {
tFrame.mRendered = true;
mMeshOffset.mY = mGroundHeight;
mProjection.Project(mMesh3D, tFrame.mRadians, mMeshOffset, mMeshScale);
mcRenderPlane.clear();
mMesh3D.QRender_MCList([mcRenderPlane], [undefined], mLight);
tFrame.mSolid = _renderToBitmap(mcRenderPlane);
mcRenderPlane.clear();
mMesh3D.QRender_MCList([mcRenderPlane], [scidd.Draw.F3D.CMaterial.newLineColor("OUTLINE", new scidd.Draw.CColor(128, 128, 128), 4)], mLight);
tFrame.mOutline = _renderToBitmap(mcRenderPlane);
mcRenderPlane.clear();
mMeshOffset.mY = 0;
mProjection.Project_Shadow(mMesh3D, tFrame.mRadians, mMeshOffset, mMeshScale, mLight, mGroundHeight, 0.6);
mMesh3D.QRender_MCList([mcRenderPlane], [scidd.Draw.F3D.CMaterial.newSolidColor("SHADOW", new scidd.Draw.CColor(0, 0, 0))], mLight, true);
tFrame.mShadow = _renderToBitmap(mcRenderPlane);
mSolid_MaxBitmapSize = new flash.geom.Point(100, 100);
mShadow_MaxBitmapSize = new flash.geom.Point(100, 100);
mOutline_MaxBitmapSize = new flash.geom.Point(100, 100);
if (mTint != undefined) {
var _local3 = scidd.Draw.CColor.GetColorMatrixFilter(scidd.Draw.CColor.ColorMatrix_Colorize(scidd.Draw.CColor.FromRGB(mTint), 1, 0));
tFrame.mOutline.sBMD.applyFilter(tFrame.mOutline.sBMD, tFrame.mOutline.sBMD.rectangle, zPoint, _local3);
tFrame.mSolid.sBMD.applyFilter(tFrame.mSolid.sBMD, tFrame.mSolid.sBMD.rectangle, zPoint, _local3);
}
return(true);
}
return(false);
}
function _renderToBitmap(mc) {
var _local2;
var _local3;
var _local1 = mc.getBounds(mc);
_local3 = new flash.display.BitmapData(Math.ceil(_local1.xMax - _local1.xMin), Math.ceil(_local1.yMax - _local1.yMin), true, 0);
_local2 = new flash.geom.Point(_local1.xMin, _local1.yMin);
var _local4 = new flash.geom.Matrix();
_local4.translate(-_local2.x, -_local2.y);
_local3.draw(mc, _local4);
return({sBMD:_local3, mDisp:_local2});
}
static function PreRender_Process() {
var _local4 = getTimer();
var _local3 = 0;
for (var _local5 in mSpriteList) {
var _local1 = mSpriteList[_local5];
if (_local1.mProgressIndex != _local1.mProgressTotal) {
while (_local1.mProgressIndex < _local1.mProgressTotal) {
var _local2 = _local1.mSprite.mFrameList[_local1.mProgressIndex];
if (_local1.mSprite.Render(_local2)) {
if ((getTimer() - _local4) > 100) {
return(0.5);
}
_local3++;
}
_local1.mProgressIndex++;
}
}
}
mPreRendering = false;
return(1);
}
static function PreRenderAll() {
for (var _local2 in mSpriteList) {
var _local1 = mSpriteList[_local2];
}
mPreRendering = true;
}
static function Exists(tID) {
for (var _local2 in mSpriteList) {
var _local1 = mSpriteList[_local2];
if (_local1.mID == tID) {
return(_local1.mSprite);
}
}
return(undefined);
}
function GetFrameIndex(radians) {
return((Math.round(((radians - (mRadianStep / 2)) * mNumberOfFrames) / (Math.PI*2)) + (mNumberOfFrames * 1000)) % mNumberOfFrames);
}
function CorrectAngle(radians) {
return(radians % (Math.PI*2));
}
function get mCollisionShape2D() {
if (_CollisionShape2D == undefined) {
_CollisionShape2D = new Array();
var _local2 = mBounds;
_CollisionShape2D = [new flash.geom.Point(_local2.mMin.mX, _local2.mMin.mZ), new flash.geom.Point(_local2.mMax.mX, _local2.mMin.mZ), new flash.geom.Point(_local2.mMax.mX, _local2.mMax.mZ), new flash.geom.Point(_local2.mMin.mX, _local2.mMax.mZ)];
}
return(_CollisionShape2D);
}
function get mCollisionShape2DI() {
if (_CollisionShape2DI == undefined) {
_CollisionShape2DI = new Array();
var _local2 = mBounds;
_CollisionShape2DI = [new flash.geom.Point(_local2.mMin.mX, _local2.mMin.mZ), new flash.geom.Point(_local2.mMax.mX, _local2.mMin.mZ), new flash.geom.Point(_local2.mMax.mX, _local2.mMax.mZ), new flash.geom.Point(_local2.mMin.mX, _local2.mMax.mZ), new flash.geom.Point(_local2.mMin.mX, _local2.mMin.mZ)];
}
return(_CollisionShape2DI);
}
function get mRadius2D() {
if (_Radius2D == undefined) {
var _local2 = mBounds;
_Radius2D = Math.abs(_local2.mMin.mX);
if (Math.abs(_local2.mMax.mX) > _Radius2D) {
_Radius2D = Math.abs(_local2.mMax.mX);
}
if (Math.abs(_local2.mMax.mZ) > _Radius2D) {
_Radius2D = Math.abs(_local2.mMax.mZ);
}
if (Math.abs(_local2.mMin.mZ) > _Radius2D) {
_Radius2D = Math.abs(_local2.mMin.mZ);
}
}
return(_Radius2D);
}
function get mRadius2D_D() {
if (_Radius2D_D == undefined) {
var _local2 = mRadius2D;
_Radius2D_D = Math.sqrt((_local2 * _local2) + (_local2 * _local2));
}
return(_Radius2D_D);
}
function get mHeight2D() {
if (_Height2D == undefined) {
var _local2 = mBounds;
_Height2D = Math.abs(_local2.mMax.mY - _local2.mMin.mY);
}
return(_Height2D);
}
function set mPosition(a) {
mDrawPosition.x = a.x;
mDrawPosition.y = a.y;
//return(__get__mPosition());
}
function set mWorldPosition(a) {
mDrawPosition.x = a.x;
mDrawPosition.y = a.y / 2;
//return(__get__mWorldPosition());
}
function get mScale() {
return(100);
}
function get mBounds() {
var _local2 = mMeshScale;
var _local4 = mMesh3D.mMin.Clone().Scale(_local2).ScaleN(mScale / 100);
var _local3 = mMesh3D.mMax.Clone().Scale(_local2).ScaleN(mScale / 100);
return({mMin:_local4, mMax:_local3, mSize:_local3.Clone().Sub(_local4)});
}
var _CLASSID_ = "CSpriteISO";
static var zPoint = new flash.geom.Point(0, 0);
static var mPitch = 0;
static var mLight = (new scidd.Math.CVector3(1, -0.5, 1.5)).Normalize(1);
}
Symbol 487 MovieClip [__Packages.scidd.Draw.F3D.CEngine3D] Frame 0
class scidd.Draw.F3D.CEngine3D
{
var mInstance_List, mMesh_List, mParent_MC, mSortLevel;
function CEngine3D (tParent_MC) {
mInstance_List = new Array();
mMesh_List = new Array();
mParent_MC = tParent_MC;
mParent_MC.mOriginalPosition = new flash.geom.Point(mParent_MC._x, mParent_MC._y);
mSortLevel = 1000;
}
function Render(tProjection, tInstanceList) {
tInstanceList = ((tInstanceList == undefined) ? (mInstance_List) : (tInstanceList));
for (var _local5 in tInstanceList) {
var _local3 = tInstanceList[_local5];
_local3.Render(tProjection);
}
tInstanceList.sortOn("mSortFactor", Array.NUMERIC);
for (var _local5 in tInstanceList) {
var _local3 = tInstanceList[_local5];
if (_local3.mDraw_MC.getDepth() != int(_local5 + mSortLevel)) {
_local3.mDraw_MC.swapDepths(int(_local5 + mSortLevel));
}
}
}
function ParkInstances(tInstanceList) {
for (var _local3 in tInstanceList) {
var _local1 = tInstanceList[_local3];
_local1.mDraw_MC._visible = false;
}
}
function AddInstance(tInstance3D) {
tInstance3D.mDraw_MC = GetDrawMC();
mInstance_List[mInstance_List.length] = tInstance3D;
return(tInstance3D);
}
function DeleteInstance(tInstance3D) {
tInstance3D.mDraw_MC.removeMovieClip();
for (var _local3 in mInstance_List) {
if (tInstance3D == mInstance_List[_local3]) {
mInstance_List.splice(int(_local3), 1);
return(undefined);
}
}
}
function GetInstance_List() {
return(mInstance_List);
}
function AddMesh(tMesh) {
mMesh_List[mMesh_List.length] = tMesh;
}
function GetDrawMC(tPerpendicular) {
var _local3 = mParent_MC.getNextHighestDepth();
var _local2 = mParent_MC.createEmptyMovieClip("mc_" + _local3, _local3);
_local2.mPerpendicular = ((tPerpendicular == undefined) ? false : (tPerpendicular));
return(_local2);
}
var _CLASSID_ = "scidd.Draw.F3D.CEngine3D";
}
Symbol 488 MovieClip [__Packages.scidd.Draw.F3D.CInstance3D] Frame 0
class scidd.Draw.F3D.CInstance3D
{
var mMatrix, mProjectionMatrix, mPosition, mScale;
function CInstance3D (tPosition, tScale) {
mMatrix = scidd.Math.CMatrix4.Identity_Matrix();
mProjectionMatrix = scidd.Math.CMatrix4.Identity_Matrix();
mPosition = tPosition;
mScale = ((tScale == undefined) ? (new scidd.Math.CVector3(1, 1, 1)) : (tScale));
}
var _CLASSID_ = "scidd.Draw.F3D.CInstance3D";
}
Symbol 489 MovieClip [__Packages.scidd.Draw.F3D.CMesh3D_FromString] Frame 0
class scidd.Draw.F3D.CMesh3D_FromString
{
var mMesh3D, mMaterialList, mVOffset, mNOffset, mUVOffset;
function CMesh3D_FromString (tString) {
CreateMesh3D(tString);
}
function CreateMesh3D(tCompileString) {
mMesh3D = new scidd.Draw.F3D.CMesh3D("DONT_MATTER");
var _local4 = tCompileString.split("@0");
var _local3 = 0;
while (_local3 < _local4.length) {
var _local2 = _local4[_local3].split("@1");
switch (_local2[0]) {
case "MATERIALLIST" :
Compile_MaterialLibrary(_local2);
break;
case "MODEL" :
Compile_Model(_local2, 2);
}
_local3++;
}
mMesh3D.Finalize(false, false, false);
}
function Compile_MaterialLibrary(tCompileList) {
mMaterialList = new Array();
var _local7 = 1;
while (_local7 < tCompileList.length) {
var _local6 = tCompileList[_local7].split("@2");
var _local5 = new Object();
var _local4 = 0;
while (_local4 < _local6.length) {
var _local3 = _local6[_local4].split(":");
switch (_local3[0]) {
case "MATERIAL" :
break;
case "NAME" :
_local5.mName = _local3[1];
break;
case "COLOR" :
var _local2 = _local3[1].split(",");
_local5.mColor = new scidd.Draw.CColor(Number(_local2[1]), Number(_local2[2]), Number(_local2[3]), Number(_local2[0]));
}
_local4++;
}
mMaterialList[mMaterialList.length] = _local5;
_local7++;
}
}
function Compile_GetMaterial(tMaterialName) {
for (var _local2 in mMaterialList) {
if (mMaterialList[_local2].mName == tMaterialName) {
return(mMaterialList[_local2]);
}
}
return(undefined);
}
function Compile_Model(tCompileList, tKey) {
mVOffset = mMesh3D.mPosition_List.length;
mNOffset = mMesh3D.mNormal_List.length;
mUVOffset = mMesh3D.mUV_List.length;
var _local3 = 1;
while (_local3 < tCompileList.length) {
var _local2 = tCompileList[_local3].split("@" + tKey);
if (_local2.length == 1) {
var _local4 = _local2[0].split(":");
switch (_local4[0]) {
case "NAME" :
break;
case "ID" :
}
} else {
switch (_local2[0]) {
case "MODEL" :
Compile_Model(_local2, tKey + 1);
break;
case "MESH" :
Compile_Mesh(_local2, tKey + 1);
}
}
_local3++;
}
}
function Compile_Mesh(tCompileList, tKey) {
var _local3 = 1;
while (_local3 < tCompileList.length) {
var _local2 = tCompileList[_local3].split("@" + tKey);
if (_local2.length == 1) {
} else {
switch (_local2[0]) {
case "POSITIONLIST" :
Compile_PositionList(_local2, tKey + 1);
break;
case "POLYGONLIST" :
Compile_PolygonList(_local2, tKey + 1);
}
}
_local3++;
}
}
function Compile_PolygonList(tCompileList, tKey) {
var _local9;
var _local6;
var _local5;
var _local4 = 1;
while (_local4 < tCompileList.length) {
var _local2 = tCompileList[_local4].split("@" + tKey);
if (_local2.length == 1) {
var _local3 = _local2[0].split(":");
switch (_local3[0]) {
case "NAME" :
_local9 = _local3[1];
break;
case "MATERIAL" :
_local6 = _local3[1];
_local5 = scidd.Draw.F3D.CMaterial.newSolidColor(_local6, Compile_GetMaterial(_local6).mColor);
_local5.mBrightnessOffset = 0.25;
mMesh3D.AddMaterial(_local5);
}
} else if (!(_local2[0] === "FACE")) {
} else {
Compile_Face(_local2, tKey + 1, _local5);
}
_local4++;
}
}
function Compile_Face(tCompileList, tKey, tMaterial) {
var _local6 = new Array();
var _local5 = new Array();
var _local3 = 1;
while (_local3 < tCompileList.length) {
var _local4 = tCompileList[_local3].split("@" + tKey);
if (_local4.length == 1) {
var _local2 = _local4[0].split(":");
switch (_local2[0]) {
case "V" :
_local5[_local5.length] = Number(_local2[1]);
break;
case "N" :
_local6[_local6.length] = Number(_local2[1]);
}
}
_local3++;
}
Compile_AddFace(_local5, _local6, tMaterial);
}
function Compile_AddFace(tvlist, tnlist, tMaterial) {
var _local2 = 0;
while (_local2 < tvlist.length) {
tvlist[_local2] = tvlist[_local2] + mVOffset;
_local2++;
}
_local2 = 0;
while (_local2 < tnlist.length) {
tnlist[_local2] = tnlist[_local2] + mNOffset;
_local2++;
}
mMesh3D.AddFace(new scidd.Draw.F3D.CMesh3DFace(tvlist, tnlist, [], tMaterial));
}
function Compile_PositionList(tCompileList, tKey) {
var _local4 = 1;
while (_local4 < tCompileList.length) {
var _local5 = tCompileList[_local4].split("@" + tKey);
if (_local5.length == 1) {
var _local2 = _local5[0].split(":");
switch (_local2[0]) {
case "V" :
var _local3 = _local2[1].split(",");
mMesh3D.AddPosition(new scidd.Math.CVector3(Number(_local3[0]), Number(_local3[1]), Number(_local3[2])));
break;
case "N" :
_local3 = _local2[1].split(",");
mMesh3D.AddNormal(new scidd.Math.CVector3(Number(_local3[0]), Number(_local3[1]), Number(_local3[2])));
}
}
_local4++;
}
}
var _CLASSID_ = "scidd.Draw.F3D.CMesh3D_FromString";
var mJustOnce = true;
var mDebug = true;
}
Symbol 490 MovieClip [__Packages.CRobot_Component] Frame 0
class CRobot_Component extends CThing
{
function CRobot_Component (tArena, tPosition, tRotation) {
super(tArena, tPosition, tRotation);
}
var _CLASSID_ = "CRobot_Component";
}
Symbol 491 MovieClip [__Packages.CRobot_Chassis] Frame 0
class CRobot_Chassis extends CRobot_Component
{
var mCollidable, mRobotColorIndex, mScoreCard, mcArena, mID, mRobotName, mScore, GetThingList, mCommand_CurrentEvent, mCommand_CurrentCommand, _cacheAllEvents, GetAllEvents;
function CRobot_Chassis (tArena, tPosition, tRotation) {
super(tArena, tPosition, tRotation);
mCollidable = true;
mRobotColorIndex = CThing.mCountColorIndex;
CThing.mCountColorIndex++;
mScoreCard = mcArena._parent.attachMovie("ScoreCard", "_ScoreCard" + mID, mcArena._parent.getNextHighestDepth(), {mcArena:mcArena, mThing:this});
mRobotName = "UNNAMED";
mScore = 0;
}
function ProcessCommands() {
var _local2 = GetThingList();
for (var _local4 in _local2) {
_local2[_local4].mCommandToProcess = undefined;
}
mCommand_CurrentEvent = (mCommand_CurrentEvent.mEndOfList ? undefined : (mCommand_CurrentEvent));
var _local3 = Cache_GetAllEvents();
var _local5;
if (_local3.length > 1) {
if (((mCommand_CurrentEvent == undefined) || (_local3[1].mPriority < mCommand_CurrentEvent.mPriority)) || (mCommand_CurrentEvent.mPriority == 0)) {
_local5 = _local3[1];
}
}
if ((mCommand_CurrentEvent == undefined) && (_local5 == undefined)) {
_local5 = _local3[0];
}
if (_local5 != undefined) {
mCommand_CurrentEvent = _local5;
mCommand_CurrentEvent = ((mCommand_CurrentEvent == undefined) ? (_local3[0]) : (mCommand_CurrentEvent));
mCommand_CurrentEvent.Reset();
}
var _local6 = mCommand_CurrentEvent.NextCommand();
mCommand_CurrentCommand = _local6;
_local6.mThing.mCommandToProcess = _local6;
}
function Cache_GetAllEvents() {
if (_cacheAllEvents == undefined) {
_cacheAllEvents = GetAllEvents();
SortEvents();
}
var _local4 = [_cacheAllEvents[0]];
var _local3 = 1;
while (_local3 < _cacheAllEvents.length) {
var _local2 = _cacheAllEvents[_local3];
if (_local2._Trigger == true) {
_local2.ClearTrigger();
if (_local2.mCommandList.length) {
_local4[_local4.length] = _local2;
}
}
_local3++;
}
return(_local4);
}
function SortEvents() {
_cacheAllEvents.sortOn("mPriority", Array.NUMERIC);
var _local2 = 0;
while (_local2 < _cacheAllEvents.length) {
_cacheAllEvents[_local2].mPriority = _local2;
_local2++;
}
}
var _CLASSID_ = "CRobot_Chassis";
var _BASECLASSID_ = "CRobot_Chassis";
var mParentClass = true;
}
Symbol 492 MovieClip [__Packages.CRobot_Chassis1] Frame 0
class CRobot_Chassis1 extends CRobot_Chassis
{
var RegisterCommand, CreateSprite, Attach, mcArena, mID, mPosition, mMaxLife, mLife, mShotsFired, mKills, mDamageInflicted, RenderAsBitmap, Setup_WorldMatrix, mScoreCard, mSprite, mDeath, mTint, mcRender, GetThingList, __get__mIsAlive, ProcessCommands, mRotation, nPosition, nRotation, mCommandToProcess, _cache_Commands, _cache_Command_DetectWall, FindCommand, _cache_Command_DetectEnemy, mScore, UpdateWorldMatrix, Process_Children;
function CRobot_Chassis1 (tArena, tPosition, tRotation) {
super(tArena, tPosition, tRotation);
RegisterCommand(new CCommand_Default(0));
RegisterCommand(new CCommand_HitEnemy(1));
RegisterCommand(new CCommand_HitWall(2));
RegisterCommand(new CCommand_MoveFWD());
RegisterCommand(new CCommand_MoveREV());
RegisterCommand(new CCommand_RotateCW());
RegisterCommand(new CCommand_RotateCCW());
RegisterCommand(new CCommand_MoveFWD10());
RegisterCommand(new CCommand_MoveREV10());
RegisterCommand(new CCommand_RotateCW10());
RegisterCommand(new CCommand_RotateCCW10());
CreateSprite("Chassis", _global.MODEL_Tank_Chassis_2, 360 / mRotationSpeed, undefined, 0.9);
Attach(new CRobot_Turret1(mcArena, CThing.zPoint, 0, mID), new scidd.Math.CVector3(0, 1, 0));
var _local4 = Attach(new CSensor(mcArena, 400, 100, mID, "Component.Chassis.Sensor"), new scidd.Math.CVector3(0.9, 0.5, 0));
_local4.RegisterCommand(new CCommand_DetectPickup(2));
_local4.RegisterCommand(new CCommand_DetectWall(3));
mcArena.mMapWho.Add(this, mPosition);
mMaxLife = (mLife = 99);
mShotsFired = (mKills = (mDamageInflicted = 0));
SetTint();
RenderAsBitmap();
Setup_WorldMatrix();
}
function Dispose() {
super.Dispose();
mScoreCard.Dispose();
}
function SetTint(tColor) {
super.SetTint(tColor);
mScoreCard.SetColorMatrix(mSprite);
}
function Process() {
if (mDeath) {
mDeath = false;
var _local7 = mcArena.AddThing(new CEffect_ExplosionMulti(mcArena, mPosition, mSprite.__get__mHeight2D(), 20, mTint));
mcRender.mcSolid._alpha = 50;
mcRender.mcOutline._visible = false;
mcRender.mcShadow._visible = false;
var _local2 = GetThingList();
for (var _local4 in _local2) {
if (_local2[_local4]._BASECLASSID_ == "CSensor") {
_local2[_local4].mcSort._visible = false;
}
}
mcArena.mMapWho.Remove(this);
}
if (!__get__mIsAlive()) {
return(undefined);
}
if (mcArena.mTick) {
ProcessCommands();
}
var _local5 = mPosition.clone();
var _local8 = mRotation;
nPosition = mPosition.clone();
nRotation = mRotation;
mCommandToProcess.Process(this);
if (_cache_Commands == undefined) {
_cache_Commands = true;
_cache_Command_DetectWall = FindCommand("CCommand_HitWall");
_cache_Command_DetectEnemy = FindCommand("CCommand_HitEnemy");
}
if (nPosition != mPosition) {
var _local3 = false;
var _local6;
if (mcArena.mMap.CircularCollide(nPosition, mSprite.__get__mRadius2D())) {
_local3 = (_cache_Command_DetectWall.mTrigger = true);
nPosition = mPosition.clone();
}
_local6 = mcArena.mMapWho.ThingCollide_Block(this, nPosition);
if (_local6 != undefined) {
switch (_local6._BASECLASSID_) {
case "CPickup" :
_local6.PickedUp();
mScore = mScore + 500;
break;
case "CWall" :
_cache_Command_DetectWall.mTrigger = true;
_local3 = true;
break;
default :
_cache_Command_DetectEnemy.mTrigger = true;
_local3 = true;
}
}
if (!_local3) {
mPosition = nPosition;
if (!mPosition.equals(_local5)) {
mcArena.mMapWho.Move(this, _local5, mPosition);
}
}
}
mRotation = nRotation;
UpdateWorldMatrix(mPosition, mRotation);
Process_Children();
}
var _CLASSID_ = "CRobot_Chassis1";
var mcLinkID_Icon = "Icon.Chassis";
var mHelp_Text = "Component.Chassis";
var mRotationSpeed = 4;
var mMoveSpeed = 6;
}
Symbol 493 MovieClip [__Packages.CCommand_Default] Frame 0
class CCommand_Default extends CCommand_Event
{
function CCommand_Default (tPri) {
super(tPri);
}
function Clone() {
var _local2 = new CCommand_Default();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
}
function Draw() {
}
var _CLASSID_ = "CCommand_Default";
var mcLinkID_Icon = "Icon.Default";
var mHelp_Title = "Default";
var mHelp_Text = "Initial Actions!";
}
Symbol 494 MovieClip [__Packages.CCommand_HitEnemy] Frame 0
class CCommand_HitEnemy extends CCommand_Event
{
function CCommand_HitEnemy (tPri) {
super(tPri);
}
function Clone() {
var _local2 = new CCommand_HitEnemy();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
}
function Draw() {
}
var _CLASSID_ = "CCommand_HitEnemy";
var mcLinkID_Icon = "Icon.HitEnemy";
var mHelp_Title = "Hit Enemy";
var mHelp_Text = "Hit Enemy!";
}
Symbol 495 MovieClip [__Packages.CCommand_HitWall] Frame 0
class CCommand_HitWall extends CCommand_Event
{
function CCommand_HitWall (tPri) {
super(tPri);
}
function Clone() {
var _local2 = new CCommand_HitWall();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
}
function Draw() {
}
var _CLASSID_ = "CCommand_HitWall";
var mcLinkID_Icon = "Icon.HitWall";
var mHelp_Title = "Hit Wall";
var mHelp_Text = "Hit Wall or Edge of Arena!";
}
Symbol 496 MovieClip [__Packages.CCommand_Action] Frame 0
class CCommand_Action extends CCommand
{
var mTick;
function CCommand_Action () {
super();
mTick = 0;
}
function Copy(tCommand) {
super.Copy(tCommand);
}
var _CLASSID_ = "CCommand_Action";
var mAction = true;
var mHelp_Type = "Action";
}
Symbol 497 MovieClip [__Packages.CCommand_MoveFWD] Frame 0
class CCommand_MoveFWD extends CCommand_Action
{
var mTickCount;
function CCommand_MoveFWD () {
super();
mTickCount = 1;
}
function Clone() {
var _local2 = new CCommand_MoveFWD();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
var _local1 = new flash.geom.Matrix();
_local1.rotate((mcParent.mRotation * Math.PI) / 180);
mcParent.nPosition = mcParent.mPosition.add(_local1.transformPoint(new flash.geom.Point(mcParent.mMoveSpeed, 0)));
}
function Draw() {
}
var _CLASSID_ = "CCommand_MoveFWD";
var mcLinkID_Icon = "Icon.MoveFWD";
var mHelp_Title = "Move Forward";
var mHelp_Text = "Move Forward!";
}
Symbol 498 MovieClip [__Packages.CCommand_MoveREV] Frame 0
class CCommand_MoveREV extends CCommand_Action
{
var mTickCount;
function CCommand_MoveREV () {
super();
mTickCount = 1;
}
function Clone() {
var _local2 = new CCommand_MoveREV();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
var _local1 = new flash.geom.Matrix();
_local1.rotate((mcParent.mRotation * Math.PI) / 180);
mcParent.nPosition = mcParent.mPosition.add(_local1.transformPoint(new flash.geom.Point(-mcParent.mMoveSpeed, 0)));
}
function Draw() {
}
var _CLASSID_ = "CCommand_MoveREV";
var mcLinkID_Icon = "Icon.MoveREV";
var mHelp_Title = "Move Backwards";
var mHelp_Text = "Move Backwards!";
}
Symbol 499 MovieClip [__Packages.CCommand_RotateCW] Frame 0
class CCommand_RotateCW extends CCommand_Action
{
var mTickCount;
function CCommand_RotateCW () {
super();
mTickCount = 1;
}
function Clone() {
var _local2 = new CCommand_RotateCW();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
mcParent.nRotation = mcParent.nRotation + mcParent.mRotationSpeed;
}
function Draw() {
}
var _CLASSID_ = "CCommand_RotateCW";
var mcLinkID_Icon = "Icon.RotateCW";
var mHelp_Title = "Rotate CW";
var mHelp_Text = "Rotate Clockwise!";
}
Symbol 500 MovieClip [__Packages.CCommand_RotateCCW] Frame 0
class CCommand_RotateCCW extends CCommand_Action
{
var mTickCount;
function CCommand_RotateCCW () {
super();
mTickCount = 1;
}
function Clone() {
var _local2 = new CCommand_RotateCCW();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
mcParent.nRotation = mcParent.nRotation - mcParent.mRotationSpeed;
}
function Draw() {
}
var _CLASSID_ = "CCommand_RotateCCW";
var mcLinkID_Icon = "Icon.RotateCCW";
var mHelp_Title = "Rotate CCW";
var mHelp_Text = "Rotate Counter-Clockwise!";
}
Symbol 501 MovieClip [__Packages.CCommand_MoveFWD10] Frame 0
class CCommand_MoveFWD10 extends CCommand_Action
{
var mTickCount;
function CCommand_MoveFWD10 () {
super();
mTickCount = 10;
}
function Clone() {
var _local2 = new CCommand_MoveFWD10();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
var _local1 = new flash.geom.Matrix();
_local1.rotate((mcParent.mRotation * Math.PI) / 180);
mcParent.nPosition = mcParent.mPosition.add(_local1.transformPoint(new flash.geom.Point(mcParent.mMoveSpeed, 0)));
}
function Draw() {
}
var _CLASSID_ = "CCommand_MoveFWD10";
var mcLinkID_Icon = "Icon.MoveFWD10";
var mHelp_Title = "Move Forward";
var mHelp_Text = "Move Forwards x10!";
}
Symbol 502 MovieClip [__Packages.CCommand_MoveREV10] Frame 0
class CCommand_MoveREV10 extends CCommand_Action
{
var mTickCount;
function CCommand_MoveREV10 () {
super();
mTickCount = 10;
}
function Clone() {
var _local2 = new CCommand_MoveREV10();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
var _local1 = new flash.geom.Matrix();
_local1.rotate((mcParent.mRotation * Math.PI) / 180);
mcParent.nPosition = mcParent.mPosition.add(_local1.transformPoint(new flash.geom.Point(-mcParent.mMoveSpeed, 0)));
}
function Draw() {
}
var _CLASSID_ = "CCommand_MoveREV10";
var mcLinkID_Icon = "Icon.MoveREV10";
var mHelp_Title = "Move Backwards";
var mHelp_Text = "Move Backwards x10!";
}
Symbol 503 MovieClip [__Packages.CCommand_RotateCW10] Frame 0
class CCommand_RotateCW10 extends CCommand_Action
{
var mTickCount;
function CCommand_RotateCW10 () {
super();
mTickCount = 10;
}
function Clone() {
var _local2 = new CCommand_RotateCW10();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
mcParent.nRotation = mcParent.nRotation + mcParent.mRotationSpeed;
}
function Draw() {
}
var _CLASSID_ = "CCommand_RotateCW10";
var mcLinkID_Icon = "Icon.RotateCW10";
var mHelp_Text = "Rotate Clockwise x10!";
}
Symbol 504 MovieClip [__Packages.CCommand_RotateCCW10] Frame 0
class CCommand_RotateCCW10 extends CCommand_Action
{
var mTickCount;
function CCommand_RotateCCW10 () {
super();
mTickCount = 10;
}
function Clone() {
var _local2 = new CCommand_RotateCCW10();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
mcParent.nRotation = mcParent.nRotation - mcParent.mRotationSpeed;
}
function Draw() {
}
var _CLASSID_ = "CCommand_RotateCCW10";
var mcLinkID_Icon = "Icon.RotateCCW10";
var mHelp_Title = "Rotate CCW10";
var mHelp_Text = "Rotate Counter-Clockwise x10!";
}
Symbol 505 MovieClip [__Packages.CRobot_Turret] Frame 0
class CRobot_Turret extends CRobot_Component
{
var mReloadTick;
function CRobot_Turret (tArena, tPosition, tRotation) {
super(tArena, tPosition, tRotation);
mReloadTick = -100;
}
function Process() {
}
var _CLASSID_ = "CRobot_Turret";
var _BASECLASSID_ = "CRobot_Turret";
var mHelp_Title = "Component.Turret";
}
Symbol 506 MovieClip [__Packages.CRobot_Turret1] Frame 0
class CRobot_Turret1 extends CRobot_Turret
{
var mID, RegisterCommand, CreateSprite, mcSensor, Attach, mcArena, Setup_WorldMatrix, UpdateWorldMatrix, mPosition, mRotation, mReload, mShotsFired, nRotation, mCommandToProcess, mShot, Process_Children, mReloadTick, _WorldMatrix, GetWorldRotation, PlaySound, GetParentByID;
function CRobot_Turret1 (tArena, tPosition, tRotation, tID) {
super(tArena, tPosition, tRotation);
mID = tID;
RegisterCommand(new CCommand_WeaponFire());
RegisterCommand(new CCommand_RotateCW());
RegisterCommand(new CCommand_RotateCCW());
RegisterCommand(new CCommand_RotateCW10());
RegisterCommand(new CCommand_RotateCCW10());
CreateSprite("TURRET", _global.MODEL_Tank_Turret_2, 360 / mRotationSpeed, undefined, 0.9);
mcSensor = Attach(new CSensor(mcArena, mSensorLength, (100 * mSensorLength) / 400, mID, "Component.Turret.Sensor"), new scidd.Math.CVector3(0.9, 0.5, 0));
mcSensor.RegisterCommand(new CCommand_DetectEnemy(1));
Setup_WorldMatrix();
UpdateWorldMatrix(mPosition, mRotation);
mReload = true;
mShotsFired = 0;
}
function Process() {
var _local2 = mRotation;
nRotation = mRotation;
mCommandToProcess.Process(this);
if (mShot.mFinished) {
mShot.mDelete = true;
mReload = true;
delete mShot;
}
mRotation = nRotation;
UpdateWorldMatrix(mPosition, mRotation);
Process_Children();
}
function Fire() {
if ((mcArena.mTick >= (mReloadTick + mReloadTime)) && (mReload)) {
mReloadTick = mcArena.mTick;
mShot = mcArena.AddThing(new CShot1(mcArena, _WorldMatrix.transformPoint(mcSensor.mPosition), GetWorldRotation(), mcSensor.mAttachHeight, this, (mSensorLength * CArena.mScale) * 1.25));
PlaySound(CSound.mCombot_Shot);
mReload = false;
GetParentByID(mID).mShotsFired++;
}
}
var _CLASSID_ = "CRobot_Turret1";
var mcLinkID_Icon = "Icon.Turret";
var mHelp_Text = "Component.Turret";
var mRotationSpeed = 4;
var mReloadTime = 5;
var mSensorLength = 600;
}
Symbol 507 MovieClip [__Packages.CCommand_WeaponFire] Frame 0
class CCommand_WeaponFire extends CCommand_Action
{
function CCommand_WeaponFire () {
super();
}
function Clone() {
var _local2 = new CCommand_WeaponFire();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
mcParent.Fire();
}
function Draw() {
}
var _CLASSID_ = "CCommand_WeaponFire";
var mcLinkID_Icon = "Icon.WeaponFire";
var mHelp_Title = "Fire Weapon";
var mHelp_Text = "Fire Weapon";
}
Symbol 508 MovieClip [__Packages.CSensor] Frame 0
class CSensor extends CThing
{
var mID, mLength, mWidth, mcArena, mcDraw, Setup_WorldMatrix, UpdateWorldMatrix, mPosition, mRotation, mAdjustLength, _cache_Commands, _cache_Command_DetectWall, FindCommand, _cache_Command_DetectEnemy, _cache_Command_DetectPickup, ShapeToWorld, _AttachHeight, mDrawColorCode, __get__mColorCode, mDrawRotation, mColorCode;
function CSensor (tArena, tLength, tWidth, tID, tHelpText) {
super(tArena, CThing.zPoint, 0);
mID = tID;
mHelp_Text = tHelpText;
mLength = tLength * CArena.mScale;
tWidth = 20;
mWidth = tWidth * CArena.mScale;
var _local3 = mcArena.mcThingPlane;
var _local4 = _local3.getNextHighestDepth();
mcDraw = _local3.createEmptyMovieClip(_CLASSID_ + _local4, _local4);
Setup_WorldMatrix();
UpdateWorldMatrix(mPosition, mRotation);
Render();
}
function Dispose() {
}
function Process() {
mAdjustLength = mLength;
if (_cache_Commands == undefined) {
_cache_Commands = true;
_cache_Command_DetectWall = FindCommand("CCommand_DetectWall");
_cache_Command_DetectEnemy = FindCommand("CCommand_DetectEnemy");
_cache_Command_DetectPickup = FindCommand("CCommand_DetectPickup");
}
UpdateWorldMatrix(mPosition, mRotation);
var _local2 = ShapeToWorld([new flash.geom.Point(0, 0), new flash.geom.Point(mAdjustLength, 0)]);
if (mcArena.mMap.PointInMap(_local2[0]) == false) {
mAdjustLength = 0;
_cache_Command_DetectWall.mTrigger = true;
} else {
var _local4 = mcArena.mMap.LineCollide(_local2[0], _local2[1], _AttachHeight);
if (_local4 != undefined) {
_local2[1] = _local4;
_cache_Command_DetectWall.mTrigger = true;
}
var _local3 = mcArena.mMapWho.ThingCollide_LineClosest(this, _local2[0], _local2[1]);
if (_local3.mEffectPOI != undefined) {
_local2[1] = _local3.mEffectPOI;
switch (_local3._BASECLASSID_) {
case "CRobot_Chassis" :
case "CDroid" :
_cache_Command_DetectEnemy.mTrigger = true;
break;
case "CWall" :
_cache_Command_DetectWall.mTrigger = true;
break;
case "CPickup" :
_cache_Command_DetectPickup.mTrigger = true;
}
}
mAdjustLength = flash.geom.Point.distance(_local2[0], _local2[1]);
}
if (__get__mColorCode() != mDrawColorCode) {
Render();
}
}
function Draw() {
super.Draw();
mcDraw.mcRotate._xscale = (mAdjustLength / mLength) * 100;
mcDraw.mcRotate._rotation = ((mDrawRotation * 180) / Math.PI) + 180;
}
function Render() {
var _local2 = [new flash.geom.Point(0, 0), new flash.geom.Point(mLength, (-mWidth) / 2), new flash.geom.Point(mLength, mWidth / 2)];
var _local4 = _local2[1].subtract(_local2[0]);
var _local3 = _local2[2].subtract(_local2[0]);
if (mcDraw.mcScale == undefined) {
mcDraw.mcScale = mcDraw.createEmptyMovieClip("_mcScale", 1);
mcDraw.mcRotate = mcDraw.mcScale.createEmptyMovieClip("_mcRotate", 1);
mcDraw.mcScale._yscale = CArena.mProjection.Transform_Z(100);
}
mcDraw.mcRotate.clear();
mcDraw.mcRotate.beginFill(((__get__mColorCode() == undefined) ? 16711680 : (__get__mColorCode())), 100);
mcDraw.mcRotate.moveTo(0, 0);
mcDraw.mcRotate.lineTo(_local4.x, CArena.mProjection.Transform_Z(_local4.y));
mcDraw.mcRotate.lineTo(_local3.x, CArena.mProjection.Transform_Z(_local3.y));
mcDraw.mcRotate.lineTo(0, 0);
mcDraw.mcRotate.endFill();
mcDraw.mcRotate.cacheAsBitmap = true;
mDrawColorCode = mColorCode;
}
var _CLASSID_ = "CSensor";
var _BASECLASSID_ = "CSensor";
var mcLinkID_Icon = "Sensor.Icon";
var mHelp_Text = "Sensor";
}
Symbol 509 MovieClip [__Packages.CCommand_DetectEnemy] Frame 0
class CCommand_DetectEnemy extends CCommand_Event
{
function CCommand_DetectEnemy (tPri) {
super(tPri);
}
function Clone() {
var _local2 = new CCommand_DetectEnemy();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
}
function Draw() {
}
var _CLASSID_ = "CCommand_DetectEnemy";
var mcLinkID_Icon = "Icon.DetectEnemy";
var mHelp_Title = "Detect Enemy";
var mHelp_Text = "Detected Enemy!";
}
Symbol 510 MovieClip [__Packages.CShot] Frame 0
class CShot extends CThing
{
var mcArena, mcDraw;
function CShot (tArena, tPosition, tRotation) {
super(tArena, tPosition, tRotation);
var _local3 = mcArena.mcThingPlane;
var _local4 = _local3.getNextHighestDepth();
mcDraw = _local3.createEmptyMovieClip("_DRAW" + _local4, _local4);
}
function Dispose() {
mcDraw.removeMovieClip();
}
var _CLASSID_ = "CShot";
var _BASECLASSID_ = "CShot";
}
Symbol 511 MovieClip [__Packages.CShot1] Frame 0
class CShot1 extends CShot
{
var mDirectParent, mID, __set__mAttachHeight, mDelta, RotationToDelta, mLife, mTint, mFinished, mDelete, mPosition, mcDraw, mcArena, __get__mAttachHeight, ApplyDamage, Draw;
function CShot1 (tArena, tPosition, tRotation, tHeight, tTurret, tDistance) {
super(tArena, tPosition, tRotation);
mDirectParent = tTurret;
mID = mDirectParent.mID;
__set__mAttachHeight(tHeight);
mDelta = RotationToDelta(mSpeed);
mLife = Math.round(tDistance / mSpeed);
mTint = mDirectParent.mTint;
Render();
Shot_Collide();
}
function Process() {
if (mFinished || (mDelete)) {
mDelete = true;
return(undefined);
}
if ((--mLife) <= 0) {
mFinished = true;
}
mPosition = mPosition.add(mDelta);
Shot_Collide();
if (mFinished) {
mcDraw._visible = false;
var _local2 = mcArena.AddThing(new CEffect_Explosion(mcArena, mPosition.subtract(mDelta), __get__mAttachHeight(), mTint));
_local2.mID = mID;
}
}
function Shot_Collide() {
if (mcArena.mMap.PointCollide(mPosition)) {
mFinished = true;
}
if (mFinished != true) {
var _local2 = mcArena.mMapWho.ThingCollide_Block(this, mPosition, true, 1);
if (_local2 != undefined) {
switch (_local2._BASECLASSID_) {
case "CRobot_Chassis" :
case "CDroid" :
ApplyDamage(_local2, mDamage);
break;
}
mFinished = true;
}
}
}
function Render() {
mcDraw.cacheAsBitmap = true;
mcDraw.clear();
var _local3 = CThing.zPoint.clone();
var _local2 = CThing.zPoint.add(mDelta);
mcDraw.lineStyle(12, mTint, 50);
mcDraw.moveTo(_local3.x, CArena.mProjection.Transform_Z(_local3.y));
mcDraw.lineTo(_local2.x, CArena.mProjection.Transform_Z(_local2.y));
mcDraw.lineStyle(10, mTint, 100);
mcDraw.moveTo(_local3.x, CArena.mProjection.Transform_Z(_local3.y));
mcDraw.lineTo(_local2.x, CArena.mProjection.Transform_Z(_local2.y));
mcDraw.filters = [new flash.filters.GlowFilter(mTint, 100, 8, 8, 1.1, 1, false, false)];
mcDraw.cacheAsBitmap = true;
Draw();
}
var _CLASSID_ = "CShot1";
static var mSpeed = 10;
static var mDamage = 10;
var mLinkID_Shot = "Shot.1";
}
Symbol 512 MovieClip [__Packages.CEffect] Frame 0
class CEffect extends CThing
{
var mcDraw;
function CEffect (tArena, tPosition, tRotation) {
super(tArena, tPosition, tRotation);
}
function Dispose() {
mcDraw.removeMovieClip();
}
function Process() {
}
var _CLASSID_ = "CEffect";
var _BASECLASSID_ = "CEffect";
}
Symbol 513 MovieClip [__Packages.CEffect_Explosion] Frame 0
class CEffect_Explosion extends CEffect
{
var mTint, mcArena, mcDraw, __set__mAttachHeight, mDelete;
function CEffect_Explosion (tArena, tPosition, tHeight, tTint) {
super(tArena, tPosition, 0);
mTint = tTint;
var _local3 = mcArena.mcThingPlane;
var _local4 = _local3.getNextHighestDepth();
mcDraw = _local3.attachMovie(mLinkID_Effect, "_DRAW" + _local4, _local4);
mcDraw.stop();
if (mTint != undefined) {
mcDraw.filters = [scidd.Draw.CColor.GetColorMatrixFilter(scidd.Draw.CColor.ColorMatrix_Colorize(scidd.Draw.CColor.FromRGB(mTint), 1, 1))];
}
__set__mAttachHeight(tHeight);
CSound.mShot_Impact.PlaySound();
}
function Process() {
super.Process();
if ((mcDraw._currentframe == mcDraw._totalframes) || (mcDraw._currentframe == 0)) {
mDelete = true;
}
mcDraw.nextFrame();
}
function Draw() {
super.Draw();
}
var _CLASSID_ = "CEffect_Explosion";
var mLinkID_Effect = "Effect.Explosion";
}
Symbol 514 MovieClip [__Packages.CSound] Frame 0
class CSound
{
static var mSound, mSoundList, mProcessList, mClick, mCombot_Destroyed, mCombot_Fire2, mCombot_Fire, mCombot_Move, mCombot_Rotate, mCombot_Shot, mCombot_Turret_Rotate, mDroid_Destroyed, mShot_Impact2, mShot_Impact, mPickup, mStart_Arena, mEnd_Arena, mDebrief_Score, mRunningOutOfTime, mSong1_Track1, mSong1_Track2, mSong1_Track3, mCurrentAtmosphere, mAtmosphere;
var mcParent;
function CSound (tParent) {
mSound = this;
var _local3 = new Sound();
mSoundList = new Array();
mProcessList = new Array();
mcParent = tParent;
var _local2 = mcParent.getNextHighestDepth() + 100;
var _local4 = mcParent.createEmptyMovieClip("DUMMYMC", _local2);
mClick = RegisterSound("sfx", "CLICK.wav", 1, PlaySound_Positional, StopSound_Normal);
mCombot_Destroyed = RegisterSound("sfx", "Combot_Destroyed.wav", 1, PlaySound_Positional, StopSound_Normal);
mCombot_Fire2 = RegisterSound("sfx", "Combot.Fire.2.wav", 1, PlaySound_Positional, StopSound_Normal);
mCombot_Fire = RegisterSound("sfx", "Combot.Fire.wav", 1, PlaySound_Positional, StopSound_Normal);
mCombot_Move = RegisterSound("sfx", "Combot.Move.wav", 1, PlaySound_Positional, StopSound_Normal);
mCombot_Rotate = RegisterSound("sfx", "Combot.Rotate.wav", 1, PlaySound_Positional, StopSound_Normal);
mCombot_Shot = RegisterSound("sfx", "Combot.Shot.wav", 1, PlaySound_Positional, StopSound_Normal);
mCombot_Turret_Rotate = RegisterSound("sfx", "Combot.Turret.Rotate.wav", 1, PlaySound_Positional, StopSound_Normal);
mDroid_Destroyed = RegisterSound("sfx", "Droid.Destroyed.wav", 1, PlaySound_Positional, StopSound_Normal);
mShot_Impact2 = RegisterSound("sfx", "Shot.Impact.2.wav", 1, PlaySound_Positional, StopSound_Normal);
mShot_Impact = RegisterSound("sfx", "Shot.Impact.wav", 1, PlaySound_Positional, StopSound_Normal);
mPickup = RegisterSound("sfx", "Pickup.wav", 1, PlaySound_Positional, StopSound_Normal);
mStart_Arena = RegisterSound("sfx", "Start.Arena.wav", 1, PlaySound_Normal, StopSound_Normal);
mEnd_Arena = RegisterSound("sfx", "End.Arena.wav", 1, PlaySound_Normal, StopSound_Normal);
mDebrief_Score = RegisterSound("sfx", "Debrief.Score.wav", 1, PlaySound_Normal, StopSound_Normal);
mRunningOutOfTime = RegisterSound("sfx", "RunningOutOfTime.wav", 1, PlaySound_VolumeAndLoop, StopSound_Normal);
mSong1_Track1 = RegisterSound("music", "Song1.Track1.wav", 1, PlaySound_FadeInAndLoop, StopSound_FadeInAndLoop);
mSong1_Track2 = RegisterSound("music", "Song1.Track2.wav", 0.9, PlaySound_FadeInAndLoop, StopSound_FadeInAndLoop);
mSong1_Track3 = RegisterSound("music", "Song1.Track3.wav", 0.9, PlaySound_FadeInAndLoop, StopSound_FadeInAndLoop);
}
function StopAll(tType) {
mProcessList = new Array();
for (var _local3 in mSoundList) {
if ((mSoundList[_local3].mType == tType) || (tType == undefined)) {
StopSound(mSoundList[_local3]);
}
}
}
static function Pause() {
for (var _local1 in mSoundList) {
mSoundList[_local1].mPaused = mSoundList[_local1].mPlaying;
if (mSoundList[_local1].mPaused) {
mSoundList[_local1].mPosition = mSoundList[_local1].oSound.position;
mSoundList[_local1].oSound.stop();
}
}
}
static function unPause() {
for (var _local1 in mSoundList) {
if (mSoundList[_local1].mPaused) {
mSoundList[_local1].oSound.start(((mSoundList[_local1].mLoops > 1) ? 0 : (mSoundList[_local1].mPosition / 1000)), mSoundList[_local1].mLoops);
}
}
}
static function SoundActive(tState) {
mSFXActive = tState;
if (!mSFXActive) {
mSound.StopAll("sfx");
}
}
static function MusicActive(tState) {
mMUSICActive = tState;
if (!mMUSICActive) {
mSound.StopAll("music");
}
}
function RegisterSound(tType, tLinkID, tVolLevel, fPlay, fStop) {
var _local3 = mcParent.getNextHighestDepth();
var _local2 = mcParent.createEmptyMovieClip("Sound" + _local3, _local3);
_local2.oSound = new Sound(_local2);
_local2.oSound.attachSound(tLinkID);
_local2.oSound.pClass = _local2;
_local2.oSound.onSoundComplete = function () {
this.pClass.mPlaying = false;
};
_local2.mVolumeLevel = tVolLevel;
_local2.mLinkID = tLinkID;
_local2.PlaySound = fPlay;
_local2.StopSound = fStop;
_local2.mPlaying = false;
_local2.pClass = this;
_local2._visible = false;
_local2.mType = tType;
mSoundList[mSoundList.length] = _local2;
return(_local2);
}
function PlaySound(tItem, secOffset, nLoop) {
if (((tItem.mType == "sfx") && (!mSFXActive)) || ((tItem.mType == "music") && (!mMUSICActive))) {
return(undefined);
}
tItem.mPlaying = true;
tItem.mLoops = ((nLoop == undefined) ? 1 : (nLoop));
tItem.oSound.start(((secOffset == undefined) ? 0 : (secOffset)), tItem.mLoops);
}
function StopSound(tItem) {
tItem.mPlaying = false;
tItem.oSound.stop();
tItem.mPaused = false;
RemoveFromProcessList(tItem);
}
function SetVolume(tItem, vol) {
tItem.oSound.setVolume(vol * tItem.mVolumeLevel);
}
function SetPan(tItem, pan) {
tItem.oSound.setPan(pan);
}
function PlaySound_Normal(tVolume) {
tVolume = ((tVolume == undefined) ? 100 : (int(scidd.Math.CMath.Range(tVolume, 0, 100))));
var _local2 = this;
if (_local2.mPlaying) {
_local2.pClass.StopSound(_local2);
}
_local2.pClass.SetVolume(_local2, tVolume);
_local2.pClass.PlaySound(_local2);
}
function StopSound_Normal() {
var _local2 = this;
_local2.pClass.StopSound(_local2);
}
function PlaySound_Positional(p) {
p = ((p == undefined) ? (new flash.geom.Point(_root._xmouse, _root._ymouse)) : (p));
var _local6 = scidd.Math.CMath.Range((p.x - (CTankCommand.mScreenSize.x / 2)) / 50, -100, 100);
var _local4 = scidd.Math.CMath.Range(1000 - flash.geom.Point.distance(p, new flash.geom.Point(CTankCommand.mScreenSize.x / 2, CTankCommand.mScreenSize.y / 2)), 0, 1000) / 10;
_local4 = ((_local4 == undefined) ? 100 : (int(scidd.Math.CMath.Range(_local4, 0, 100))));
var _local3 = this;
if (_local3.mPlaying) {
_local3.pClass.StopSound(_local3);
}
_local3.pClass.SetVolume(_local3, _local4);
_local3.pClass.PlaySound(_local3);
}
function PlaySound_Velocity(tVelocity) {
tVelocity = ((tVelocity == undefined) ? 1 : (scidd.Math.CMath.Range(tVelocity, 0, 1)));
if (tVelocity <= 0.1) {
return(undefined);
}
var _local2 = this;
var _local4 = (_local2.oSound.duration / 1000) * (1 - tVelocity);
_local2.pClass.SetVolume(_local2, 100);
_local2.pClass.PlaySound(_local2, _local4);
}
function PlaySound_VolumeAndLoop(tVolume) {
var _local2 = this;
_local2.pClass.SetVolume(_local2, ((tVolume == undefined) ? 100 : (tVolume)));
if (!_local2.mPlaying) {
_local2.pClass.PlaySound(_local2, 0, 100000);
}
}
function PlaySound_FadeInAndLoop() {
var _local2 = this;
if (((_local2.mType == "sfx") && (!mSFXActive)) || ((_local2.mType == "music") && (!mMUSICActive))) {
return(undefined);
}
if (!_local2.mPlaying) {
_local2.pClass.AddToProcessList(_local2);
_local2.pClass.SetVolume(_local2, 0);
_local2.pClass.PlaySound(_local2, 0, 100000);
}
_local2.mAction = "fadein";
}
function StopSound_FadeInAndLoop() {
var _local2 = this;
_local2.mAction = "fadeout";
}
static function ProcessAll() {
for (var _local1 in mProcessList) {
Process(mProcessList[_local1]);
}
}
static function Process(tItem) {
var _local3 = 5;
var _local2 = 5;
switch (tItem.mAction) {
case "fadeout" :
var _local4 = (((tItem.oSound.getVolume() - _local2) < 0) ? 0 : (tItem.oSound.getVolume() - _local2));
tItem.pClass.SetVolume(tItem, _local4);
if (_local4 == 0) {
tItem.pClass.StopSound(tItem);
}
break;
case "fadein" :
_local4 = (((tItem.oSound.getVolume() + _local3) > 100) ? 100 : (tItem.oSound.getVolume() + _local3));
tItem.pClass.SetVolume(tItem, _local4);
if (_local4 != 100) {
break;
}
tItem.mAction = "none";
}
}
function AddToProcessList(tItem) {
for (var _local2 in mProcessList) {
if (mProcessList[_local2] == tItem) {
return(undefined);
}
}
mProcessList[mProcessList.length] = tItem;
}
function RemoveFromProcessList(tItem) {
for (var _local2 in mProcessList) {
if (mProcessList[_local2] == tItem) {
mProcessList.splice(_local2, 1);
return(undefined);
}
}
}
function InitAtmosphere() {
}
static function Atmosphere_Start(tIndex) {
if (!mSFXActive) {
return(undefined);
}
if (mCurrentAtmosphere != undefined) {
return(undefined);
}
mCurrentAtmosphere = mAtmosphere[tIndex];
mCurrentAtmosphere.mLoop.mSound.PlaySound();
mCurrentAtmosphere.mTimeStamp = getTimer();
mCurrentAtmosphere.mChannels = new Array(2);
var _local1 = 0;
while (_local1 < mCurrentAtmosphere.mChannels.length) {
mCurrentAtmosphere.mChannels[_local1] = new Object();
mCurrentAtmosphere.mChannels[_local1].mCurrentSound = undefined;
mCurrentAtmosphere.mChannels[_local1].mStartTS = undefined;
mCurrentAtmosphere.mChannels[_local1].mStopTS = undefined;
mCurrentAtmosphere.mChannels[_local1].mDelayTS = getTimer() + ((random(10) + 10) * 1000);
_local1++;
}
}
static function Atmosphere_Stop() {
if (mCurrentAtmosphere == undefined) {
return(undefined);
}
mCurrentAtmosphere.mPaused = false;
mCurrentAtmosphere.mLoop.mSound.StopSound();
var _local1 = 0;
while (_local1 < mCurrentAtmosphere.mChannels.length) {
if (mCurrentAtmosphere.mChannels[_local1].mCurrentSound != undefined) {
mCurrentAtmosphere.mChannels[_local1].mCurrentSound.mSound.StopSound();
mCurrentAtmosphere.mChannels[_local1].mCurrentSound = undefined;
}
_local1++;
}
mCurrentAtmosphere = undefined;
}
static function Atmosphere_Process() {
if ((mCurrentAtmosphere == undefined) || (mCurrentAtmosphere.mPaused == true)) {
return(undefined);
}
if (mCurrentAtmosphere.mLoop.mSound.mPlaying == false) {
mCurrentAtmosphere.mLoop.mSound.PlaySound();
}
var _local4 = mCurrentAtmosphere.mSFX;
var _local3 = 0;
var _local2 = 0;
while (_local2 < mCurrentAtmosphere.mChannels.length) {
var _local1 = mCurrentAtmosphere.mChannels[_local2];
if (_local1.mCurrentSound == undefined) {
if (_local1.mDelayTS != undefined) {
if (getTimer() > _local1.mDelayTS) {
_local1.mCurrentSound = mCurrentAtmosphere.mSFX[random(mCurrentAtmosphere.mSFX.length)];
_local1.mCurrentSound.mSound.PlaySound();
_local1.mCurrentSound.mSound.oSound.setPan(random(200) - 100);
_local1.mDelayTS = undefined;
_local1.mStartTS = getTimer();
_local1.mTimeOut = getTimer() + ((5 + random(20)) * 1000);
}
}
} else if (_local1.mCurrentSound.mSound.mPlaying == false) {
_local1.mCurrentSound = undefined;
_local1.mStopTS = getTimer();
_local1.mDelayTS = getTimer() + random(15000);
} else if ((_local1.mTimeOut != undefined) && (getTimer() > _local1.mTimeOut)) {
_local1.mTimeOut = undefined;
_local1.mCurrentSound.mSound.StopSound();
}
_local2++;
}
}
static function Atmosphere_Pause() {
mCurrentAtmosphere.mPaused = true;
}
static function Atmosphere_unPause() {
mCurrentAtmosphere.mPaused = false;
}
var _CLASSID_ = "CSound";
static var mSFXActive = true;
static var mMUSICActive = true;
}
Symbol 515 MovieClip [__Packages.CSaveData] Frame 0
class CSaveData
{
static var obj, mSharedObject;
var _CombotListCode, _HouseCombotListCode, _ChallengerCombotListCode, _Username, _Compete_CombotCode1, _Compete_CombotCode2, _Compete_CombotCode3, _Compete_CombotCode4;
function CSaveData () {
obj = this;
var _local2 = new Array("comBOT 1", "comBOT 2", "comBOT 3", "comBOT 4");
_CombotListCode = new Array(CCommand_Compiler.Encode_RobotName(_local2[0]), CCommand_Compiler.Encode_RobotName(_local2[1]), CCommand_Compiler.Encode_RobotName(_local2[2]), CCommand_Compiler.Encode_RobotName(_local2[3]));
_HouseCombotListCode = ["EF0FC4F60C2BA30C3889CDABB81D56CBBCA15E1DB8", "BC2AD2CF8C389F7B50ADEE9279A7DC7B", "9D2FC423BF6ADFAE7AE45CA8AF2", "E0294AD6FB3CDF83242767BA6135C7CB581856A"];
_ChallengerCombotListCode = [];
mCombotActiveIndex = (0);
mCompete_CombotCode1 = (0);
mCompete_CombotCode2 = (4);
mCompete_CombotCode3 = (5);
mCompete_CombotCode4 = (6);
}
function Dispose() {
}
function set mUsername(a) {
mSharedObject.data.mUsername = (_Username = a);
SaveData();
//return(mUsername);
}
function get mUsername() {
return(((mSharedObject.data.mUsername == undefined) ? (_Username) : (mSharedObject.data.mUsername)));
}
function set mMusicActive(a) {
mSharedObject.data.mMusicActive = (_MusicActive = a);
SaveData();
//return(mMusicActive);
}
function get mMusicActive() {
return(((mSharedObject.data.mMusicActive == undefined) ? (_MusicActive) : (mSharedObject.data.mMusicActive)));
}
function set mSoundActive(a) {
mSharedObject.data.mSoundActive = (_SoundActive = a);
SaveData();
//return(mSoundActive);
}
function get mSoundActive() {
return(((mSharedObject.data.mSoundActive == undefined) ? (_SoundActive) : (mSharedObject.data.mSoundActive)));
}
function set mDetail(a) {
mSharedObject.data.mDetail = (_Detail = a);
SaveData();
//return(mDetail);
}
function get mDetail() {
return(((mSharedObject.data.mDetail == undefined) ? (_Detail) : (mSharedObject.data.mDetail)));
}
function set mArenaScale(a) {
mSharedObject.data.mArenaScale = (_ArenaScale = a);
SaveData();
//return(mArenaScale);
}
function get mArenaScale() {
return(((mSharedObject.data.mArenaScale == undefined) ? (_ArenaScale) : (mSharedObject.data.mArenaScale)));
}
function set mCombotActiveIndex(a) {
mSharedObject.data.mCombotActiveIndex = (_CombotActiveIndex = a);
SaveData();
//return(mCombotActiveIndex);
}
function get mCombotActiveIndex() {
return(((mSharedObject.data.mCombotActiveIndex == undefined) ? (_CombotActiveIndex) : (mSharedObject.data.mCombotActiveIndex)));
}
function GetMyCombots() {
return(((mSharedObject.data.mCombotListCode == undefined) ? (_CombotListCode) : (mSharedObject.data.mCombotListCode)));
}
function GetHouseCombots() {
return(((mSharedObject.data.mHouseCombotListCode == undefined) ? (_HouseCombotListCode) : (mSharedObject.data.mHouseCombotListCode)));
}
function GetChallengerCombots() {
return(((mSharedObject.data.mChallengerCombotListCode == undefined) ? (_ChallengerCombotListCode) : (mSharedObject.data.mChallengerCombotListCode)));
}
function SetCodeForMyCombot(tIndex, tCode) {
if (tIndex < _CombotListCode.length) {
_CombotListCode[tIndex] = tCode;
mSharedObject.data.mCombotListCode = _CombotListCode;
SaveData();
}
}
function GetCodeForMyCombot(tIndex) {
if (tIndex < _CombotListCode.length) {
return(((mSharedObject.data.mCombotListCode == undefined) ? (_CombotListCode[tIndex]) : (mSharedObject.data.mCombotListCode[tIndex])));
}
return("GetCodeForMyCombot::ERROR Index out of scope!");
}
function Combot_IndexToCode(tIndex) {
var _local2 = GetMyCombots().concat(GetHouseCombots().concat(GetChallengerCombots()));
if (tIndex >= _local2.length) {
return("");
}
return(_local2[tIndex]);
}
function SetChallengerCombot(tIndex, tCode) {
_ChallengerCombotListCode[tIndex] = tCode;
mSharedObject.data.mChallengerCombotListCode = _ChallengerCombotListCode;
SaveData();
}
function set mCompete_OptionPickups(a) {
mSharedObject.data.mCompete_OptionPickups = (_Compete_OptionPickups = a);
SaveData();
//return(mCompete_OptionPickups);
}
function get mCompete_OptionPickups() {
return(((mSharedObject.data.mCompete_OptionPickups == undefined) ? (_Compete_OptionPickups) : (mSharedObject.data.mCompete_OptionPickups)));
}
function set mCompete_OptionWalls(a) {
mSharedObject.data.mCompete_OptionWalls = (_Compete_OptionWalls = a);
SaveData();
//return(mCompete_OptionWalls);
}
function get mCompete_OptionWalls() {
return(((mSharedObject.data.mCompete_OptionWalls == undefined) ? (_Compete_OptionWalls) : (mSharedObject.data.mCompete_OptionWalls)));
}
function set mCompete_OptionDroids(a) {
mSharedObject.data.mCompete_OptionDroids = (_Compete_OptionDroids = a);
SaveData();
//return(mCompete_OptionDroids);
}
function get mCompete_OptionDroids() {
return(((mSharedObject.data.mCompete_OptionDroids == undefined) ? (_Compete_OptionDroids) : (mSharedObject.data.mCompete_OptionDroids)));
}
function set mCompete_OptionTimeLimit(a) {
mSharedObject.data.mCompete_OptionTimeLimit = (_Compete_OptionTimeLimit = a);
SaveData();
//return(mCompete_OptionTimeLimit);
}
function get mCompete_OptionTimeLimit() {
return(((mSharedObject.data.mCompete_OptionTimeLimit == undefined) ? (_Compete_OptionTimeLimit) : (mSharedObject.data.mCompete_OptionTimeLimit)));
}
function set mCompete_ArenaIndex(a) {
mSharedObject.data.mCompete_ArenaIndex = (_Compete_ArenaIndex = a);
SaveData();
//return(mCompete_ArenaIndex);
}
function get mCompete_ArenaIndex() {
return(((mSharedObject.data.mCompete_ArenaIndex == undefined) ? (_Compete_ArenaIndex) : (mSharedObject.data.mCompete_ArenaIndex)));
}
function set mCompete_CombotCode1(a) {
mSharedObject.data.mCompete_CombotCode1 = (_Compete_CombotCode1 = a);
SaveData();
//return(mCompete_CombotCode1);
}
function get mCompete_CombotCode1() {
return(((mSharedObject.data.mCompete_CombotCode1 == undefined) ? (_Compete_CombotCode1) : (mSharedObject.data.mCompete_CombotCode1)));
}
function set mCompete_CombotCode2(a) {
mSharedObject.data.mCompete_CombotCode2 = (_Compete_CombotCode2 = a);
SaveData();
//return(mCompete_CombotCode2);
}
function get mCompete_CombotCode2() {
return(((mSharedObject.data.mCompete_CombotCode2 == undefined) ? (_Compete_CombotCode2) : (mSharedObject.data.mCompete_CombotCode2)));
}
function set mCompete_CombotCode3(a) {
mSharedObject.data.mCompete_CombotCode3 = (_Compete_CombotCode3 = a);
SaveData();
//return(mCompete_CombotCode3);
}
function get mCompete_CombotCode3() {
return(((mSharedObject.data.mCompete_CombotCode3 == undefined) ? (_Compete_CombotCode3) : (mSharedObject.data.mCompete_CombotCode3)));
}
function set mCompete_CombotCode4(a) {
mSharedObject.data.mCompete_CombotCode4 = (_Compete_CombotCode4 = a);
SaveData();
//return(mCompete_CombotCode4);
}
function get mCompete_CombotCode4() {
return(((mSharedObject.data.mCompete_CombotCode4 == undefined) ? (_Compete_CombotCode4) : (mSharedObject.data.mCompete_CombotCode4)));
}
function set mHelp_ActivateProgrammer(a) {
mSharedObject.data.mHelp_ActivateProgrammer = (_Help_ActivateProgrammer = a);
SaveData();
//return(mHelp_ActivateProgrammer);
}
function get mHelp_ActivateProgrammer() {
return(((mSharedObject.data.mHelp_ActivateProgrammer == undefined) ? (_Help_ActivateProgrammer) : (mSharedObject.data.mHelp_ActivateProgrammer)));
}
function SaveData() {
mSharedObject.flush();
return("success");
}
function LoadData(tUsername) {
mUsername = (tUsername);
mSharedObject = SharedObject.getLocal("COMBOTS_0509" + tUsername);
return("success");
}
function ResetData() {
mSharedObject.clear();
for (var _local2 in mSharedObject.data) {
delete mSharedObject.data[_local2];
mSharedObject.data[_local2] = undefined;
}
SaveData();
}
var _CLASSID_ = "CSaveData";
var _MusicActive = true;
var _SoundActive = true;
var _Detail = true;
var _ArenaScale = 100;
var _CombotActiveIndex = 0;
var _Compete_OptionPickups = true;
var _Compete_OptionWalls = true;
var _Compete_OptionDroids = false;
var _Compete_OptionTimeLimit = 30;
var _Compete_ArenaIndex = 0;
var _Help_ActivateProgrammer = true;
}
Symbol 516 MovieClip [__Packages.CCommand_Compiler] Frame 0
class CCommand_Compiler
{
static var binCodeString;
function CCommand_Compiler () {
}
function Dispose() {
}
static function Valid(tCode) {
return(DecryptCode(tCode) != "INVALID");
}
static function _GetBin(tBits) {
if (binCodeString.length == 0) {
return("0");
}
var _local1 = binCodeString.substring(0, tBits);
binCodeString = binCodeString.substring(tBits, binCodeString.length);
return(_local1);
}
static function Decode_Thing(tCode, tThing) {
tThing.mRobotName = "INVALID";
tCode = DecryptCode(tCode);
if (tCode == "INVALID") {
return(false);
}
var _local15 = Decode_RobotName_Bin(tCode);
if (binCodeString.length != 0) {
var _local8 = GetEventList(tThing);
var _local9 = GetActionList(tThing);
var _local14 = IntToNumberOfBits(_local8.length + 1);
var _local10 = IntToNumberOfBits(_local9.length + 1);
var _local7 = new Array();
var _local6 = 0;
var _local4;
while (_local6 < _local8.length) {
_local4 = BinToInt(_GetBin(_local14));
if (_local4 == 0) {
break;
}
var _local2 = {mEventIndex:_local6, mPriority:_local4 - 1, mActionList:new Array()};
var _local1 = 0;
while (_local1 < 100) {
_local4 = BinToInt(_GetBin(_local10));
if (_local4 == 0) {
break;
}
_local2.mActionList[_local2.mActionList.length] = _local4 - 1;
_local1++;
}
if (_local1 == 100) {
return(false);
}
_local7[_local7.length] = _local2;
_local6++;
}
_local6 = 0;
while (_local6 < _local7.length) {
var _local2 = _local7[_local6];
var _local5 = _local8[_local2.mEventIndex];
_local5.mEvent.mPriority = _local2.mPriority;
var _local1 = 0;
while (_local1 < _local2.mActionList.length) {
var _local3 = _local9[_local2.mActionList[_local1]];
_local5.mEvent.AddCommand(_local3.mThing, _local3.mAction.Clone());
_local1++;
}
_local6++;
}
}
tThing.mRobotName = _local15;
return(true);
}
static function Decode_RobotName(tCode) {
tCode = DecryptCode(tCode);
if (tCode == "INVALID") {
return("INVALID");
}
return(Decode_RobotName_Bin(tCode));
}
static function Decode_RobotName_Bin(tBin) {
var _local2 = tBin;
var _local1 = 0;
var _local4 = "";
while (_local1 < _local2.length) {
tBin = _local2.substring(_local1, _local1 + 6);
if (BinToInt(tBin) == 0) {
binCodeString = _local2.substring(_local1 + 6, _local2.length);
break;
}
_local4 = _local4 + BinToC64(tBin);
_local1 = _local1 + 6;
}
return(_local4);
}
static function Rename_RobotName(tCode, tRobotName) {
tCode = DecryptCode(tCode);
if (tCode == "INVALID") {
return("INVALID");
}
var _local2 = Decode_RobotName_Bin(tCode);
binCodeString = ((binCodeString.length >= 4) ? (binCodeString) : "");
var _local1 = EncryptCode(Encode_RobotName_Bin(tRobotName) + binCodeString);
return(_local1);
}
static function Encode_Thing(tThing) {
var _local2 = Encode_CodeArray_Name(tThing.mRobotName).concat(Encode_CodeArray_Thing(tThing));
var _local1 = 0;
var _local3 = "";
while (_local1 < _local2.length) {
_local3 = _local3 + IntToBin(_local2[_local1].mNumber, IntToNumberOfBits(_local2[_local1].mMax));
_local1++;
}
var _local4 = EncryptCode(_local3);
return(_local4);
}
static function Encode_RobotName(tRobotName) {
var _local1 = EncryptCode(Encode_RobotName_Bin(tRobotName));
return(_local1);
}
static function Encode_RobotName_Bin(tRobotName) {
var _local2 = Encode_CodeArray_Name(tRobotName);
var _local1 = 0;
var _local3 = "";
while (_local1 < _local2.length) {
_local3 = _local3 + IntToBin(_local2[_local1].mNumber, IntToNumberOfBits(_local2[_local1].mMax));
_local1++;
}
return(_local3);
}
static function Encode_CodeArray_Thing(tThing) {
var _local3 = new Array();
var _local5 = GetEventList(tThing);
var _local6 = GetActionList(tThing);
var _local4 = 0;
while (_local4 < _local5.length) {
_local3[_local3.length] = {mNumber:_local5[_local4].mEvent.mPriority + 1, mMax:_local5.length + 1};
var _local1 = 0;
var _local2 = _local5[_local4].mCommandList;
while (_local1 < _local2.length) {
_local3[_local3.length] = {mNumber:GetActionIndex(_local2[_local1].mThing, _local2[_local1], _local6) + 1, mMax:_local6.length + 1};
_local1++;
}
_local3[_local3.length] = {mNumber:0, mMax:_local6.length + 1};
_local4++;
}
return(_local3);
}
static function Encode_CodeArray_Name(tName) {
var _local2 = new Array();
var _local1 = 0;
while (_local1 < tName.length) {
_local2[_local2.length] = {mNumber:CharToInt(tName.substring(_local1, _local1 + 1)), mMax:64};
_local1++;
}
_local2[_local2.length] = {mNumber:0, mMax:64};
return(_local2);
}
static function EncryptCode(tCode) {
var _local3 = BinToHEX_Pad0(tCode);
var _local5 = _local3.length - tCode.length;
tCode = BinToHEX(IntToBin(_local5, 4) + _local3);
var _local1 = HEX_EOR(tCode, mEncrptionKey);
var _local2 = HEXToBin(_local1);
var _local6 = BinCountBits(_local2) + _local2.length;
_local1 = BinToHEX(IntToBin(_local6, mIDKeyBits)) + _local1;
return(_local1);
}
static function DecryptCode(tCode) {
var _local1 = HEXToBin(tCode);
var _local4 = BinToInt(_local1.substring(0, mIDKeyBits));
_local1 = _local1.substring(mIDKeyBits, _local1.length);
var _local3 = (BinCountBits(_local1) + _local1.length) & ((1 << mIDKeyBits) - 1);
if (_local4 == _local3) {
var _local6 = HEX_EOR(BinToHEX(_local1), mEncrptionKey);
var _local2 = HEXToBin(_local6);
var _local5 = BinToInt(_local2.substring(0, 4));
return(_local2.substring(4, _local2.length - _local5));
}
return("INVALID");
}
static function HEX_EOR(tCode, tEOR) {
var _local2 = 0;
var _local1 = 0;
var _local3 = "";
while (_local2 < tCode.length) {
_local3 = _local3 + IntToBin(BinToInt(HEXToBin(tCode.substring(_local2, _local2 + 1))) ^ BinToInt(HEXToBin(tEOR.substring(_local1, _local1 + 1))), 4);
_local2++;
_local1 = (((_local1 + 1) == tEOR.length) ? 0 : (_local1 + 1));
}
return(BinToHEX(_local3));
}
static function GetActionList(tCompileThing) {
var _local8 = tCompileThing.GetThingList();
var _local5 = new Array();
var _local4 = 0;
while (_local4 < _local8.length) {
var _local3 = _local8[_local4];
var _local2 = _local3.GetCommand_Actions();
var _local1 = 0;
while (_local1 < _local2.length) {
_local5[_local5.length] = {mThing:_local3, mAction:_local2[_local1]};
_local1++;
}
_local4++;
}
return(_local5);
}
static function GetActionIndex(tThing, tAction, tActionList) {
var _local1 = 0;
while (_local1 < tActionList.length) {
if ((tThing == tActionList[_local1].mThing) && (tAction._CLASSID_ == tActionList[_local1].mAction._CLASSID_)) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function GetEventList(tCompileThing) {
var _local9 = tCompileThing.GetThingList();
var _local5 = new Array();
var _local4 = 0;
while (_local4 < _local9.length) {
var _local3 = _local9[_local4];
var _local2 = _local3.GetCommand_Events();
var _local1 = 0;
while (_local1 < _local2.length) {
_local5[_local5.length] = {mThing:_local3, mEvent:_local2[_local1], mCommandList:_local2[_local1].mCommandList};
_local1++;
}
_local4++;
}
return(_local5);
}
static function GetBinaryShift(tNumber) {
var _local1 = 10;
while (_local1 >= 0) {
if (tNumber > (1 << _local1)) {
return(_local1 + 1);
}
_local1--;
}
return(0);
}
static function IntToNumberOfBits(tNumber) {
var _local1 = 10;
while (_local1 >= 0) {
if (tNumber > (1 << _local1)) {
return(_local1 + 1);
}
_local1--;
}
return(0);
}
static function GetBitMask(tNumber) {
return((1 << GetBinaryShift(tNumber)) - 1);
}
static function IntToBin(tNumber, tForceNoBits) {
var _local2 = 0;
var _local1 = "";
while (_local2 < tForceNoBits) {
_local1 = ((tNumber & 1) ? "1" : "0") + _local1;
_local2++;
tNumber = tNumber >> 1;
}
return(_local1);
}
static function BinToInt(tBin) {
var _local2 = tBin.length - 1;
var _local1 = 0;
var _local3 = 0;
_local2 = tBin.length - 1;
while (_local1 < tBin.length) {
_local3 = _local3 + (parseInt(tBin.substring(_local1, _local1 + 1)) << _local2);
_local1++;
_local2--;
}
return(_local3);
}
static function StringToBin(tString) {
var _local2 = 0;
var _local3 = "";
while (_local2 < tString.length) {
var _local1 = tString.charCodeAt(_local2);
if ((_local1 >= 65) && (_local1 <= 90)) {
_local1 = _local1 - 62;
} else if (_local1 == 32) {
_local1 = 1;
} else if (_local1 == 35) {
_local1 = 2;
}
_local3 = _local3 + IntToBin(_local1, 6);
_local2++;
}
return(_local3);
}
static function BinToString(tBin) {
var _local3 = 0;
var _local1 = "";
while (_local3 < tBin.length) {
var _local4 = tBin.substring(_local3, _local3 + 5);
var _local2 = BinToInt(_local4);
if (_local2 == 0) {
break;
}
if (_local2 == 1) {
_local1 = _local1 + " ";
} else if (_local2 == 2) {
_local1 = _local1 + "#";
} else {
_local1 = _local1 + chr(62 + _local2);
}
_local3 = _local3 + 5;
}
return(_local1);
}
static function BinCountBits(tBin) {
var _local1 = 0;
var _local2 = 0;
while (_local1 < tBin.length) {
if (tBin.charAt(_local1) == "1") {
_local2++;
}
_local1++;
}
return(_local2);
}
static function BinToC64(tBin, t0Terminate) {
t0Terminate = ((t0Terminate == undefined) ? false : (t0Terminate));
var _local6 = Math.ceil(tBin.length / 6) * 6;
while (tBin.length < _local6) {
tBin = tBin + "0";
}
var _local1 = 0;
var _local3 = "";
while (_local1 < _local6) {
var _local5 = tBin.substring(_local1, _local1 + 6);
var _local4 = BinToInt(_local5);
if ((_local4 == 0) && (t0Terminate)) {
break;
}
_local3 = _local3 + mNumberToChar64[_local4];
_local1 = _local1 + 6;
}
return(_local3);
}
static function C64ToBin(t64, t0Terminate) {
t0Terminate = ((t0Terminate == undefined) ? false : (t0Terminate));
var _local3 = 0;
var _local2 = "";
while (_local3 < t64.length) {
var _local4 = t64.substring(_local3, _local3 + 1);
var _local1 = 0;
while (_local1 < mNumberToChar64.length) {
if (_local4 == mNumberToChar64[_local1]) {
_local2 = _local2 + IntToBin(_local1, 6);
break;
}
_local1++;
}
if (_local1 == mNumberToChar64.length) {
return(undefined);
}
_local3++;
}
if (t0Terminate) {
_local2 = _local2 + IntToBin(0, 6);
}
return(_local2);
}
static function CharToInt(tChar) {
for (var _local2 in mNumberToChar64) {
if (tChar == mNumberToChar64[_local2]) {
return(Number(_local2));
}
}
return(0);
}
static function BinToHEX_Pad0(tBin) {
var _local2 = Math.ceil(tBin.length / 4) * 4;
while (tBin.length < _local2) {
tBin = tBin + "0";
}
return(tBin);
}
static function BinToHEX(tBin) {
var _local6 = Math.ceil(tBin.length / 4) * 4;
while (tBin.length < _local6) {
tBin = tBin + "0";
}
var _local1 = 0;
var _local3 = "";
while (_local1 < _local6) {
var _local5 = tBin.substring(_local1, _local1 + 4);
var _local4 = BinToInt(_local5);
_local3 = _local3 + mNumberToHEX[_local4];
_local1 = _local1 + 4;
}
return(_local3);
}
static function HEXToBin(tHEX) {
var _local2 = 0;
var _local3 = "";
while (_local2 < tHEX.length) {
var _local4 = tHEX.substring(_local2, _local2 + 1);
var _local1 = 0;
while (_local1 < mNumberToHEX.length) {
if (_local4 == mNumberToHEX[_local1]) {
_local3 = _local3 + IntToBin(_local1, 4);
break;
}
_local1++;
}
if (_local1 == mNumberToHEX.length) {
return(undefined);
}
_local2++;
}
return(_local3);
}
var _CLASSID_ = "CCommand_Compiler";
static var mEncrptionKey = "25DEAB78";
static var mIDKeyBits = 8;
static var mNumberToChar64 = ["#", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", " ", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
static var mNumberToHEX = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"];
}
Symbol 517 MovieClip [__Packages.CTankCommand] Frame 0
class CTankCommand extends MovieClip
{
static var mSound, mcProgrammer_Controller;
var _BG, createEmptyMovieClip, getNextHighestDepth, onEnterFrame, mFirstTime, mState, mMapIndex, mScreenList, mcArena, attachMovie, mCombotList, mReturnState, mStateCount, mTimeSlice;
function CTankCommand () {
super();
_BG._visible = false;
SetState(mState_Init);
AddScreen("Screen.Init", mState_Init);
AddScreen("Screen.Intro", mState_Intro);
AddScreen("Screen.Main", mState_Main);
AddScreen("Screen.Instructions", mState_Instructions);
AddScreen("Screen.Challenges", mState_Challenges);
AddScreen("Screen.Compete", mState_Compete);
AddScreen("Screen.Sandbox", mState_Sandbox);
AddScreen("Screen.ManageRobots", mState_ManageRobots);
AddScreen("Screen.LoadArena", mState_LoadArena);
AddScreen("", mState_LoadingArena);
AddScreen("", mState_RunArena);
AddScreen("Screen.Briefing", mState_Briefing);
AddScreen("Screen.Debriefing", mState_Debrief);
AddScreen("Screen.GameComplete", mState_GameComplete);
CSpriteISO.mcRenderPlane = createEmptyMovieClip("_SpriteISO_RenderPlane", getNextHighestDepth());
CSpriteISO.mcRenderPlane._visible = false;
onEnterFrame = Process;
mFirstTime = true;
mSound = new CSound(this);
mSaveData.__set__mUsername("_default");
var _local4 = new CCSS();
var _local3 = new CProfiler();
}
function Dispose() {
}
function Process() {
_root._FPS.Update();
CProfiler.Clear();
var _local3 = ProcessFrames(30);
while (_local3) {
ProcessScreens();
switch (mState) {
case mState_Init :
mSound.StopAll();
mSaveData.LoadData("_default");
SetState(mState_Intro);
break;
case mState_Intro :
break;
case mState_Main :
break;
case mState_Instructions :
break;
case mState_Challenges :
break;
case mState_Compete :
break;
case mState_Sandbox :
SetState(mState_LoadArena);
break;
case mState_ManageRobots :
break;
case mState_LoadArena :
_BG._visible = true;
mMapIndex = ((mMapIndex == undefined) ? 0 : (mMapIndex));
if (mScreenList[mState_LoadArena].mcScreen.mState == "normal") {
mcArena = attachMovie("Arena", "_Arena", getNextHighestDepth(), {mID:1001, mMapIndex:mMapIndex, mCombotList:mCombotList});
mcArena._visible = false;
SetState(mState_LoadingArena);
mSingleFrame = true;
}
break;
case mState_LoadingArena :
if (CSpriteISO.mPreRendering) {
var _local6 = CSpriteISO.PreRender_Process();
} else {
mcArena._visible = true;
mcProgrammer_Controller = attachMovie("Programmer.Controller", "_ProgrammerController", getNextHighestDepth(), {mcArena:mcArena});
mcProgrammer_Controller.SetBaseThing(mcArena.mTrackThing);
if (mcArena.mArena_Data.mObjective != "compete") {
CScoreCard.DeactivateAll();
}
mScreenList[mState_LoadArena].mcScreen.Close();
SetState(mState_RunArena);
mSingleFrame = false;
}
break;
case mState_RunArena :
mcArena.Process();
if (mcArena.mComplete) {
CSound.mSong1_Track2.StopSound();
CSound.mSong1_Track3.StopSound();
switch (mcArena.mCompleteState) {
case "success" :
SetState(mState_Debrief);
mSaveData.SaveData();
break;
case "failed" :
SetState(mState_Debrief);
break;
case "resetlevel" :
SetState(mState_LoadArena);
break;
case "aborted" :
default :
SetState(((mReturnState == undefined) ? (mState_Main) : (mReturnState)));
FrontendMusic();
}
mcArena.Dispose();
mcProgrammer_Controller.Dispose();
delete mcArena;
delete mcProgrammer_Controller;
}
break;
case mState_Briefing :
break;
case mState_Debrief :
break;
case mState_GameComplete :
}
CSound.ProcessAll();
mStateCount++;
_local3--;
}
}
function FrontendMusic() {
CSound.mSong1_Track1.PlaySound();
}
function SetState(nState) {
if ((nState == mState) || (CanChangeStateTo(nState) == false)) {
return(false);
}
mStateCount = 0;
var _local3 = mScreenList[nState];
switch (nState) {
case mState_Init :
break;
case mState_Intro :
CreateScreen(mScreenList[nState]);
break;
case mState_Main :
CreateScreen(mScreenList[nState]);
break;
case mState_Instructions :
CreateScreen(mScreenList[nState]);
break;
case mState_Challenges :
mReturnState = nState;
CreateScreen(mScreenList[nState]);
break;
case mState_Compete :
mReturnState = nState;
CreateScreen(mScreenList[nState]);
break;
case mState_Sandbox :
break;
case mState_ManageRobots :
mReturnState = nState;
CreateScreen(mScreenList[nState]);
break;
case mState_LoadArena :
CreateScreen(mScreenList[nState]);
break;
case mState_LoadingArena :
break;
case mState_RunArena :
break;
case mState_Briefing :
break;
case mState_Debrief :
CreateScreen(mScreenList[nState]);
break;
case mState_GameComplete :
}
mState = nState;
return(true);
}
function AddScreen(tLinkID, tState) {
mScreenList = ((mScreenList == undefined) ? (new Array()) : (mScreenList));
var _local2 = new Object();
_local2.mState = tState;
_local2.mLinkID = tLinkID;
mScreenList[tState] = _local2;
}
function CreateScreen(tScreen) {
RemoveActiveScreens();
var _local3 = getNextHighestDepth();
tScreen.mcContainer = createEmptyMovieClip("mLinkID" + _local3, _local3);
tScreen.mcScreen = tScreen.mcContainer.attachMovie(tScreen.mLinkID, "Screen", 1);
tScreen.mcScreen.Open();
}
function RemoveScreen(tScreen) {
tScreen.mcScreen.Close();
}
function ProcessScreens() {
for (var _local3 in mScreenList) {
var _local2 = mScreenList[_local3];
if (_local2.mcScreen == undefined) {
continue;
}
_local2.mcScreen.Process();
if (_local2.mcScreen.mState == "delete") {
_local2.mcScreen.removeMovieClip();
delete _local2.mcScreen;
_local2.mcContainer.removeMovieClip();
delete _local2.mcContainer;
}
}
}
function CanChangeStateTo(nState) {
if (mScreenList[nState].mLinkID == "") {
return(true);
}
for (var _local3 in mScreenList) {
var _local2 = mScreenList[_local3];
if ((_local2.mcScreen != undefined) && (_local2.mcScreen.mState == "fadein")) {
return(false);
}
}
return(true);
}
function RemoveActiveScreens() {
for (var _local3 in mScreenList) {
var _local2 = mScreenList[_local3];
if (_local2.mcScreen == undefined) {
continue;
}
_local2.mcScreen.Close();
}
}
function Draw() {
}
function ProcessFrames(tFrameRate) {
if (mSingleFrame) {
mTimeSlice = getTimer();
return(1);
}
mTimeSlice = ((mTimeSlice == undefined) ? (getTimer()) : (mTimeSlice));
var _local2 = int((getTimer() - mTimeSlice) / (1000 / tFrameRate));
if (_local2 > 0) {
_local2 = ((_local2 > mFrameCap) ? (mFrameCap) : (_local2));
mTimeSlice = mTimeSlice + (_local2 * tFrameRate);
return(_local2);
}
return(0);
}
var _CLASSID_ = "CTankCommand";
static var mScreenSize = new flash.geom.Point(700, 510);
static var mState_Init = 0;
static var mState_Intro = 1;
static var mState_Main = 2;
static var mState_Instructions = 3;
static var mState_Challenges = 4;
static var mState_Compete = 5;
static var mState_Sandbox = 6;
static var mState_ManageRobots = 7;
static var mState_LoadArena = 8;
static var mState_LoadingArena = 9;
static var mState_InitArena = 10;
static var mState_RunArena = 11;
static var mState_Briefing = 12;
static var mState_Debrief = 13;
static var mState_GameComplete = 14;
static var mSaveData = new CSaveData();
var mSingleFrame = false;
var mFrameCap = 1;
}
Symbol 518 MovieClip [__Packages.CCSS] Frame 0
class CCSS
{
function CCSS () {
var _local1 = new scidd.Draw.Control.CControl_CSS();
_local1.Add("CControl", "mBackColor", scidd.Draw.CColor.Black());
_local1.Add("CControl", "mForeColor", scidd.Draw.CColor.Grey(128));
_local1.Add("CControl", "mFontColor", scidd.Draw.CColor.White());
_local1.Add("CControl", "mBorderStyle", "none");
_local1.Add("CControl", "mBackStyle", "flat");
_local1.Add("CControl", "mHighlightColor", scidd.Draw.CColor.Grey(64));
_local1.Add("CControl", "mSelectedColor", scidd.Draw.CColor.Red());
_local1.Add("CControl", "mFont", "Trebuchet MS");
_local1.Add("CControl", "mAlignX", "left");
_local1.Add("CControl", "mFontSize", 12);
_local1.Add("CControl_Button", "mBackColor", scidd.Draw.CColor.Black());
_local1.Add("CControl_Button", "mForeColor", scidd.Draw.CColor.Grey(64));
_local1.Add("CControl_Button", "mBorderStyle", "flat");
_local1.Add("CControl_Button", "mBackStyle", "flat");
_local1.Add("CControl_ComboBox", "mBackColor", scidd.Draw.CColor.Grey(64));
_local1.Add("CControl_ComboBox", "mBorderStyle", "flat");
_local1.Add("CControl_ImageBox", "mBackColor", scidd.Draw.CColor.Grey(64));
_local1.Add("CControl_ScrollBar", "mBackColor", scidd.Draw.CColor.Grey(24));
_local1.Add("CControl_InputBox", "mBackColor", scidd.Draw.CColor.Grey(64));
_local1.Add("CControl_InputBox", "mFontColor", scidd.Draw.CColor.White());
_local1.Add("CControl_InputBox", "mBackStyle", "flat");
_local1.Add("CControl_InputBox", "mForeColor", scidd.Draw.CColor.Grey(32));
_local1.Add("CControl_InputBox", "mBorderStyle", "flat");
_local1.Add("CControl_Progress", "mBackStyle", "flat");
_local1.Add("CControl_Progress", "mValueColor", scidd.Draw.CColor.Red());
_local1.Add("CControl_Progress", "mBorderStyle", "flat");
_local1.Add("CControl_CheckBox", "mForeColor", scidd.Draw.CColor.Grey(200));
_local1.Add("CControl_Label", "mBackStyle", "none");
_local1.Add("CControl_Label", "mBorderStyle", "none");
scidd.Draw.Control.CControl.AssignCSS(_local1);
}
}
Symbol 519 MovieClip [__Packages.scidd.Draw.Control.CControl_CSS] Frame 0
class scidd.Draw.Control.CControl_CSS
{
var mControlType_List;
function CControl_CSS () {
mControlType_List = new Array();
}
function Dispose() {
}
function Clone() {
var _local1 = new scidd.Draw.Control.CControl_CSS();
return(_local1);
}
function Add(tControlID, tProperty, tValue) {
tControlID = "scidd.Draw.Control." + tControlID;
var _local2 = GetCSSObject(tControlID);
if (_local2 == undefined) {
_local2 = new Object();
_local2._ControlID = tControlID;
mControlType_List[mControlType_List.length] = _local2;
}
_local2[tProperty] = tValue;
}
function GetCSSObject(tControlID) {
for (var _local3 in mControlType_List) {
if (tControlID == mControlType_List[_local3]._ControlID) {
return(mControlType_List[_local3]);
}
}
return(undefined);
}
function Apply(tControl) {
var _local3 = GetCSSObject("scidd.Draw.Control.CControl");
var _local2 = GetCSSObject(tControl._CLASSID_);
for (var _local5 in _local3) {
if (_local5 != "_ControlID") {
if (_local2[_local5] == undefined) {
tControl[_local5] = _local3[_local5];
}
}
}
for (var _local5 in _local2) {
if (_local5 != "_ControlID") {
tControl[_local5] = _local2[_local5];
}
}
}
var _CLASSID_ = "scidd.Draw.Control.CControl_CSS";
}
Symbol 520 MovieClip [__Packages.scidd.Draw.Control.CControl] Frame 0
class scidd.Draw.Control.CControl
{
var _Disposed, mParent_MC, _Owner, __depth, _UniqueID, _AllowPaint, _Control_List, _TransColor, _ForeColor, _BackColor, _HighlightColor, _SelectedColor, _nWidth, _nHeight, _BorderStyle, _BackStyle, _DisplayRectangle, _Focus, _ChildFocus, _Selectable, _Enabled, _nVisible, _AutoSize, mBorderSize, _Container, _Background, _Client, _Mask, _AutoRepeatInt, _CSSApplied, _Binding_List, _MinWidth, _MaxWidth, _MinHeight, _MaxHeight, _Dock, _PaddingLeft, _PaddingRight, _PaddingTop, _PaddingBottom, __get__mPadding, _Tooltip, _BackImage, __get__mCacheAsBitmap, __get__mShadow, _Friend, eventClick, eventDoubleClick, eventMouseDown, eventMouseDownRepeat, eventMouseUp, eventMouseEnter, eventMouseLeave, eventMouseMove, eventGotFocus, eventLostFocus, _eventClick, _eventDoubleClick, _eventMouseDown, _eventMouseDownRepeat, _eventMouseUp, _eventMouseEnter, _eventMouseLeave, _eventMouseMove, _eventGotFocus, _eventLostFocus, _MouseIsDown, _MouseIsOver, _FirstPaint;
function CControl (tParent, tTarget) {
_Disposed = false;
SetupUI();
if (typeof(tParent) == "movieclip") {
mParent_MC = tParent;
_Owner = mMasterControl;
__depth = 0;
} else {
mParent_MC = ((tTarget == undefined) ? (tParent._Container._Client) : (tTarget));
_Owner = tParent;
__depth = _Owner.__depth + 1;
}
_UniqueID = ((_global._Control_UniqueCount == undefined) ? 1 : (_global._Control_UniqueCount + 1));
_global._Control_UniqueCount = _UniqueID;
_AllowPaint = true;
_Control_List = new Array();
_TransColor = new scidd.Draw.CColor(0, 0, 255, 0);
_ForeColor = ((_Owner == undefined) ? (scidd.Draw.CColor.FromRGB32(4290756543)) : (_Owner.mForeColor));
_BackColor = ((_Owner == undefined) ? (scidd.Draw.CColor.FromRGB32(4294967295)) : (_Owner.mBackColor));
_HighlightColor = ((_Owner == undefined) ? (scidd.Draw.CColor.FromRGB32(4287870179)) : (_Owner.mHighlightColor));
_SelectedColor = ((_Owner == undefined) ? (scidd.Draw.CColor.FromRGB32(4281428677)) : (_Owner.mSelectedColor));
_nWidth = _DefaultWidth;
_nHeight = _DefaultHeight;
_BorderStyle = ((_Owner == undefined) ? "flat" : (_Owner.mBorderStyle));
_BackStyle = ((_Owner == undefined) ? "flat" : (_Owner.mBackStyle));
_DisplayRectangle = new flash.geom.Rectangle(0, 0, mWidth, mHeight);
_Focus = false;
_ChildFocus = false;
_Selectable = true;
_Enabled = true;
_nVisible = true;
_AutoSize = false;
mMinWidth = (0);
mMinHeight = (0);
mMaxWidth = (1600);
mMaxHeight = (1200);
mBorderSize = new flash.geom.Point(0, 0);
mPadding = (0);
var _local4 = mParent_MC.getNextHighestDepth();
_Container = mParent_MC.createEmptyMovieClip("_Control" + _local4, _local4);
_Container._focusrect = false;
_Container.focusEnabled = true;
_Container.useHandCursor = false;
_Container._enabled = false;
_Background = _CreateMovieClip(_Container, "_Background");
_Client = _CreateMovieClip(_Container, "_Client");
_Mask = _CreateMovieClip(_Container, "_Mask");
_Owner.AddControl(this);
SetMouseCallbacks();
}
function Dispose() {
_Event("OnDispose");
if (_AutoRepeatInt != undefined) {
clearInterval(_AutoRepeatInt);
}
mOwner.DeleteControl(this);
for (var _local2 in mControls) {
mControls[_local2].Dispose();
}
_Container.removeMovieClip();
_Disposed = true;
}
function Clone() {
return(new scidd.Draw.Control.CControl());
}
function toString() {
return((((((_CLASSID_ + "(") + _UniqueID) + ") x, y = ") + mX) + ", ") + mY);
}
static function AssignCSS(tCSS) {
_global._Control_CSS = tCSS;
}
function ApplyCSS() {
_global._Control_CSS.Apply(this);
_CSSApplied = true;
}
function _CreateMovieClip(tParent_MC, tName) {
return(tParent_MC.createEmptyMovieClip(tName, tParent_MC.getNextHighestDepth()));
}
function BringToFront(tTarget) {
var _local2 = scidd.Math.CMath.Define(tTarget, this)._Container;
if (_local2.getDepth() != (_local2._parent.getNextHighestDepth() - 1)) {
_local2.swapDepths(_local2._parent.getNextHighestDepth());
}
}
function GetTopMovieClip() {
if (mOwner == undefined) {
return(mParent_MC);
}
return(mOwner.GetTopMovieClip());
}
function SetupUI() {
if (mUI == undefined) {
mUI = (new scidd.Draw.Control.CControl_UI());
Selection.setFocus(null);
var _local3 = new Object();
_local3.onMouseDown = function () {
if (_global._CONTROLS_UI.mMouseDown == undefined) {
Selection.setFocus(null);
}
delete _global._CONTROLS_UI.mMouseDown;
_global._CONTROLS_UI.mMouseIsDown = true;
};
_local3.onMouseUp = function () {
_global._CONTROLS_UI.mMouseIsDown = false;
};
Mouse.addListener(_local3);
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.getCode() == 13) {
Selection.setFocus(null);
}
};
_local4.onKeyUp = function () {
};
Key.addListener(_local4);
}
}
function set mUI(a) {
_global._CONTROLS_UI = a;
//return(mUI);
}
function get mUI() {
return(_global._CONTROLS_UI);
}
function get mControls() {
return(_Control_List);
}
function AddControl(tControl) {
_Control_List[_Control_List.length] = tControl;
}
function DeleteControl(tControl) {
var _local4 = ((typeof(tControl) == "number") ? (tControl) : (GetControlIndex(tControl)));
if (_local4 == -1) {
return(false);
}
var _local2 = mControls[_local4];
for (var _local3 in mControls) {
if (_local2 == mControls[_local3]) {
mControls.splice(_local3, 1);
return(true);
}
}
return(false);
}
function GetControlIndex(tControl) {
for (var _local3 in mControls) {
if (tControl == mControls[_local3]) {
return(_local3);
}
}
return(-1);
}
function GetControl(tControl) {
return(mControls[((typeof(tControl) == "number") ? (tControl) : (GetControlIndex(tControl)))]);
}
function SetChildControls(tField, tValue) {
for (var _local5 in _Control_List) {
var _local2 = _Control_List[_local5];
_local2[tField] = tValue;
_local2.SetChildControls(tField, tValue);
}
}
function CallChildControls(tFunction) {
for (var _local3 in _Control_List) {
tFunction.call(_Control_List[_local3]);
_Control_List[_local3].CallChildControls(tFunction);
}
}
function _Event(eventName) {
var eventReserved = eval ("this._" + eventName);
var eventUser = eval ("this." + eventName);
if (eventUser != undefined) {
eventUser.call(this);
}
if (eventReserved != undefined) {
eventReserved.call(this);
}
}
function _EventAndBind(tProp, eventName) {
_UpdateBindProp(tProp);
_Event(eventName);
}
function Bind(tProp, tObject, tObjectProp) {
var _local2 = {mObject:tObject, mObjectProp:tObjectProp, mControl:this, mControlProp:tProp};
_AddBinding(_local2);
}
function _UpdateBindProp(tProp) {
if (_Binding_List != undefined) {
var _local2 = _FindBinding(tProp);
if (_local2 != undefined) {
_local2.mObject[_local2.mObjectProp] = _local2.mControl[_local2.mControlProp];
}
}
}
function _FindBinding(tProp) {
for (var _local2 in _Binding_List) {
if (_Binding_List[_local2].mControlProp == tProp) {
return(_Binding_List[_local2]);
}
}
return(undefined);
}
function _AddBinding(tBind) {
_Binding_List = scidd.Math.CMath.Define(_Binding_List, new Array());
var _local3 = _Binding_List.length;
for (var _local4 in _Binding_List) {
if (_Binding_List[_local4].mControlProp == tBind.mControlProp) {
_local3 = _local4;
break;
}
}
_Binding_List[_local3] = tBind;
tBind.mObject.watch(tBind.mObjectProp, Bind_Watcher, tBind);
tBind.mControl[tBind.mControlProp] = tBind.mObject[tBind.mObjectProp];
}
function Bind_Watcher(prop, oldVal, newVal, tBind) {
if (oldVal == newVal) {
return(newVal);
}
tBind.mControl[tBind.mControlProp] = newVal;
return(tBind.mControl[tBind.mControlProp]);
}
function Move(x, y) {
mX = (x);
mY = (y);
}
function SetSize(w, h) {
mWidth = (w);
mHeight = (h);
}
function set mWidth(a) {
a = scidd.Math.CMath.Range(int(a), _MinWidth, _MaxWidth);
if (_nWidth != a) {
_nWidth = a;
DoPaint();
_Event("WidthChanged");
}
//return(mWidth);
}
function get mWidth() {
return(_nWidth);
}
function set mHeight(a) {
a = scidd.Math.CMath.Range(int(a), _MinHeight, _MaxHeight);
if (_nHeight != a) {
_nHeight = a;
DoPaint();
_Event("HeightChanged");
}
//return(mHeight);
}
function get mHeight() {
return(_nHeight);
}
function set mX(a) {
a = int(a);
if (_Container._x != a) {
_Container._x = a;
_Event("XChanged");
}
//return(mX);
}
function get mX() {
return(_Container._x);
}
function set mY(a) {
a = int(a);
if (_Container._y != a) {
_Container._y = a;
_Event("YChanged");
}
//return(mY);
}
function get mY() {
return(_Container._y);
}
function get mGlobalX() {
var _local2 = new flash.geom.Point(0, 0);
_Container.localToGlobal(_local2);
return(_local2.x);
}
function get mGlobalY() {
var _local2 = new flash.geom.Point(0, 0);
_Container.localToGlobal(_local2);
return(_local2.y);
}
function get mMouseX() {
return(_Client._xmouse);
}
function get mMouseY() {
return(_Client._ymouse);
}
function set mMinWidth(a) {
_MinWidth = a;
mWidth = (mWidth);
//return(mMinWidth);
}
function get mMinWidth() {
return(_MinWidth);
}
function set mMaxWidth(a) {
_MaxWidth = a;
mWidth = (mWidth);
//return(mMaxWidth);
}
function get mMaxWidth() {
return(_MaxWidth);
}
function set mMinHeight(a) {
_MinHeight = a;
mHeight = (mHeight);
//return(mMinHeight);
}
function get mMinHeight() {
return(_MinHeight);
}
function set mMaxHeight(a) {
_MaxHeight = a;
mHeight = (mHeight);
//return(mMaxHeight);
}
function get mMaxHeight() {
return(_MaxHeight);
}
function set mDock(a) {
_Dock = a;
DoPaint();
_Event("DockChanged");
//return(mDock);
}
function get mDock() {
return(_Dock);
}
function set mLeft(a) {
mX = (a);
//return(mLeft);
}
function get mLeft() {
return(_Container._x);
}
function set mRight(a) {
mX = (a - mWidth);
//return(mRight);
}
function get mRight() {
return(_Container._x + mWidth);
}
function set mTop(a) {
mY = (a);
//return(mTop);
}
function get mTop() {
return(_Container._y);
}
function set mBottom(a) {
mY = (a - mHeight);
//return(mBottom);
}
function get mBottom() {
return(_Container._y + mHeight);
}
function get mContainerRectangle() {
return(new flash.geom.Rectangle(mX, mY, mWidth, mHeight));
}
function get mDisplayRectangle() {
return(_DisplayRectangle);
}
function set mDisplayWidth(a) {
mWidth = (a + (mWidth - mDisplayRectangle.width));
//return(mDisplayWidth);
}
function get mDisplayWidth() {
return(mDisplayRectangle.width);
}
function set mDisplayHeight(a) {
mHeight = (a + (mHeight - mDisplayRectangle.height));
//return(mDisplayHeight);
}
function get mDisplayHeight() {
return(mDisplayRectangle.height);
}
function get mClientRectangle() {
return(new flash.geom.Rectangle(_Client._x, _Client._y, _Client._width, _Client._height));
}
function get mClient() {
return(_Client);
}
function get mClientSize() {
return(new flash.geom.Point(_Client._width, _Client._height));
}
function set mPadding(a) {
a = int(a);
_PaddingLeft = a;
_PaddingRight = a;
_PaddingTop = a;
_PaddingBottom = a;
DoPaint();
_Event("PaddingChanged");
//return(__get__mPadding());
}
function set mPaddingLeft(a) {
a = int(a);
if (_PaddingLeft != a) {
_PaddingLeft = a;
DoPaint();
_Event("PaddingChanged");
}
//return(mPaddingLeft);
}
function get mPaddingLeft() {
return(_PaddingLeft);
}
function set mPaddingRight(a) {
a = int(a);
if (_PaddingRight != a) {
_PaddingRight = a;
DoPaint();
_Event("PaddingChanged");
}
//return(mPaddingRight);
}
function get mPaddingRight() {
return(_PaddingRight);
}
function set mPaddingTop(a) {
a = int(a);
if (_PaddingTop != a) {
_PaddingTop = a;
DoPaint();
_Event("PaddingChanged");
}
//return(mPaddingTop);
}
function get mPaddingTop() {
return(_PaddingTop);
}
function set mPaddingBottom(a) {
a = int(a);
if (_PaddingBottom != a) {
_PaddingBottom = a;
DoPaint();
_Event("PaddingChanged");
}
//return(mPaddingBottom);
}
function get mPaddingBottom() {
return(_PaddingBottom);
}
function set mTooltip(a) {
_Tooltip = a;
SetMouseCallbacks();
//return(mTooltip);
}
function get mTooltip() {
return(_Tooltip);
}
function set mForeColor(a) {
_ForeColor = a;
DoPaint();
_Event("ForeColorChanged");
//return(mForeColor);
}
function get mForeColor() {
return(_ForeColor);
}
function set mBackColor(a) {
_BackColor = a;
DoPaint();
_Event("BackColorChanged");
//return(mBackColor);
}
function get mBackColor() {
return(_BackColor);
}
function set mHighlightColor(a) {
_HighlightColor = a;
//return(mHighlightColor);
}
function get mHighlightColor() {
return(_HighlightColor);
}
function set mSelectedColor(a) {
_SelectedColor = a;
//return(mSelectedColor);
}
function get mSelectedColor() {
return(_SelectedColor);
}
function set mBackImage(a) {
if (_BackImage != a) {
_BackImage = a;
DoPaint();
_Event("BackImageChanged");
}
//return(mBackImage);
}
function get mBackImage() {
return(_BackImage);
}
function get mBorderStyle() {
return(_BorderStyle);
}
function set mBorderStyle(a) {
if (_BorderStyle != a) {
_BorderStyle = a;
DoPaint();
_Event("BorderStyleChanged");
}
//return(mBorderStyle);
}
function get mBackStyle() {
return(_BackStyle);
}
function set mBackStyle(a) {
if (_BackStyle != a) {
_BackStyle = a;
DoPaint();
_Event("BackStyleChanged");
}
//return(mBackStyle);
}
function set mCacheAsBitmap(a) {
_Container.cacheAsBitmap = a;
//return(__get__mCacheAsBitmap());
}
function set mShadow(a) {
_Container.filters = (a ? ([new flash.filters.DropShadowFilter(4, 55, 0, 0.5, 8, 8)]) : ([]));
//return(__get__mShadow());
}
function get mVisible() {
return(_nVisible);
}
function set mVisible(a) {
if ((_nVisible != a) || (_Container._visible != _nVisible)) {
_nVisible = a;
_Container._visible = _nVisible;
DoPaint();
SetMouseCallbacks();
_Event("VisibleChanged");
if (!_nVisible) {
mFocus = (false);
}
}
//return(mVisible);
}
function set mAlpha(a) {
if (_Container._alpha != a) {
_Container._alpha = a;
_Event("AlphaChanged");
}
//return(mAlpha);
}
function get mAlpha() {
return(_Container._alpha);
}
function get mDisposed() {
return(_Disposed);
}
function set mMasterControl(a) {
mUI.mMasterControl = a;
//return(mMasterControl);
}
function get mMasterControl() {
return(mUI.mMasterControl);
}
function set mModal(a) {
mUI.mModalControl = a;
//return(mModal);
}
function get mModal() {
return(mUI.mModalControl);
}
function AmModal() {
if ((mModal == this) || (mModal == undefined)) {
return(true);
}
if ((mOwner == undefined) && (mFriend == undefined)) {
return(false);
}
if (mOwner.AmModal() || (mFriend.AmModal())) {
return(true);
}
return(false);
}
function set mEnabled(a) {
if ((_Enabled != a) || (_Container._enabled != _Enabled)) {
_Enabled = a;
_Container._enabled = a;
SetMouseCallbacks();
_Event("EnabledChanged");
if (!_Enabled) {
CallChildControls(DeleteAllMCEvents);
_Container._alpha = 50;
mFocus = (false);
} else {
CallChildControls(SetMouseCallbacks);
_Container._alpha = 100;
}
DoPaint();
}
//return(mEnabled);
}
function get mEnabled() {
return(_Enabled);
}
function set mFocus(a) {
if (_Focus != a) {
_Focus = a;
if (_Focus) {
Selection.setFocus(_Container);
stopDrag();
}
mChildFocus = (_Focus);
_Event("FocusChanged");
}
//return(mFocus);
}
function get mFocus() {
return(_Focus);
}
function set mChildFocus(a) {
if (_ChildFocus != a) {
if ((a == false) && (AnyChildHasFocus())) {
a = true;
}
_ChildFocus = a;
_Event("ChildFocusChanged");
mOwner.mChildFocus = _ChildFocus;
mFriend.mChildFocus = _ChildFocus;
}
//return(mChildFocus);
}
function get mChildFocus() {
return(_ChildFocus);
}
function AnyChildHasFocus() {
for (var _local3 in _Control_List) {
var _local2 = _Control_List[_local3];
if (_local2.mFocus == true) {
return(true);
}
if (_local2.AnyChildHasFocus()) {
return(true);
}
}
return(false);
}
function set mAllowPaint(a) {
if (_AllowPaint != a) {
_AllowPaint = a;
if (_AllowPaint) {
DoPaint();
}
}
//return(mAllowPaint);
}
function get mAllowPaint() {
return(_AllowPaint);
}
function set mOwner(a) {
_Owner = a;
//return(mOwner);
}
function get mOwner() {
return(_Owner);
}
function set mFriend(a) {
_Friend = a;
//return(mFriend);
}
function get mFriend() {
return(_Friend);
}
function set mAutoSize(a) {
if (_AutoSize != a) {
_AutoSize = a;
DoPaint();
}
//return(mAutoSize);
}
function get mAutoSize() {
return(_AutoSize);
}
function StartDrag(tLockCentre, x1, y1, x2, y2) {
_Container.startDrag(scidd.Math.CMath.Define(tLockCentre, false), x1, y1, x2, y2);
}
function StopDrag() {
_Container.stopDrag();
}
function set mSelectable(a) {
if (_Selectable != a) {
_Selectable = a;
SetMouseCallbacks();
_Event("SelectableChanged");
}
//return(mSelectable);
}
function get mSelectable() {
return(_Selectable);
}
function get Click() {
return(eventClick);
}
function set Click(a) {
eventClick = a;
SetMouseCallbacks();
//return(Click);
}
function get DoubleClick() {
return(eventDoubleClick);
}
function set DoubleClick(a) {
eventDoubleClick = a;
SetMouseCallbacks();
//return(DoubleClick);
}
function get MouseDown() {
return(eventMouseDown);
}
function set MouseDown(a) {
eventMouseDown = a;
SetMouseCallbacks();
//return(MouseDown);
}
function get MouseDownRepeat() {
return(eventMouseDownRepeat);
}
function set MouseDownRepeat(a) {
eventMouseDownRepeat = a;
SetMouseCallbacks();
//return(MouseDownRepeat);
}
function get MouseUp() {
return(eventMouseUp);
}
function set MouseUp(a) {
eventMouseUp = a;
SetMouseCallbacks();
//return(MouseUp);
}
function get MouseEnter() {
return(eventMouseEnter);
}
function set MouseEnter(a) {
eventMouseEnter = a;
SetMouseCallbacks();
//return(MouseEnter);
}
function get MouseLeave() {
return(eventMouseLeave);
}
function set MouseLeave(a) {
eventMouseLeave = a;
SetMouseCallbacks();
//return(MouseLeave);
}
function get MouseMove() {
return(eventMouseMove);
}
function set MouseMove(a) {
eventMouseMove = a;
SetMouseCallbacks();
//return(MouseMove);
}
function get GotFocus() {
return(eventGotFocus);
}
function set GotFocus(a) {
eventGotFocus = a;
SetMouseCallbacks();
//return(GotFocus);
}
function get LostFocus() {
return(eventLostFocus);
}
function set LostFocus(a) {
eventLostFocus = a;
SetMouseCallbacks();
//return(LostFocus);
}
function get _Click() {
return(_eventClick);
}
function set _Click(a) {
_eventClick = a;
SetMouseCallbacks();
//return(_Click);
}
function get _DoubleClick() {
return(_eventDoubleClick);
}
function set _DoubleClick(a) {
_eventDoubleClick = a;
SetMouseCallbacks();
//return(_DoubleClick);
}
function get _MouseDown() {
return(_eventMouseDown);
}
function set _MouseDown(a) {
_eventMouseDown = a;
SetMouseCallbacks();
//return(_MouseDown);
}
function get _MouseDownRepeat() {
return(_eventMouseDownRepeat);
}
function set _MouseDownRepeat(a) {
_eventMouseDownRepeat = a;
SetMouseCallbacks();
//return(_MouseDownRepeat);
}
function get _MouseUp() {
return(_eventMouseUp);
}
function set _MouseUp(a) {
_eventMouseUp = a;
SetMouseCallbacks();
//return(_MouseUp);
}
function get _MouseEnter() {
return(_eventMouseEnter);
}
function set _MouseEnter(a) {
_eventMouseEnter = a;
SetMouseCallbacks();
//return(_MouseEnter);
}
function get _MouseLeave() {
return(_eventMouseLeave);
}
function set _MouseLeave(a) {
_eventMouseLeave = a;
SetMouseCallbacks();
//return(_MouseLeave);
}
function get _MouseMove() {
return(_eventMouseMove);
}
function set _MouseMove(a) {
_eventMouseMove = a;
SetMouseCallbacks();
//return(_MouseMove);
}
function get _GotFocus() {
return(_eventGotFocus);
}
function set _GotFocus(a) {
_eventGotFocus = a;
SetMouseCallbacks();
//return(_GotFocus);
}
function get _LostFocus() {
return(_eventLostFocus);
}
function set _LostFocus(a) {
_eventLostFocus = a;
SetMouseCallbacks();
//return(_LostFocus);
}
function get mMouseIsDown() {
return(_MouseIsDown);
}
function get mMouseIsOver() {
return(_MouseIsOver);
}
function _MouseOverControl() {
var _local3 = new flash.geom.Point(0, 0);
_Container.localToGlobal(_local3);
return((mVisible && (mEnabled)) && ((((_root._xmouse >= _local3.x) && (_root._ymouse >= _local3.y)) && (_root._xmouse < (_local3.x + mWidth))) && (_root._ymouse < (_local3.y + mHeight))));
}
function _MouseHitControl() {
return(_Container.hitTest(_root._xmouse, _root._ymouse, true));
}
function _MouseOverOwnerControl() {
if (_MouseOverControl()) {
return(((_Owner == undefined) ? true : (_Owner._MouseOverOwnerControl())));
}
return(false);
}
function SetMouseCallbacks() {
if (mEnabled && (mVisible)) {
_MouseIsDown = false;
_Container.parentClass = this;
_Client.parentClass = this;
_Background.parentClass = this;
if (mSelectable) {
_Container.onMouseDown = function () {
var _local2 = this.parentClass;
if (_local2.mUI.mMouseDown == undefined) {
if (_local2._MouseOverControl()) {
if ((_local2._MouseHitControl() && (_local2._MouseOverOwnerControl())) && (_local2.AmModal())) {
_local2.mFocus = true;
_local2._mcEvent.call(_local2, "Click");
_local2._mcEvent.call(_local2, "MouseDown");
if ((getTimer() - _local2._LastMouseClickTimeStamp) < 500) {
_local2._mcEvent.call(_local2, "DoubleClick");
}
_local2.mUI.mMouseDown = true;
_local2._MouseIsDown = true;
_local2._LastMouseClickTimeStamp = getTimer();
if (!((_local2.eventMouseDownRepeat == undefined) && (_local2._eventMouseDownRepeat == undefined))) {
_local2._AutoRepeatInt = setInterval(_local2.MouseDown_AutoRepeat, _local2._AutoRepeatDelay, _local2);
}
}
}
}
};
_Container.onMouseUp = function () {
var _local2 = this.parentClass;
if (!_local2._MouseIsDown) {
return(undefined);
}
_local2._mcEvent.call(_local2, "MouseUp");
_local2._MouseIsDown = false;
if (_local2._AutoRepeatInt != undefined) {
clearInterval(_local2._AutoRepeatInt);
}
};
if ((MouseMove == undefined) && (_MouseMove == undefined)) {
delete _Container.onMouseMove;
} else {
_Container.onMouseMove = function () {
this.parentClass._mcEvent.call(this.parentClass, "MouseMove");
};
}
} else {
delete _Container.onMouseUp;
delete _Container.onMouseMove;
delete _Container.onMouseDown;
}
_Container.onKillFocus = function () {
this.parentClass._mcEvent.call(this.parentClass, "LostFocus");
this.parentClass.mFocus = false;
};
_Container.onSetFocus = function () {
this.parentClass._mcEvent.call(this.parentClass, "GotFocus");
};
if (((MouseEnter == undefined) && (_MouseEnter == undefined)) && (mTooltip == undefined)) {
delete _Container.onRollOver;
} else {
_Container.onRollOver = function () {
this.parentClass._MouseIsOver = true;
this.parentClass._mcEvent.call(this.parentClass, "MouseEnter");
this.parentClass.OpenTooltip();
};
}
if (((MouseLeave == undefined) && (_MouseLeave == undefined)) && (mTooltip == undefined)) {
delete _Container.onRollOut;
} else {
_Container.onRollOut = function () {
this.parentClass._MouseIsOver = false;
this.parentClass._mcEvent.call(this.parentClass, "MouseLeave");
this.parentClass.CloseTooltip();
};
}
} else {
DeleteAllMCEvents();
}
}
function DeleteAllMCEvents() {
delete _Container.onMouseUp;
delete _Container.onMouseMove;
delete _Container.onRollOver;
delete _Container.onRollOut;
delete _Container.onMouseDown;
if (_AutoRepeatInt != undefined) {
clearInterval(_AutoRepeatInt);
}
}
function MouseDown_AutoRepeat(tControl) {
tControl._mcEvent("MouseDownRepeat");
clearInterval(tControl._AutoRepeatInt);
tControl._AutoRepeatInt = setInterval(tControl.MouseDown_AutoRate, tControl._AutoRepeatRate, tControl);
}
function MouseDown_AutoRate(tControl) {
if (tControl._MouseOverControl()) {
if ((tControl._MouseHitControl() && (tControl._MouseOverOwnerControl())) && (tControl.AmModal())) {
tControl._mcEvent("MouseDownRepeat");
}
}
}
function _mcEvent(tFunction) {
var lFunction = eval ("this.On" + tFunction);
lFunction.call(this);
_Event("event" + tFunction);
}
function OpenTooltip() {
if ((mTooltip == undefined) || (mUI.mMouseIsDown)) {
mUI.mTooltip.mControl.Dispose();
clearInterval(mUI.mTooltip.mIntID);
delete mUI.mTooltip;
return(undefined);
}
mUI.mTooltip = scidd.Math.CMath.Define(mUI.mTooltip, new Object());
mUI.mTooltip.mParentControl = this;
mUI.mTooltip.mMousePos = undefined;
mUI.mTooltip.mTimeStampNew = getTimer();
delete mUI.mTooltip.mTimeStampClose;
if (mUI.mTooltip.mIntID == undefined) {
mUI.mTooltip.mTimeStamp = getTimer();
mUI.mTooltip.mIntID = setInterval(UpdateTooltip, 100, this);
}
}
function CloseTooltip() {
mUI.mTooltip.mTimeStampClose = getTimer();
}
function UpdateTooltip(tFirstControl) {
var _local4 = tFirstControl.mUI.mTooltip.mParentControl;
var _local2 = _local4.mUI.mTooltip;
var _local5 = getTimer();
if (_local2.mControl == undefined) {
if ((_local5 - _local2.mTimeStamp) >= 500) {
_local2.mTimeStampOpen = _local5;
var _local3 = new scidd.Draw.Control.CControl_Label(_local4.GetTopMovieClip());
_local3.__set__mMultiLine(true);
_local3.__set__mWordWrap(true);
_local3.__set__mSelectable(false);
_local3.__set__mBackStyle("flat");
_local3.__set__mBorderStyle("flat");
_local3.__set__mAlignX("justify");
_local3.__set__mBackColor(scidd.Draw.CColor.White());
_local3.__set__mForeColor(scidd.Draw.CColor.Grey());
_local3.__set__mFontColor(scidd.Draw.CColor.Black());
_local2.mControl = _local3;
delete _local2.mTimeStampClose;
}
}
if (_local2.mControl != undefined) {
_local2.mMousePos = scidd.Math.CMath.Define(_local2.mMousePos, new flash.geom.Point(_local4.mMouseX, _local4.mMouseY));
_local2.mControl.mText = _local4.mTooltip;
var _local6 = _local2.mMousePos.clone();
_local4._Container.localToGlobal(_local6);
_local2.mControl.Move(_local6.x, _local6.y + 23);
_local2.mControl.SetSize(200, 200);
_local2.mControl.SetSize(_local2.mControl.mTextWidth + 8, _local2.mControl.mTextHeight + 8);
if (_local2.mControl.mRight > (mUI.mTooltipRect.x + mUI.mTooltipRect.width)) {
_local2.mControl.mRight = mUI.mTooltipRect.x + mUI.mTooltipRect.width;
}
if (_local2.mControl.mBottom > (mUI.mTooltipRect.y + mUI.mTooltipRect.height)) {
_local2.mControl.mBottom = mUI.mTooltipRect.y + mUI.mTooltipRect.height;
}
if (_local2.mControl.mLeft < mUI.mTooltipRect.x) {
_local2.mControl.mLeft = mUI.mTooltipRect.x;
}
if (_local2.mControl.mTop < mUI.mTooltipRect.y) {
_local2.mControl.mTop = mUI.mTooltipRect.y;
}
if ((_local5 - _local2.mTimeStampNew) <= 200) {
_local2.mMousePos = undefined;
}
}
if (((((_local2.mTimeStampClose != undefined) && ((_local5 - _local2.mTimeStampClose) >= 100)) || (_local4.mUI.mMouseIsDown)) || (!_local4.mMouseIsOver)) || (_local4.mDisposed)) {
_local2.mControl.Dispose();
delete _local2.mControl;
delete _local2.mTimeStampOpen;
clearInterval(_local2.mIntID);
delete _local2.mIntID;
}
}
function Layout() {
if (_FirstPaint == undefined) {
return(undefined);
}
if (_DEBUG) {
_global._ControlsLayoutCount = ((_global._ControlsLayoutCount == undefined) ? 0 : (_global._ControlsLayoutCount));
}
_Event("OnLayout");
var _local5 = mControls;
var _local3 = 0;
while (_local3 < _local5.length) {
var _local4 = _local5[_local3];
if (!(_local4.mDock === "fill")) {
} else {
_local4.SetSize(mDisplayRectangle.width, mDisplayRectangle.height);
}
_local3++;
}
}
function Update() {
if (_FirstPaint == undefined) {
return(undefined);
}
if (_DEBUG) {
_global._ControlsUpdateCount = ((_global._ControlsUpdateCount == undefined) ? 0 : (_global._ControlsUpdateCount));
}
_Event("OnUpdate");
var _local5 = _nWidth;
var _local4 = _nHeight;
var _local3;
switch (mBorderStyle) {
case "none" :
default :
_local3 = new flash.geom.Rectangle(0, 0, _local5, _local4);
break;
case "3D" :
_local3 = new flash.geom.Rectangle(2, 2, _local5 - 4, _local4 - 4);
break;
case "button" :
_local3 = new flash.geom.Rectangle(2, 2, _local5 - 4, _local4 - 4);
break;
case "flat" :
_local3 = new flash.geom.Rectangle(1, 1, _local5 - 2, _local4 - 2);
break;
case "flat2" :
_local3 = new flash.geom.Rectangle(2, 2, _local5 - 4, _local4 - 4);
break;
case "flattb" :
_local3 = new flash.geom.Rectangle(0, 1, _local5, _local4 - 2);
}
_local3.x = _local3.x + _PaddingLeft;
_local3.y = _local3.y + _PaddingTop;
_local3.width = _local3.width - (_PaddingRight + _PaddingLeft);
_local3.height = _local3.height - (_PaddingBottom + _PaddingTop);
_DisplayRectangle = _local3;
mBorderSize.x = mWidth - _local3.width;
mBorderSize.y = mHeight - _local3.height;
_Client._x = _DisplayRectangle.x;
_Client._y = _DisplayRectangle.y;
Layout();
}
function _StackPaint() {
_Container.parentClass = this;
_Container.onEnterFrame = function () {
this.parentClass.Paint();
};
}
function DoPaint() {
if (_FirstPaint == undefined) {
return(undefined);
}
if (_DEBUG) {
_global._ControlsDoPaintCount = ((_global._ControlsDoPaintCount == undefined) ? 0 : (_global._ControlsDoPaintCount));
}
Update();
if ((mAllowPaint && (mVisible)) && (_Container.onEnterFrame == undefined)) {
_StackPaint();
}
}
function FirstPaint() {
Update();
ApplyCSS();
Paint();
}
function Paint() {
_FirstPaint = true;
Update();
if (_DEBUG) {
_global._ControlsPaintCount = ((_global._ControlsPaintCount == undefined) ? 0 : (_global._ControlsPaintCount));
}
delete _Container.onEnterFrame;
_Event("OnPaint");
DrawContainer();
if (_MASK_) {
_Mask.clear();
var _local3 = mDisplayRectangle;
_DrawRect(_Mask, 0, 0, _local3.width, _local3.height, 16711680, 100);
_Mask._x = _local3.x;
_Mask._y = _local3.y;
_Client.setMask(_Mask);
}
}
function DrawContainer() {
_Container.clear();
_Background.clear();
var _local4 = _nWidth;
var _local3 = _nHeight;
var _local2 = mDisplayRectangle;
switch (mBorderStyle) {
case "none" :
break;
case "3D" :
var _local5 = mForeColor.Clone();
_local5.mBrightness = 0.627450980392157;
DrawRect(_Background, 0, 0, _local4 - 1, 1, _local5);
DrawRect(_Background, 0, 1, 1, _local3 - 1, _local5);
_local5.mBrightness = 0.352941176470588;
DrawRect(_Background, 1, 1, _local4 - 2, 2, _local5);
DrawRect(_Background, 1, 2, 2, _local3 - 2, _local5);
_local5.mBrightness = 0.92156862745098;
DrawRect(_Background, _local4 - 1, 0, _local4, _local3, _local5);
DrawRect(_Background, 0, _local3 - 1, _local4 - 1, _local3, _local5);
_local5.mBrightness = 1;
DrawRect(_Background, _local4 - 2, 1, _local4 - 1, _local3 - 1, _local5);
DrawRect(_Background, 1, _local3 - 2, _local4 - 2, _local3 - 1, _local5);
break;
case "button" :
_local5 = mForeColor.Clone();
_local5.mBrightness = 1;
DrawRect(_Background, 0, 0, _local4 - 1, 1, _local5);
DrawRect(_Background, 0, 1, 1, _local3 - 1, _local5);
_local5.mBrightness = 0.92156862745098;
DrawRect(_Background, 1, 1, _local4 - 2, 2, _local5);
DrawRect(_Background, 1, 2, 2, _local3 - 2, _local5);
_local5.mBrightness = 0.352941176470588;
DrawRect(_Background, _local4 - 1, 0, _local4, _local3, _local5);
DrawRect(_Background, 0, _local3 - 1, _local4 - 1, _local3, _local5);
_local5.mBrightness = 0.627450980392157;
DrawRect(_Background, _local4 - 2, 1, _local4 - 1, _local3 - 1, _local5);
DrawRect(_Background, 1, _local3 - 2, _local4 - 2, _local3 - 1, _local5);
break;
case "flat2" :
DrawRectO(_Background, 0, 0, _local4, _local3, mForeColor, 2);
break;
case "flat" :
DrawRectO(_Background, 0, 0, _local4, _local3, mForeColor);
break;
case "flattb" :
DrawRectO_tb(_Background, 0, 0, _local4, _local3, mForeColor);
}
switch (mBackStyle) {
case "none" :
DrawRect(_Background, _local2.x, _local2.y, _local2.x + _local2.width, _local2.y + _local2.height, _TransColor);
break;
case "flat" :
DrawRect(_Background, _local2.x, _local2.y, _local2.x + _local2.width, _local2.y + _local2.height, mBackColor);
DrawRect(_Container, 0, 0, mWidth, mHeight, mBackColor);
break;
case "gradienth" :
DrawRectG(_Background, _local2.x, _local2.y, _local2.x + _local2.width, _local2.y + _local2.height, mBackColor, true);
DrawRect(_Container, 0, 0, mWidth, mHeight, mBackColor);
break;
case "gradientv" :
DrawRectG(_Background, _local2.x, _local2.y, _local2.x + _local2.width, _local2.y + _local2.height, mBackColor, false);
DrawRect(_Container, 0, 0, mWidth, mHeight, mBackColor);
}
}
function _DrawRect(tTarget, tx1, ty1, tx2, ty2, tRGB, tAlpha) {
tTarget.beginFill(tRGB, tAlpha);
tTarget.moveTo(tx1, ty1);
tTarget.lineStyle();
tTarget.lineTo(tx2, ty1);
tTarget.lineTo(tx2, ty2);
tTarget.lineTo(tx1, ty2);
tTarget.lineTo(tx1, ty1);
tTarget.endFill();
}
function DrawRect(tTarget, tx1, ty1, tx2, ty2, tColor) {
tTarget.beginFill(tColor.getRGB(), tColor.__get__mAlpha100());
tTarget.moveTo(tx1, ty1);
tTarget.lineStyle();
tTarget.lineTo(tx2, ty1);
tTarget.lineTo(tx2, ty2);
tTarget.lineTo(tx1, ty2);
tTarget.lineTo(tx1, ty1);
tTarget.endFill();
}
function DrawRectO(tTarget, tx1, ty1, tx2, ty2, tColor, tThickness) {
tThickness = scidd.Math.CMath.Define(tThickness, 1);
if (ty1 > ty2) {
var _local9 = ty1;
ty1 = ty2;
ty2 = _local9;
}
if (tx1 > tx2) {
var _local9 = tx1;
tx1 = tx2;
tx2 = _local9;
}
DrawRect(tTarget, tx1, ty1, tx2, ty1 + tThickness, tColor);
DrawRect(tTarget, tx1, ty2 - tThickness, tx2, ty2, tColor);
DrawRect(tTarget, tx1, ty1 + tThickness, tx1 + tThickness, ty2 - tThickness, tColor);
DrawRect(tTarget, tx2 - tThickness, ty1 + tThickness, tx2, ty2 - tThickness, tColor);
}
function DrawRectO_tb(tTarget, tx1, ty1, tx2, ty2, tColor, tThickness) {
tThickness = scidd.Math.CMath.Define(tThickness, 1);
if (ty1 > ty2) {
var _local7 = ty1;
ty1 = ty2;
ty2 = _local7;
}
if (tx1 > tx2) {
var _local7 = tx1;
tx1 = tx2;
tx2 = _local7;
}
DrawRect(tTarget, tx1, ty1, tx2, ty1 + tThickness, tColor);
DrawRect(tTarget, tx1, ty2 - tThickness, tx2, ty2, tColor);
}
function DrawRectG(tTarget, tx1, ty1, tx2, ty2, tColor, tHorizontal, c1, c2) {
var _local2 = tColor.Clone();
_local2.mBrightness = -0.1;
c1 = ((c1 == undefined) ? (_local2.getRGB()) : (c1));
_local2.mBrightness = 0.2;
c2 = ((c2 == undefined) ? (_local2.getRGB()) : (c2));
var _local7 = new flash.geom.Matrix();
_local7.createGradientBox(tx2 - tx1, ty2 - ty1, (tHorizontal ? (Math.PI/2) : 0), 0, 0);
tTarget.beginGradientFill("linear", [c1, c2], [100, 100], [0, 255], _local7);
tTarget.moveTo(tx1, ty1);
tTarget.lineStyle();
tTarget.lineTo(tx2, ty1);
tTarget.lineTo(tx2, ty2);
tTarget.lineTo(tx1, ty2);
tTarget.lineTo(tx1, ty1);
tTarget.endFill();
}
function DrawTri(tTarget, tx1, ty1, tx2, ty2, tx3, ty3, tColor) {
tTarget.beginFill(tColor.getRGB(), tColor.__get__mAlpha100());
tTarget.moveTo(tx1, ty1);
tTarget.lineStyle();
tTarget.lineTo(tx2, ty2);
tTarget.lineTo(tx3, ty3);
tTarget.lineTo(tx1, ty1);
tTarget.endFill();
}
var _CLASSID_ = "scidd.Draw.Control.CControl";
var _AutoRepeatDelay = 400;
var _AutoRepeatRate = 30;
var _MASK_ = true;
var _DEBUG = false;
static var _DefaultHeight = 20;
static var _DefaultWidth = 60;
}
Symbol 521 MovieClip [__Packages.scidd.Draw.CBitmap] Frame 0
class scidd.Draw.CBitmap
{
var mClearColor, _BitmapData, mLoading, mLoaded, _Filename, mOnLoadParentClass, OnLoad, mTag, _Activate, _ClonedBitmapData, mLoaderObject;
function CBitmap () {
mClearColor = scidd.Draw.CColor.FromRGB32(16776960);
}
function Dispose() {
_BitmapData.dispose();
delete _BitmapData;
}
function toString() {
}
function Clone() {
if (mLoading == true) {
return(undefined);
}
var _local2 = new scidd.Draw.CBitmap();
_local2.CloneCopy(this);
if (mLoaded) {
return(_local2.CreateBitmap(_BitmapData.clone()));
}
return(_local2);
}
function CloneCopy(tBitmap) {
mClearColor = tBitmap.mClearColor.Clone();
_Filename = tBitmap._Filename;
mLoaded = tBitmap.mLoaded;
mOnLoadParentClass = tBitmap.mOnLoadParentClass;
OnLoad = tBitmap.OnLoad;
mTag = tBitmap.mTag;
_Activate = tBitmap._Activate;
}
function get mWidth() {
return(_BitmapData.width);
}
function get mHeight() {
return(_BitmapData.height);
}
function get mSize() {
return(new flash.geom.Point(mWidth, mHeight));
}
function MakeFast(tCopy) {
if (_BitmapData == undefined) {
return(undefined);
}
var _local2 = new flash.display.BitmapData(_BitmapData.width, _BitmapData.height, false);
if (tCopy || (tCopy == undefined)) {
_local2.copyPixels(_BitmapData, _BitmapData.rectangle, zPoint);
}
_BitmapData = _local2;
}
function Resize(tWidth, tHeight, tSmooth) {
tSmooth = scidd.Math.CMath.Define(tSmooth, true);
if (_BitmapData == undefined) {
return(undefined);
}
var _local2 = new flash.display.BitmapData(tWidth, tHeight, _BitmapData.transparent);
var _local3 = new flash.geom.Matrix();
_local3.scale(tWidth / _BitmapData.width, tHeight / _BitmapData.height);
_local2.draw(_BitmapData, _local3, undefined, "normal", undefined, tSmooth);
_BitmapData.dispose();
_BitmapData = _local2;
}
function Scale(xScale, yScale) {
Resize(_BitmapData.width * xScale, _BitmapData.height * yScale);
}
function Clear(tARGB) {
tARGB = ((tARGB == undefined) ? (mClearColor.getRGB32()) : (tARGB));
mBitmapData.fillRect(mBitmapData.rectangle, tARGB);
}
function get mBitmapData() {
if (_Activate != undefined) {
_Activate.call(this);
}
return(_BitmapData);
}
function get mClonedBitmapData() {
if (_BitmapData == undefined) {
return(undefined);
}
_ClonedBitmapData.dispose();
return((_ClonedBitmapData = _BitmapData.clone()));
}
static function Empty(tWidth, tHeight, tTransparent, tColor) {
tTransparent = ((tTransparent == undefined) ? false : (tTransparent));
tColor = ((tColor == undefined) ? (new scidd.Draw.CColor(255, 255, 255, 0)) : (tColor));
var _local3 = new scidd.Draw.CBitmap();
return(_local3.CreateBitmap(new flash.display.BitmapData(tWidth, tHeight, tTransparent, tColor.getRGB32())));
}
static function FromFile(tFilename, tonLoad, tonLoadParentClass) {
var _local1 = new scidd.Draw.CBitmap();
_local1.LoadBitmap(tFilename, false, tonLoad, tonLoadParentClass);
return(_local1);
}
static function FromFile_NoLoad(tFilename, tonLoad, tonLoadParentClass) {
var _local1 = new scidd.Draw.CBitmap();
_local1.LoadBitmap(tFilename, true, tonLoad, tonLoadParentClass);
return(_local1);
}
function LoadBitmap(tFilename, tLoadOnRequest, tonLoad, tonLoadParentClass) {
_Filename = tFilename;
mLoaded = false;
mOnLoadParentClass = tonLoadParentClass;
OnLoad = tonLoad;
if (!tLoadOnRequest) {
_LoadBitmap();
} else {
_Activate = _LoadBitmap;
}
}
function _LoadBitmap() {
mLoading = true;
var _local5 = _root.getNextHighestDepth();
var _local6 = _root.createEmptyMovieClip("_BitmapLoader" + _local5, _local5);
var _local4 = new MovieClipLoader();
_local4.addListener(this);
_local4.loadClip(_Filename, _local6);
mLoaderObject = _global.mLoader.Add(1, 0);
delete _Activate;
}
function onLoadProgress(tContainer, bytesLoaded, bytesTotal) {
mLoaderObject.mLoad_Progress = bytesLoaded;
mLoaderObject.mLoad_Total = bytesTotal;
}
function onLoadInit(tContainer) {
if (tContainer._width == 0) {
var _local6 = tContainer.getBounds(_root);
return(undefined);
}
var _local5 = new flash.display.BitmapData(tContainer._width, tContainer._height);
_local5.draw(tContainer);
CreateBitmap(_local5);
OnLoad.call(mOnLoadParentClass, this);
_global.mLoader.Completed(mLoaderObject);
delete mLoaderObject;
tContainer.removeMovieClip();
mLoading = false;
}
function onLoadError(tContainer) {
tContainer.removeMovieClip();
}
static function FromLibrary(tLinkID, tParent_MC) {
if (tParent_MC != undefined) {
var _local2 = tParent_MC.getNextHighestDepth();
var _local1 = tParent_MC.attachMovie(tLinkID, "CBITMAP_TEMP_" + _local2, _local2);
var _local4 = FromMovieClip(_local1);
_local1.removeMovieClip();
return(_local4);
}
var _local4 = new scidd.Draw.CBitmap();
return(_local4.CreateBitmap(flash.display.BitmapData.loadBitmap(tLinkID)));
}
static function FromBitmapData(tBitmapData, tArea, tScale) {
tScale = ((tScale == undefined) ? (new flash.geom.Point(1, 1)) : (tScale));
var _local6 = new scidd.Draw.CBitmap();
if (tArea == undefined) {
if ((tScale.x == 1) && (tScale.y == 1)) {
return(_local6.CreateBitmap(tBitmapData.clone()));
}
tArea = new flash.geom.Rectangle(0, 0, tBitmapData.width, tBitmapData.height);
}
var _local3 = new flash.display.BitmapData(tArea.width * tScale.x, tArea.height * tScale.y, tBitmapData.transparent);
var _local5 = new flash.geom.Matrix();
_local5.translate(-tArea.x, -tArea.y);
_local5.scale(_local3.width / tArea.width, _local3.height / tArea.height);
_local3.draw(tBitmapData, _local5);
return(_local6.CreateBitmap(_local3));
}
static function FromCMovieClip(tMovieClip, tArea, tTransparent) {
return(FromMovieClip(tMovieClip.mMC, tArea));
}
static function FromMovieClip(tMovieClip, tArea, tTransparent) {
var _local4 = new scidd.Draw.CBitmap();
if (tArea == undefined) {
var _local1 = new flash.display.BitmapData(tMovieClip._width, tMovieClip._height, ((tTransparent == undefined) ? true : (tTransparent)));
_local1.draw(tMovieClip, new flash.geom.Matrix(), undefined, "normal", _local1.rectangle, true);
return(_local4.CreateBitmap(_local1));
}
var _local1 = new flash.display.BitmapData(tArea.width, tArea.height, true, 16777215);
_local1.draw(tMovieClip, new flash.geom.Matrix(), undefined, "normal", tArea, true);
return(_local4.CreateBitmap(_local1));
}
function CreateBitmap(tBitmapData) {
mLoaded = true;
_BitmapData = tBitmapData;
return(this);
}
function AttachToMovieClip(tAttachedToMovieClip, tSmoothing) {
tSmoothing = scidd.Math.CMath.Define(tSmoothing, "false");
tAttachedToMovieClip.attachBitmap(_BitmapData, 2, "auto", tSmoothing);
}
function ExistAsMovieClip(tParent_MC, tSmoothing) {
var _local3 = tParent_MC.getNextHighestDepth();
var _local2 = tParent_MC.createEmptyMovieClip("CBITMAP_" + _local3, _local3);
AttachToMovieClip(_local2, tSmoothing);
return(_local2);
}
function ExistAsCMovieClip(tParent_MC, tSmoothing) {
var _local2 = new scidd.Draw.CMovieClip(tParent_MC);
_local2.mMC = _local2.CreateMC();
AttachToMovieClip(_local2.mMC, tSmoothing);
_local2.CreateMovieClip();
return(_local2);
}
function Copy(tBitmap, tAlpha, tSmooth) {
var _local2 = tBitmap.__get__mBitmapData();
if ((_local2.width == _BitmapData.width) && (_local2.height == _BitmapData.height)) {
var _local4 = ((tAlpha == undefined) ? false : (tAlpha));
_BitmapData.copyPixels(_local2, _local2, zPoint, undefined, undefined, _local4);
} else {
var _local5 = ((tSmooth == undefined) ? false : (tSmooth));
var _local3 = new flash.geom.Matrix();
_local3.scale(_BitmapData.width / _local2.width, _BitmapData.height / _local2.height);
_BitmapData.draw(_local2, _local3, undefined, undefined, undefined, _local5);
}
}
function Merge(tBitmap) {
}
function Flip(xFlip, yFlip, tBitmap_D) {
tBitmap_D = scidd.Math.CMath.Define(tBitmap_D, Clone());
var _local2 = new flash.geom.Matrix();
_local2.scale((xFlip ? -1 : 1), (yFlip ? -1 : 1));
_local2.translate((xFlip ? (mWidth) : 0), (yFlip ? (mHeight) : 0));
tBitmap_D.__get__mBitmapData().draw(mBitmapData, _local2);
return(tBitmap_D);
}
function Rotate90_CW(tBitmap_D) {
var _local4 = tBitmap_D.mClearColor;
tBitmap_D = scidd.Math.CMath.Define(tBitmap_D, Empty(mBitmapData.height, mBitmapData.width, mBitmapData.transparent));
tBitmap_D.mClearColor = _local4;
var _local3 = new flash.geom.Matrix();
_local3.rotate((Math.PI/2));
_local3.translate(tBitmap_D.__get__mWidth(), 0);
tBitmap_D.__get__mBitmapData().draw(mBitmapData, _local3);
return(tBitmap_D);
}
function Rotate90_CCW(tBitmap_D) {
var _local4 = tBitmap_D.mClearColor;
tBitmap_D = scidd.Math.CMath.Define(tBitmap_D, Empty(mBitmapData.height, mBitmapData.width, mBitmapData.transparent));
tBitmap_D.mClearColor = _local4;
var _local3 = new flash.geom.Matrix();
_local3.rotate(-1.5707963267949);
_local3.translate(0, tBitmap_D.__get__mHeight());
tBitmap_D.__get__mBitmapData().draw(mBitmapData, _local3);
return(tBitmap_D);
}
function Rotate180(tBitmap_D) {
tBitmap_D = scidd.Math.CMath.Define(tBitmap_D, Clone());
var _local3 = new flash.geom.Matrix();
_local3.rotate(Math.PI);
_local3.translate(tBitmap_D.__get__mWidth(), tBitmap_D.__get__mHeight());
tBitmap_D.__get__mBitmapData().draw(mBitmapData, _local3);
return(tBitmap_D);
}
function Scroll(x, y) {
var _local2 = mBitmapData;
var _local3 = _local2.clone();
var _local7 = _local3.width;
var _local6 = _local3.height;
_local2.scroll(x, 0);
if (x < 0) {
_local2.copyPixels(_local3, new flash.geom.Rectangle(0, 0, -x, _local6), new flash.geom.Point(x + _local7, 0));
} else if (x > 0) {
_local2.copyPixels(_local3, new flash.geom.Rectangle(_local7 - x, 0, x, _local6), new flash.geom.Point(0, 0));
}
_local2.scroll(0, y);
if (y < 0) {
_local2.copyPixels(_local3, new flash.geom.Rectangle(0, 0, _local7, -y), new flash.geom.Point(0, y + _local6));
} else if (y > 0) {
_local2.copyPixels(_local3, new flash.geom.Rectangle(0, _local6 - y, _local7, y), new flash.geom.Point(0, 0));
}
_local3.dispose();
}
function ScrollAndClone(sx, sy) {
}
var _CLASSID_ = "scidd.Draw.CBitmap";
static var zPoint = new flash.geom.Point(0, 0);
}
Symbol 522 MovieClip [__Packages.scidd.Draw.CMovieClip] Frame 0
class scidd.Draw.CMovieClip
{
var mParent_MC, mFilter_List, mMC, mLoaderObject, OnLoad, mOnLoadParentClass, mLoaded, __get__mVisible, _Mask;
function CMovieClip (tParent_MC) {
mParent_MC = tParent_MC;
mFilter_List = new Array();
}
function Dispose() {
mMC.removeMovieClip();
}
function Clone() {
}
static function Empty(tParent_MC) {
var _local1 = new scidd.Draw.CMovieClip(tParent_MC);
return(_local1);
}
static function FromLibrary(tLinkage, tParent_MC) {
var _local1 = new scidd.Draw.CMovieClip(tParent_MC);
var _local2 = tParent_MC.getNextHighestDepth();
_local1.mMC = tParent_MC.attachMovie(tLinkage, "CMovieClip_" + _local2, _local2);
return(_local1);
}
static function FromMovieClip(fMovieClip, tParent_MC) {
var _local1 = new scidd.Draw.CMovieClip(tParent_MC);
_local1.mMC = fMovieClip;
return(_local1);
}
static function FromFile(tFilename, tParent_MC, tonLoad, tonLoadParentClass) {
var _local2 = new scidd.Draw.CMovieClip(tParent_MC);
_local2.mLoaded = false;
_local2.mOnLoadParentClass = tonLoadParentClass;
_local2.OnLoad = tonLoad;
var _local3 = _local2.CreateMC(tParent_MC);
_local2.mLoaderObject = _global.mLoader.Add(1, 0);
var _local4 = new MovieClipLoader();
_local2.mMC = _local3;
_local4.addListener(_local2);
_local4.loadClip(tFilename, _local3);
return(_local2);
}
function onLoadProgress(tContainer, bytesLoaded, bytesTotal) {
mLoaderObject.mLoad_Progress = bytesLoaded;
mLoaderObject.mLoad_Total = bytesTotal;
}
function onLoadInit(tContainer) {
_global.mLoader.Completed(mLoaderObject);
delete mLoaderObject;
CreateMovieClip();
ApplyFilters();
OnLoad.call(mOnLoadParentClass, this);
}
function onLoadError(tContainer) {
tContainer.removeMovieClip();
}
function CreateMovieClip() {
mLoaded = true;
return(this);
}
function CreateMC() {
var _local2 = mParent_MC.getNextHighestDepth();
return(mParent_MC.createEmptyMovieClip("CMovieClip_" + _local2, _local2));
}
function AttachCBitmap(tBitmap) {
mMC.attachBitmap(tBitmap.__get__mBitmapData(), 2);
}
function RenderToCBitmap(tBitmap, tSmooth) {
tBitmap.__get__mBitmapData().draw(mMC, zMatrix, undefined, "normal", undefined, tSmooth);
}
function set mVisible(a) {
mMC._visible = a;
//return(__get__mVisible());
}
function Move(dx, dy) {
mMC._x = mMC._x + dx;
mMC._y = mMC._y + dy;
}
function Scale(sx, sy) {
mMC._xscale = sx;
mMC._yscale = sy;
}
function Position(px, py) {
mMC._x = px;
mMC._y = py;
}
function Size(nw, nh) {
mMC._width = nw;
mMC._height = nh;
}
function BringToFront() {
mMC.swapDepths(mParent_MC.getNextHighestDepth() - 1);
}
function SendToBack() {
mMC.swapDepths(0);
}
function SwapDepths(tDepth) {
mMC.swapDepths((((typeof(tDepth) == "number") || (typeof(tDepth) == "movieclip")) ? (tDepth) : (tDepth.mMC)));
}
function Align(tAlignX, tAlignY) {
var _local3 = 0;
var _local5 = 0;
var _local2 = mMC.getBounds(mMC._parent);
var _local4 = new flash.geom.Point(mMC._parent._width, mMC._parent._height);
switch (tAlignX.toUpperCase()) {
case "CENTRE" :
default :
case "CENTER" :
_local3 = ((_local4.x - mMC._width) / 2) - _local2.xMin;
break;
case "LEFT" :
_local3 = -_local2.xMin;
break;
case "RIGHT" :
_local3 = _local4.x - _local2.xMax;
}
switch (tAlignY.toUpperCase()) {
case "CENTRE" :
default :
case "CENTER" :
_local5 = ((_local4.y - mMC._height) / 2) - _local2.yMin;
break;
case "TOP" :
_local5 = -_local2.yMin;
break;
case "BOTTOM" :
_local5 = _local4.y - _local2.yMax;
}
Position(_local3, _local5);
}
function SetMask(rect) {
_Mask.removeMovieClip();
var _local3 = mMC._parent.getNextHighestDepth();
_Mask = mMC._parent.createEmptyMovieClip("_CMovieClip_Mask" + _local3, _local3);
scidd.Draw.CPrimitive.DrawRectangle(_Mask, rect.x, rect.y, rect.x + rect.width, rect.y + rect.height, scidd.Draw.CPen.SolidColor(scidd.Draw.CColor.Black()));
mMC.setMask(_Mask);
}
function Blur(tBlurX, tBlurY) {
if (mFilter_List[mFilterIndex_Blur] == undefined) {
mFilter_List[mFilterIndex_Blur] = new flash.filters.BlurFilter();
}
var _local2 = mFilter_List[mFilterIndex_Blur];
_local2.blurX = ((tBlurX == undefined) ? 5 : (tBlurX));
_local2.blurY = ((tBlurY == undefined) ? 5 : (tBlurY));
_local2.quality = mFilterQuality;
ApplyFilters();
}
function DropShadow(tBlurX, tBlurY, tAngle, tDistance, tStrength, tInner) {
if (mFilter_List[mFilterIndex_DropShadow] == undefined) {
mFilter_List[mFilterIndex_DropShadow] = new flash.filters.DropShadowFilter();
}
var _local2 = mFilter_List[mFilterIndex_DropShadow];
_local2.blurX = tBlurX;
_local2.blurY = tBlurY;
_local2.angle = tAngle;
_local2.distance = tDistance;
_local2.strength = tStrength;
_local2.quality = mFilterQuality;
_local2.inner = tInner;
ApplyFilters();
}
function Glow(tBlurX, tBlurY, tColor, tStrength, tInner) {
if (mFilter_List[mFilterIndex_Glow] == undefined) {
mFilter_List[mFilterIndex_Glow] = new flash.filters.GlowFilter();
}
var _local2 = mFilter_List[mFilterIndex_Glow];
_local2.blurX = ((tBlurX == undefined) ? 5 : (tBlurX));
_local2.blurY = ((tBlurY == undefined) ? 5 : (tBlurY));
_local2.strength = ((tStrength == undefined) ? 1 : (tStrength));
_local2.inner = ((tInner == undefined) ? false : (tInner));
_local2.color = ((tColor == undefined) ? 0 : (tColor.getRGB()));
_local2.quality = mFilterQuality;
ApplyFilters();
}
function ClearFilters() {
mFilter_List = new Array();
mMC.filters = new Array();
}
function ApplyFilters() {
if (mLoaded != true) {
return(undefined);
}
var _local2 = new Array();
for (var _local3 in mFilter_List) {
if (mFilter_List[_local3] != undefined) {
_local2.push(mFilter_List[_local3]);
}
}
mMC.filters = _local2;
}
var _CLASSID_ = "scidd.Draw.CMovieClip";
var mFilterQuality = 1;
static var mFilterIndex_Blur = 0;
static var mFilterIndex_DropShadow = 1;
static var mFilterIndex_Glow = 2;
static var zMatrix = new flash.geom.Matrix();
}
Symbol 523 MovieClip [__Packages.scidd.Draw.CPrimitive] Frame 0
class scidd.Draw.CPrimitive
{
function CPrimitive () {
}
static function DrawRectangle(tDraw_MC, tx1, ty1, tx2, ty2, tPen) {
var _local1 = new Array(4);
_local1[0] = new flash.geom.Point(tx1, ty1);
_local1[1] = new flash.geom.Point(tx2, ty1);
_local1[2] = new flash.geom.Point(tx2, ty2);
_local1[3] = new flash.geom.Point(tx1, ty2);
tPen.Start(tDraw_MC, _local1, 0);
tDraw_MC.moveTo(_local1[0].x, _local1[0].y);
tDraw_MC.lineTo(_local1[1].x, _local1[1].y);
tDraw_MC.lineTo(_local1[2].x, _local1[2].y);
tDraw_MC.lineTo(_local1[3].x, _local1[3].y);
tDraw_MC.lineTo(_local1[0].x, _local1[0].y);
tPen.End(tDraw_MC);
}
static function DrawLine(tDraw_MC, tx1, ty1, tx2, ty2, tPen) {
var _local1 = new Array(2);
_local1[0] = new flash.geom.Point(tx1, ty1);
_local1[1] = new flash.geom.Point(tx2, ty2);
tPen.Start(tDraw_MC);
tDraw_MC.moveTo(_local1[0].x, _local1[0].y);
tDraw_MC.lineTo(_local1[1].x, _local1[1].y);
}
static function DrawCircle(tDraw_MC, tx1, ty1, tx2, ty2, tPen) {
var _local7 = new Array(2);
_local7[0] = new flash.geom.Point(tx1, ty1);
_local7[1] = new flash.geom.Point(tx2, ty2);
tPen.Start(tDraw_MC, _local7, 0);
var _local3 = _local7[0].x;
var _local2 = _local7[0].y;
var _local1 = getRadius(_local7[0], _local7[1]);
var _local6 = 0.707106781186547;
var _local5 = 0.414213562373095;
tDraw_MC.moveTo(_local3 + _local1, _local2);
tDraw_MC.curveTo(_local1 + _local3, (_local5 * _local1) + _local2, (_local6 * _local1) + _local3, (_local6 * _local1) + _local2);
tDraw_MC.curveTo((_local5 * _local1) + _local3, _local1 + _local2, _local3, _local1 + _local2);
tDraw_MC.curveTo(((-_local5) * _local1) + _local3, _local1 + _local2, ((-_local6) * _local1) + _local3, (_local6 * _local1) + _local2);
tDraw_MC.curveTo((-_local1) + _local3, (_local5 * _local1) + _local2, (-_local1) + _local3, _local2);
tDraw_MC.curveTo((-_local1) + _local3, ((-_local5) * _local1) + _local2, ((-_local6) * _local1) + _local3, ((-_local6) * _local1) + _local2);
tDraw_MC.curveTo(((-_local5) * _local1) + _local3, (-_local1) + _local2, _local3, (-_local1) + _local2);
tDraw_MC.curveTo((_local5 * _local1) + _local3, (-_local1) + _local2, (_local6 * _local1) + _local3, ((-_local6) * _local1) + _local2);
tDraw_MC.curveTo(_local1 + _local3, ((-_local5) * _local1) + _local2, _local1 + _local3, _local2);
tPen.End(tDraw_MC);
}
static function getMidPoint(tCP, tp1, tp2) {
tCP.x = ((tp2.x - tp1.x) / 2) + tp1.x;
tCP.y = ((tp2.y - tp1.y) / 2) + tp1.y;
}
static function getRadius(tp1, tp2) {
var _local2 = tp2.x - tp1.x;
var _local1 = tp2.y - tp1.y;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
static function DrawRhombus(tDraw_MC, tx1, ty1, tx2, ty2, tx3, ty3, tx4, ty4, tPen) {
var _local1 = new Array(4);
_local1[0] = new flash.geom.Point(tx1, ty1);
_local1[1] = new flash.geom.Point(tx2, ty2);
_local1[2] = new flash.geom.Point(tx3, ty3);
_local1[3] = new flash.geom.Point(tx4, ty4);
tPen.Start(tDraw_MC, _local1, 0);
tDraw_MC.moveTo(_local1[0].x, _local1[0].y);
tDraw_MC.lineTo(_local1[1].x, _local1[1].y);
tDraw_MC.lineTo(_local1[2].x, _local1[2].y);
tDraw_MC.lineTo(_local1[3].x, _local1[3].y);
tDraw_MC.lineTo(_local1[0].x, _local1[0].y);
tPen.End(tDraw_MC);
}
static function DrawTriangle(tDraw_MC, tx1, ty1, tx2, ty2, tx3, ty3, tPen) {
var _local1 = new Array(3);
_local1[0] = new flash.geom.Point(tx1, ty1);
_local1[1] = new flash.geom.Point(tx2, ty2);
_local1[2] = new flash.geom.Point(tx3, ty3);
tPen.Start(tDraw_MC, _local1, 0);
tDraw_MC.moveTo(_local1[0].x, _local1[0].y);
tDraw_MC.lineTo(_local1[1].x, _local1[1].y);
tDraw_MC.lineTo(_local1[2].x, _local1[2].y);
tDraw_MC.lineTo(_local1[0].x, _local1[0].y);
tPen.End(tDraw_MC);
}
static function Clear(tDraw_MC) {
tDraw_MC.clear();
}
var _CLASSID_ = "scidd.Draw.CPrimitive";
static var mDrawType_Normal = 1;
static var mDrawType_Pairs = 2;
static var mDrawType_Origin = 3;
}
Symbol 524 MovieClip [__Packages.scidd.Draw.CPen] Frame 0
class scidd.Draw.CPen
{
var mSmooth, mThickness, mColor, mBitmapMatrix, mBitmapData;
function CPen () {
mSmooth = false;
}
static function LineStyle(tColor, tThickness) {
var _local1 = new scidd.Draw.CPen();
_local1.mColor = tColor;
_local1.mThickness = tThickness;
_local1.Start = _local1.Start_LineStyle;
_local1.End = _local1.End_LineStyle;
return(_local1);
}
function Start_LineStyle(tMovieClip) {
tMovieClip.lineStyle(mThickness, mColor.getRGB(), (mColor.mAlpha * 100) / 255);
}
function End_LineStyle(tMovieClip) {
tMovieClip.lineStyle();
}
static function SolidColor(tColor) {
var _local1 = new scidd.Draw.CPen();
_local1.mColor = tColor;
_local1.Start = _local1.Start_SolidColor;
_local1.End = _local1.End_SolidColor;
return(_local1);
}
function Start_SolidColor(tMovieClip) {
tMovieClip.lineStyle();
tMovieClip.beginFill(mColor.getRGB(), (mColor.mAlpha * 100) / 255);
}
function End_SolidColor(tMovieClip) {
tMovieClip.endFill();
}
static function Bitmap(tBitmapData, tUV_List, tColor) {
var _local1 = new scidd.Draw.CPen();
_local1.Start = _local1.Start_DrawBitmap;
_local1.End = _local1.End_DrawBitmap;
_local1.SetBitmapData(tBitmapData, tUV_List);
return(_local1);
}
function SetBitmapData(tBitmapData, tuv) {
var _local3 = new flash.geom.Matrix();
_local3.identity();
if (tuv == undefined) {
tuv = new Array(new flash.geom.Point(0, 0), new flash.geom.Point(1, 0), new flash.geom.Point(1, 1));
}
var _local2 = tuv[0];
var _local7 = tuv[1];
var _local6 = tuv[2];
var _local5 = new flash.geom.Matrix();
var _local9 = tBitmapData.width / tBitmapData.height;
_local5.b = N0(_local7.y - _local2.y) / (N0(_local7.x - _local2.x) * _local9);
_local5.c = (N0(_local6.x - _local2.x) * _local9) / N0(_local6.y - _local2.y);
_local3.scale(N0(_local7.x - _local2.x), N0(_local6.y - _local2.y));
_local3.concat(_local5);
_local3.translate(_local2.x * tBitmapData.width, _local2.y * tBitmapData.height);
_local3.invert();
mBitmapMatrix = _local3;
mBitmapData = tBitmapData;
}
function Start_DrawBitmap(tMovieClip, tv, ti) {
var _local6 = new flash.geom.Matrix();
var _local2 = tv[ti + 0];
var _local5 = tv[ti + 1];
var _local4 = tv[ti + 2];
_local6.b = N0(_local5.y - _local2.y) / N0(_local5.x - _local2.x);
_local6.c = N0(_local4.x - _local2.x) / N0(_local4.y - _local2.y);
var _local3 = new flash.geom.Matrix();
_local3.identity();
_local3.scale(N0(_local5.x - _local2.x) / mBitmapData.width, N0(_local4.y - _local2.y) / mBitmapData.height);
_local3.concat(_local6);
_local3.translate(_local2.x, _local2.y);
var _local7 = mBitmapMatrix.clone();
_local7.concat(_local3);
tMovieClip.lineStyle();
tMovieClip.beginBitmapFill(mBitmapData, _local7, true, mSmooth);
}
function End_DrawBitmap(tMovieClip) {
tMovieClip.endFill();
}
function N0(tNumber) {
return(((tNumber == 0) ? 1E-6 : (tNumber)));
}
var _CLASSID_ = "scidd.Draw.CPen";
}
Symbol 525 MovieClip [__Packages.scidd.Draw.Control.CControl_UI] Frame 0
class scidd.Draw.Control.CControl_UI
{
function CControl_UI () {
}
function CControl_Button(tParent) {
}
var _CLASSID_ = "scidd.Draw.Control.CControl_UI";
}
Symbol 526 MovieClip [__Packages.scidd.Draw.Control.CControl_Text] Frame 0
class scidd.Draw.Control.CControl_Text extends scidd.Draw.Control.CControl
{
var _TextFormat, _TextField, _Client, __get__mWidth, __get__mHeight, _Owner, _Event, _AlignY, _FontColor, DoPaint, _Min, _Max, _SmallChange, _TextWidth, _TextHeight, __get__mDisplayRectangle;
function CControl_Text (tParent, tTarget) {
super(tParent, tTarget);
_TextFormat = new TextFormat();
_TextField = _Client.createTextField("tfText", _Client.getNextHighestDepth(), 0, 0, __get__mWidth(), __get__mHeight());
InitEvents();
_TextField.embedFonts = true;
mText = ("");
mFontSize = (11);
mAlignX = ("left");
mAlignY = ("centre");
mFont = ("arial");
mFontColor = (((_Owner.mFontColor == undefined) ? (scidd.Draw.CColor.FromRGB32(4278190080)) : (_Owner.mFontColor)));
mReadonly = (false);
mMultiLine = (true);
mWordWrap = (true);
mNumerical = (false);
mMin = (0);
mMax = (100);
mSmallChange = (0.01);
}
function InitEvents() {
_TextField.parentClass = this;
_TextField.onChanged = function (tNew) {
this.text = tNew.text;
this.setTextFormat(this.parentClass._TextFormat);
};
_TextField.onKillFocus = function (newFocus) {
this.parentClass.mText = this.text;
};
_TextField.onSetFocus = function (oldFocus) {
};
}
function Clone() {
return(new scidd.Draw.Control.CControl_Label());
}
function set mText(tText) {
if (_TextField.lastText != tText) {
tText = ValidateText(tText);
_TextField.lastText = tText;
_TextField.text = tText;
_TextField.setTextFormat(_TextFormat);
_TextField.scroll;
Update();
_Event("TextChanged");
}
//return(mText);
}
function get mText() {
return(_TextField.text);
}
function ValidateText(tText) {
if (mNumerical) {
var _local2 = Number(tText);
if (isNaN(_local2)) {
_local2 = mMin;
}
_local2 = ((_local2 > mMax) ? (mMax) : (((_local2 < mMin) ? (mMin) : (_local2))));
_local2 = (Math.round((_local2 - mMin) / mSmallChange) * mSmallChange) + mMin;
return(String(_local2));
}
return(tText);
}
function set mAlignX(a) {
_TextFormat.align = a;
Update();
_Event("AlignX");
//return(mAlignX);
}
function get mAlignX() {
return(_TextFormat.align);
}
function set mAlignY(a) {
_AlignY = a;
Update();
_Event("AlignY");
//return(mAlignY);
}
function get mAlignY() {
return(_AlignY);
}
function set mBold(a) {
_TextFormat.bold = a;
_Event("BoldChanged");
//return(mBold);
}
function get mBold() {
return(_TextFormat.bold);
}
function set mItalic(a) {
_TextFormat.italic = a;
_Event("ItalicChanged");
//return(mItalic);
}
function get mItalic() {
return(_TextFormat.italic);
}
function set mUnderLine(a) {
_TextFormat.underline = a;
_Event("UnderLineChanged");
//return(mUnderLine);
}
function get mUnderLine() {
return(_TextFormat.underline);
}
function set mFont(a) {
_TextFormat.font = a;
_Event("FontChanged");
//return(mFont);
}
function get mFont() {
return(_TextFormat.font);
}
function set mFontColor(a) {
_FontColor = a;
DoPaint();
_Event("FontColorChanged");
//return(mFontColor);
}
function get mFontColor() {
return(_FontColor);
}
function set mFontSize(a) {
_TextFormat.size = a;
_Event("FontSizeChanged");
//return(mFontSize);
}
function get mFontSize() {
return(_TextFormat.size);
}
function set mMultiLine(a) {
_TextField.multiline = a;
Update();
_Event("MultiLineChanged");
//return(mMultiLine);
}
function get mMultiLine() {
return(_TextField.multiline);
}
function set mWordWrap(a) {
_TextField.wordWrap = a;
Update();
_Event("WordWrapChanged");
//return(mWordWrap);
}
function get mWordWrap() {
return(_TextField.wordWrap);
}
function set mReadonly(a) {
_TextField.selectable = !a;
//return(mReadonly);
}
function get mReadonly() {
return(!_TextField.selectable);
}
function set mPassword(a) {
_TextField.password = a;
_Event("PasswordChanged");
//return(mPassword);
}
function get mPassword() {
return(_TextField.password);
}
function set mType(a) {
_TextField.type = a;
_Event("TypeChanged");
//return(mType);
}
function get mType() {
return(_TextField.type);
}
function set mMaxChars(a) {
_TextField.maxChars = a;
_Event("MaxCharsChanged");
//return(mMaxChars);
}
function get mMaxChars() {
return(_TextField.maxChars);
}
function set mNumerical(a) {
_TextField._Numerical = a;
UpdateRestrict();
_Event("NumericalChanged");
//return(mNumerical);
}
function get mNumerical() {
return(_TextField._Numerical);
}
function set mMin(a) {
_Min = a;
ValidateText(mText);
_Event("MinChanged");
//return(mMin);
}
function get mMin() {
return(_Min);
}
function set mMax(a) {
_Max = a;
ValidateText(mText);
_Event("MaxChanged");
//return(mMax);
}
function get mMax() {
return(_Max);
}
function set mSmallChange(a) {
_SmallChange = a;
ValidateText(mText);
_Event("SmallChanged");
//return(mSmallChange);
}
function get mSmallChange() {
return(_SmallChange);
}
function set mTextWidth(a) {
_TextWidth = a;
_Event("TextWidthChanged");
//return(mTextWidth);
}
function get mTextWidth() {
return(_TextWidth);
}
function set mTextHeight(a) {
_TextHeight = a;
_Event("TextHeightChanged");
//return(mTextHeight);
}
function get mTextHeight() {
return(_TextHeight);
}
function UpdateRestrict() {
if (_TextField._Numerical) {
_TextField.restrict = "0-9\\.\\-";
} else {
_TextField.restrict = null;
}
}
function Update() {
super.Update();
_TextFormat.color = mFontColor.getRGB();
_TextField._alpha = mFontColor.mAlpha100;
_TextField.setTextFormat(_TextFormat);
_TextField._width = __get__mDisplayRectangle().width;
_TextField._x = 0;
_TextField._y = 0;
_TextField._height = _TextField.textHeight + 4;
switch (mAlignY.toLowerCase()) {
case "centre" :
default :
case "center" :
_TextField._y = (__get__mDisplayRectangle().height - _TextField._height) / 2;
break;
case "top" :
_TextField._y = 0;
break;
case "bottom" :
_TextField._y = __get__mDisplayRectangle().height - _TextField._height;
}
mTextWidth = (_TextField.textWidth);
mTextHeight = (_TextField._height);
}
function Paint() {
super.Paint();
}
var _CLASSID_ = "scidd.Draw.Control.CControl_Text";
}
Symbol 527 MovieClip [__Packages.scidd.Draw.Control.CControl_Label] Frame 0
class scidd.Draw.Control.CControl_Label extends scidd.Draw.Control.CControl_Text
{
var __set__mReadonly, __set__mMultiLine, __set__mWordWrap, __set__mBorderStyle, __set__mBackStyle, __set__mText, FirstPaint;
function CControl_Label (tParent, tTarget) {
super(tParent, tTarget);
__set__mReadonly(true);
__set__mMultiLine(false);
__set__mWordWrap(false);
__set__mBorderStyle("none");
__set__mBackStyle("none");
__set__mText("Label");
FirstPaint();
}
function Clone() {
return(new scidd.Draw.Control.CControl_Label());
}
var _CLASSID_ = "scidd.Draw.Control.CControl_Label";
}
Symbol 528 MovieClip [__Packages.CProfiler] Frame 0
class CProfiler
{
static var obj;
var mList;
function CProfiler () {
mList = new Array();
obj = this;
Clear();
}
static function GetString() {
if (!_Active) {
return(undefined);
}
var _local2 = "";
var _local3 = 0;
for (var _local4 in obj.mList) {
var _local1 = obj.mList[_local4];
_local2 = _local2 + ((((((_local1.mID + " = ") + _local1.mTotalTime) + " ms (") + _local1.mTimes.length) + ")") + newline);
_local3 = _local3 + _local1.mTotalTime;
}
_local2 = _local2 + "-----------------------------\n";
_local2 = _local2 + ((("Total = " + _local3) + " ms") + newline);
return(_local2);
}
static function Clear() {
if (!_Active) {
return(undefined);
}
for (var _local2 in obj.mList) {
var _local1 = obj.mList[_local2];
_local1.mTotalTime = 0;
_local1.mTimes = new Array();
}
}
static function Timer_Start(tID) {
if (!_Active) {
return(undefined);
}
var _local1 = obj.Find(tID);
_local1.mStartTime = getTimer();
}
static function Timer_Stop(tID) {
if (!_Active) {
return(undefined);
}
var _local1 = obj.Find(tID);
_local1.mEndTime = getTimer() - _local1.mStartTime;
_local1.mTotalTime = _local1.mTotalTime + _local1.mEndTime;
_local1.mAverageTotalTime = ((_local1.mAverageTotalTime == 0) ? (_local1.mTotalTime) : ((_local1.mTotalTime + _local1.mAverageTotalTime) / 2));
_local1.mTimes[_local1.mTimes.length] = _local1.mEndTime;
}
function Find(tID) {
for (var _local4 in mList) {
if (mList[_local4].mID == tID) {
return(mList[_local4]);
}
}
var _local2 = new Object();
_local2.mID = tID;
_local2.mTimes = new Array();
_local2.mStartTime = 0;
_local2.mTotalTime = 0;
_local2.mAverageTotalTime = 0;
mList[mList.length] = _local2;
return(_local2);
}
var _CLASSID_ = "CProfiler";
static var _Active = false;
}
Symbol 529 MovieClip [__Packages.CScoreCard] Frame 0
class CScoreCard extends MovieClip
{
static var mList, mSize;
var _visible, _Dead, cacheAsBitmap, _xscale, _yscale, _width, _height, onRelease, _Selected, mThing, __get__mSelected, removeMovieClip, mPosition, mNewX, mStartX, _x, mTimer, _RobotName, _y, _Score, _Position, _Health, _Background;
function CScoreCard () {
super();
mList = ((mList == undefined) ? (new Array()) : (mList));
mList[mList.length] = this;
_visible = false;
_Dead._visible = false;
cacheAsBitmap = true;
mSelected = (false);
_xscale = (_yscale = 75);
mSize = new flash.geom.Point(_width + 2, _height + 2);
onRelease = function () {
this.mSelected = true;
};
}
function set mSelected(a) {
if (a == true) {
if (_Selected._visible == false) {
mThing.mcArena.mTrackThing = mThing;
_Selected._visible = true;
var _local2 = 0;
while (_local2 < mList.length) {
if (mList[_local2] != this) {
mList[_local2].mSelected = false;
}
_local2++;
}
}
} else {
_Selected._visible = false;
}
//return(__get__mSelected());
}
static function IsActive() {
return((((mList.length == 0) || (mList == undefined)) ? false : true));
}
static function PanelWidth() {
return(0);
}
static function PanelHeight() {
if (IsActive()) {
return(mSize.y + 2);
}
return(0);
}
function Dispose() {
removeMovieClip();
var _local2 = 0;
while (_local2 < mList.length) {
if (mList[_local2] == this) {
mList = mList.splice(_local2, 1);
break;
}
_local2++;
}
}
static function RemoveAll() {
var _local1 = 0;
while (_local1 < mList.length) {
mList[_local1].Dispose();
_local1++;
}
mList = new Array();
}
static function UpdateAll() {
mList.sort(_SortOrder);
var _local1 = 0;
var _local2 = 0;
while (_local1 < mList.length) {
var _local3 = mList[_local1];
_local3.mPosition = _local2;
_local2 = ((_local3.mThing.mScore == mList[_local1 + 1].mThing.mScore) ? (_local2) : (_local1 + 1));
_local1++;
}
_local1 = 0;
while (_local1 < mList.length) {
mList[_local1].Update(_local1);
_local1++;
}
}
static function DeactivateAll() {
var _local1 = 0;
while (_local1 < mList.length) {
delete mList[_local1].mThing.mScoreCard;
mList[_local1].removeMovieClip();
_local1++;
}
mList = new Array();
}
static function _SortOrder(a, b) {
if (a.mThing.mScore > b.mThing.mScore) {
return(-1);
}
if (a.mThing.mScore < b.mThing.mScore) {
return(1);
}
return(0);
}
function Update(tPosIndex) {
var _local5 = mPosition;
var _local6 = (((mScreenSize.x - (mList.length * (mSize.x + 2))) / 2) + (tPosIndex * (mSize.x + 2))) + 2;
if (_local6 != mNewX) {
mNewX = _local6;
mStartX = _x;
mTimer = getTimer();
}
if (mTimer != undefined) {
var _local2 = (getTimer() - mTimer) / 500;
if (_local2 > 1) {
_local2 = 1;
delete mTimer;
}
_x = mStartX + ((mNewX - mStartX) * _local2);
}
if (_visible == false) {
_visible = true;
_RobotName = mThing.mRobotName;
_y = mScreenSize.y - (_height + 2);
}
var _local3 = Pad0(String(mThing.mScore));
var _local4 = int((mThing.mLife / mThing.mMaxLife) * 100);
_local5 = "#" + (_local5 + 1);
if (_local3 != _Score) {
_Score = _local3;
}
if (_local5 != _Position) {
_Position = _local5;
}
if (_local4 != _Health) {
_Health.gotoAndStop(_local4);
}
if ((!mThing.mIsAlive) && (_Dead._visible == false)) {
_Dead._visible = true;
_Health._visible = false;
}
}
function Pad0(tString) {
tString = ((tString == undefined) ? "0" : (tString));
while (tString.length < 6) {
tString = "0" + tString;
}
return(tString);
}
function SetColorMatrix(tSprite) {
var _local2 = _Background.filters;
_local2[2] = scidd.Draw.CColor.GetColorMatrixFilter(scidd.Draw.CColor.ColorMatrix_Colorize(scidd.Draw.CColor.FromRGB(mThing.mTint), 1, 0));
_Background.filters = _local2;
}
var _CLASSID_ = "CScoreCard";
var _BASECLASSID_ = "CScoreCard";
static var mScreenSize = CTankCommand.mScreenSize;
}
Symbol 530 MovieClip [__Packages.CCommand_DetectPickup] Frame 0
class CCommand_DetectPickup extends CCommand_Event
{
function CCommand_DetectPickup (tPri) {
super(tPri);
}
function Clone() {
var _local2 = new CCommand_DetectPickup();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
}
function Draw() {
}
var _CLASSID_ = "CCommand_DetectPickup";
var mcLinkID_Icon = "Icon.DetectPickup";
var mHelp_Title = "Detect Pickup";
var mHelp_Text = "Detected Pickup!";
}
Symbol 531 MovieClip [__Packages.CCommand_DetectWall] Frame 0
class CCommand_DetectWall extends CCommand_Event
{
function CCommand_DetectWall (tPri) {
super(tPri);
}
function Clone() {
var _local2 = new CCommand_DetectWall();
_local2.Copy(this);
return(_local2);
}
function Dispose() {
}
function Process(mcParent) {
}
function Draw() {
}
var _CLASSID_ = "CCommand_DetectWall";
var mcLinkID_Icon = "Icon.DetectWall";
var mHelp_Title = "Detect Wall";
var mHelp_Text = "Detected Wall or Edge of Arena!";
}
Symbol 532 MovieClip [__Packages.CEffect_ExplosionMulti] Frame 0
class CEffect_ExplosionMulti extends CEffect
{
var mTint, mLife, __set__mAttachHeight, mcArena, mPosition, __get__mAttachHeight, mDelete;
function CEffect_ExplosionMulti (tArena, tPosition, tHeight, tLife, tTint) {
super(tArena, tPosition, 0);
mTint = tTint;
mLife = ((tLife == undefined) ? 30 : (tLife));
__set__mAttachHeight(tHeight);
}
function Process() {
super.Process();
mLife--;
if ((mLife % 2) == 1) {
var _local3 = mcArena.AddThing(new CEffect_Explosion(mcArena, mPosition.add(new flash.geom.Point(((Math.random() * 2) - 1) * 25, ((Math.random() * 2) - 1) * 25)), __get__mAttachHeight(), mTint));
_local3.mcDraw._xscale = (_local3.mcDraw._yscale = 100 - random(30));
}
if (mLife < 0) {
mDelete = true;
}
}
function Draw() {
}
var _CLASSID_ = "CEffect_ExplosionMulti";
}
Symbol 533 MovieClip [__Packages.CWall] Frame 0
class CWall extends CThing
{
var mState, mCollidable, mcArena, mPosition, CreateSprite, RenderAsBitmap, mDrawOnce;
function CWall (tArena, tPosition, tRotation) {
super(tArena, tPosition, tRotation);
mState = "normal";
mCollidable = true;
mcArena.mMapWho.Add(this, mPosition);
CreateSprite("WALL", _global.MODEL_Wall, 1);
RenderAsBitmap();
mDrawOnce = true;
}
var _CLASSID_ = "CWall";
var _BASECLASSID_ = "CWall";
}
Symbol 534 MovieClip [__Packages.CDroid] Frame 0
class CDroid extends CThing
{
var mState, mCollidable, mcArena, mPosition, mLife;
function CDroid (tArena, tPosition, tRotation) {
super(tArena, tPosition, tRotation);
mState = "normal";
mCollidable = true;
mcArena.mMapWho.Add(this, mPosition);
mLife = 100;
}
function Dispose() {
super.Dispose();
mcArena.mMapWho.Remove(this);
}
function Process() {
}
var _CLASSID_ = "CDroid";
var _BASECLASSID_ = "CDroid";
var mParentClass = true;
}
Symbol 535 MovieClip [__Packages.CDroid_Roamer] Frame 0
class CDroid_Roamer extends CDroid
{
var CreateSprite, mMaxLife, mLife, RenderAsBitmap, mState, mPosition, nPosition, RotationToDelta, nRotation, mRotation, UpdateWorldMatrix, mcArena, mSprite, mStateCount, SetState;
function CDroid_Roamer (tArena, tPosition, tRotation) {
super(tArena, tPosition, tRotation);
CreateSprite("ROAMER", _global.MODEL_Droid_1, 32, 16737945);
mMaxLife = (mLife = 49);
RenderAsBitmap();
}
function Process() {
super.Process();
switch (mState) {
case "normal" :
var _local3 = mPosition.clone();
nPosition = mPosition.add(RotationToDelta(mSpeed));
nRotation = mRotation;
if ((nPosition != mPosition) || (nRotation != mRotation)) {
UpdateWorldMatrix(nPosition, nRotation);
if (mcArena.mMap.CircularCollide(nPosition, mSprite.__get__mRadius2D())) {
mRotation = mRotation + 180;
} else {
mPosition = nPosition;
mRotation = nRotation;
mcArena.mMapWho.Move(this, _local3, mPosition);
}
}
break;
case "turn" :
if (mStateCount == 90) {
SetState("normal");
}
mRotation = mRotation + 1;
}
mStateCount++;
UpdateWorldMatrix(mPosition, mRotation);
}
var _CLASSID_ = "CDroid_Roamer";
var mSpeed = 4;
}
Symbol 536 MovieClip [__Packages.CDroid_Sitter] Frame 0
class CDroid_Sitter extends CDroid
{
var CreateSprite, mMaxLife, mLife, RenderAsBitmap, mDeath, mDelete, mcArena, mPosition, mSprite, mcSort, UpdateWorldMatrix, mRotation;
function CDroid_Sitter (tArena, tPosition, tRotation) {
super(tArena, tPosition, tRotation);
CreateSprite("SITTER", _global.MODEL_Droid_3, 32, 255);
mMaxLife = (mLife = 19);
RenderAsBitmap();
}
function Process() {
super.Process();
if (mDeath) {
mDeath = false;
mDelete = true;
var _local3 = mcArena.AddThing(new CEffect_ExplosionMulti(mcArena, mPosition, mSprite.__get__mHeight2D(), 4));
mcSort._alpha = 25;
}
UpdateWorldMatrix(mPosition, mRotation);
}
var _CLASSID_ = "CDroid_Sitter";
var mSpeed = 10;
}
Symbol 537 MovieClip [__Packages.CDroid_Spike] Frame 0
class CDroid_Spike extends CDroid
{
var CreateSprite, mTint, mMaxLife, mLife, RenderAsBitmap, mDeath, mDelete, mcArena, mPosition, mSprite, mcSort, mState, nPosition, RotationToDelta, nRotation, mRotation, UpdateWorldMatrix, mStateCount, SetState;
function CDroid_Spike (tArena, tPosition, tRotation) {
super(tArena, tPosition, tRotation);
CreateSprite("SPIKE", _global.MODEL_Droid_2, 32);
mTint = 16763904 /* 0xFFCC00 */;
mMaxLife = (mLife = 29);
RenderAsBitmap();
}
function Process() {
super.Process();
if (mDeath) {
mDeath = false;
mDelete = true;
var _local5 = mcArena.AddThing(new CEffect_ExplosionMulti(mcArena, mPosition, mSprite.__get__mHeight2D(), 4));
mcSort._alpha = 25;
}
switch (mState) {
case "normal" :
var _local4 = mPosition.clone();
nPosition = mPosition.add(RotationToDelta(mSpeed));
nRotation = mRotation;
if ((nPosition != mPosition) || (nRotation != mRotation)) {
UpdateWorldMatrix(nPosition, nRotation);
var _local6;
var _local3 = mStateCount >= (30 + random(5));
if (_local3 == false) {
_local3 = mcArena.mMap.CircularCollide(nPosition, mSprite.__get__mRadius2D());
}
if (_local3 == false) {
_local3 = mcArena.mMapWho.ThingCollide_Block(this, nPosition) != undefined;
}
if (_local3) {
SetState("wait");
} else {
mPosition = nPosition;
mRotation = nRotation;
mcArena.mMapWho.Move(this, _local4, mPosition);
UpdateWorldMatrix(mPosition, mRotation);
}
}
break;
case "wait" :
if (mStateCount == 30) {
SetState("normal");
}
mRotation = mRotation + 19;
}
mStateCount++;
}
var _CLASSID_ = "CDroid_Spike";
var mSpeed = 10;
}
Symbol 538 MovieClip [__Packages.CPickup] Frame 0
class CPickup extends CThing
{
var mState, mCollidable, mcArena, mPosition, CreateSprite, mDrawOnce, RenderAsBitmap, mRotation, mDelete, PlaySound, mStateCount;
function CPickup (tArena, tPosition, tRotation) {
super(tArena, tPosition, tRotation);
mState = "normal";
mCollidable = false;
mcArena.mMapWho.Add(this, mPosition);
CreateSprite("PICKUP", _global.MODEL_Pickup, 32, 16250265);
mDrawOnce = true;
RenderAsBitmap();
mRotation = random(360);
}
function Dispose() {
super.Dispose();
mcArena.mMapWho.Remove(this);
}
function PickedUp() {
mDelete = true;
PlaySound(CSound.mPickup);
}
function Process() {
mStateCount++;
}
var _CLASSID_ = "CPickup";
var _BASECLASSID_ = "CPickup";
var mParentClass = true;
}
Symbol 539 MovieClip [__Packages.CArena_MapWho] Frame 0
class CArena_MapWho
{
var mcArena, mSize, ylineMarked, mMap;
function CArena_MapWho (tArena, w, h) {
mcArena = tArena;
mSize = new flash.geom.Point(w, h);
ylineMarked = new Array();
mMap = new Array();
var _local2 = 0;
while (_local2 < (w * h)) {
mMap[_local2] = new Array();
_local2++;
}
}
function Move(tThing, oPosition, nPosition) {
Remove(tThing, oPosition);
Add(tThing, nPosition);
}
function Remove(tThing, p) {
p = ((p == undefined) ? (tThing.mPosition) : (p));
var _local2 = _MapCellW(p);
if (_local2 == undefined) {
return(undefined);
}
for (var _local5 in _local2) {
if (_local2[_local5] == tThing) {
_local2.splice(_local5, 1);
AddYLine(p.y, -1);
break;
}
}
}
function Add(tThing, p) {
var _local2 = _MapCellW(p);
if (_local2 == undefined) {
return(undefined);
}
AddYLine(p.y, 1);
_local2[_local2.length] = tThing;
}
function AddYLine(py, tAdd) {
py = Math.floor(py / mCellSize);
if ((py >= mSize.y) || (py < 0)) {
return(undefined);
}
ylineMarked[py] = ((ylineMarked[py] == undefined) ? (tAdd) : (ylineMarked[py] + tAdd));
}
function _MapCell(x, y) {
return((((((x >= mSize.x) || (y >= mSize.y)) || (x < 0)) || (y < 0)) ? undefined : (mMap[x + (y * mSize.x)])));
}
function _MapCellQ(x, y) {
return(mMap[x + (y * mSize.x)]);
}
function _ValidateBounds(p) {
p.x = ((p.x >= mSize.x) ? ((p.x = mSize.x - 1)) : (((p.x < 0) ? ((p.x = 0)) : (p.x))));
p.y = ((p.y >= mSize.y) ? ((p.y = mSize.y - 1)) : (((p.y < 0) ? ((p.y = 0)) : (p.y))));
}
function _MapCellW(p) {
return(_MapCell(Math.floor(p.x / mCellSize), Math.floor(p.y / mCellSize)));
}
function ThingCollide_Block(tThing, nPosition, returnFirst, tRadius) {
returnFirst = ((returnFirst == undefined) ? true : (returnFirst));
nPosition = ((nPosition == undefined) ? (tThing.mPosition) : (nPosition));
var _local4 = ((tRadius == undefined) ? (tThing.mSprite.mRadius2D) : (tRadius));
if (_local4 == undefined) {
return(undefined);
}
var _local7 = new flash.geom.Point(nPosition.x - _local4, nPosition.y - _local4);
var _local5 = new flash.geom.Point(nPosition.x + _local4, nPosition.y + _local4);
var _local8 = ThingCollide_GetCells(_local7, _local5, true);
var _local6 = new Array();
for (var _local12 in _local8) {
var _local2 = _local8[_local12];
if (_local2.mID != tThing.mID) {
_local4 = _local2.mSprite.mRadius2D;
var _local3 = _local2.mPosition;
if ((((_local7.x <= (_local3.x + _local4)) && (_local5.x >= (_local3.x - _local4))) && (_local7.y <= (_local3.y + _local4))) && (_local5.y >= (_local3.y - _local4))) {
if (returnFirst) {
return(_local2);
}
_local6[_local6.length] = _local2;
}
}
}
return((returnFirst ? undefined : (_local6)));
}
function ThingCollide_Line(tThing, p1, p2, returnFirst) {
returnFirst = ((returnFirst == undefined) ? true : (returnFirst));
if ((p1 == undefined) || (p2 == undefined)) {
return((returnFirst ? undefined : (new Array())));
}
var _local15 = ThingCollide_GetCells(p1, p2);
ThingCollide_SortCells(_local15, p1);
var _local14 = new Array();
var _local9 = 0;
while (_local9 < _local15.length) {
var _local7 = _local15[_local9];
if ((_local7.mID != tThing.mID) && (_local7.mIsAlive)) {
var _local3 = _local7.mSprite.mRadius2D_D;
_local3 = _local7.mSprite.mRadius2D;
var _local4 = _local7.mPosition;
var _local6 = [new flash.geom.Point(_local4.x - _local3, _local4.y - _local3), new flash.geom.Point(_local4.x + _local3, _local4.y - _local3), new flash.geom.Point(_local4.x + _local3, _local4.y + _local3), new flash.geom.Point(_local4.x - _local3, _local4.y + _local3)];
var _local2 = new Array();
if (scidd.Math.CMath.LineIntersection4(p1, p2, _local6[3], _local6[0], tc_poi1)) {
_local2[_local2.length] = tc_poi1;
}
if (scidd.Math.CMath.LineIntersection4(p1, p2, _local6[0], _local6[1], tc_poi2)) {
_local2[_local2.length] = tc_poi2;
}
if (scidd.Math.CMath.LineIntersection4(p1, p2, _local6[1], _local6[2], tc_poi3)) {
_local2[_local2.length] = tc_poi3;
}
if (scidd.Math.CMath.LineIntersection4(p1, p2, _local6[2], _local6[3], tc_poi4)) {
_local2[_local2.length] = tc_poi4;
}
if (_local2.length) {
var _local12 = _local2[0];
var _local10 = sqrdist(_local2[0], p1);
var _local11;
var _local5 = 1;
while (_local5 < _local2.length) {
_local11 = sqrdist(_local2[_local5], p1);
if (_local11 < _local10) {
_local10 = _local11;
_local12 = _local2[_local9];
}
_local5++;
}
_local7.mEffectPOI = _local12.clone();
if (returnFirst) {
return(_local7);
}
_local14[_local14.length] = _local7;
}
}
_local9++;
}
return((returnFirst ? undefined : (_local14)));
}
function sqrdist(p1, p2) {
var _local2 = p2.x - p1.x;
var _local1 = p2.y - p1.y;
return((_local2 * _local2) + (_local1 * _local1));
}
function ThingCollide_LineClosest(tThing, p1, p2) {
return(ThingCollide_Line(tThing, p1, p2, true));
}
function ThingCollide_SortCells(tThingList, p) {
for (var _local4 in tThingList) {
tThingList[_local4].mMapwho_Tag = sqrdist(tThingList[_local4].mPosition, p);
}
tThingList.sort(_sortThing);
}
function _sortThing(a, b) {
if (a.mMapwho_Tag < b.mMapwho_Tag) {
return(-1);
}
if (a.mMapwho_Tag > b.mMapwho_Tag) {
return(1);
}
return(0);
}
function ThingCollide_GetCells(pMin, pMax, tFast) {
var _local6;
var _local5;
if (tFast) {
_local6 = new flash.geom.Point(Math.floor((pMin.x / mCellSize) - 0.5), Math.floor((pMin.y / mCellSize) - 0.5));
_local5 = new flash.geom.Point(Math.floor((pMax.x / mCellSize) + 0.5), Math.floor((pMax.y / mCellSize) + 0.5));
} else {
_local6 = new flash.geom.Point(pMin.x / mCellSize, pMin.y / mCellSize);
_local5 = new flash.geom.Point(pMax.x / mCellSize, pMax.y / mCellSize);
if (_local6.x > _local5.x) {
var _local11 = _local6.x;
_local6.x = _local5.x;
_local5.x = _local11;
}
if (_local6.y > _local5.y) {
var _local11 = _local6.y;
_local6.y = _local5.y;
_local5.y = _local11;
}
_local6.x = Math.floor(_local6.x - 0.5);
_local6.y = Math.floor(_local6.y - 0.5);
_local5.x = Math.floor(_local5.x + 0.5);
_local5.y = Math.floor(_local5.y + 0.5);
_ValidateBounds(_local6);
_ValidateBounds(_local5);
}
var _local7 = new Array();
var _local4 = _local6.y;
while (_local4 <= _local5.y) {
if (ylineMarked[_local4]) {
var _local8 = _local4 * mSize.x;
var _local2 = _local6.x;
while (_local2 <= _local5.x) {
var _local3 = mMap[_local2 + _local8];
if (_local3.length) {
_local7 = _local7.concat(_local3);
}
_local2++;
}
}
_local4++;
}
return(_local7);
}
function PointCollide(tPoint) {
var _local2 = new flash.geom.Point(Math.floor(tPoint.x / mCellSize), Math.floor(tPoint.y / mCellSize));
return(_MapCell(_local2.x, _local2.y) != 0);
}
function InShapeCollide(tShape, tID) {
var _local2 = new Array();
var _local5 = mcArena.mThingList;
for (var _local9 in _local5) {
var _local4 = _local5[_local9];
if ((_local4.mID != tID) && (_local4.mCollidable)) {
if (scidd.Math.CMath.PointInShape_Closed(_local4.mPosition, tShape)) {
_local2[_local2.length] = _local4;
}
}
}
if (_local2.length) {
var _local6 = 10000000 /* 0x989680 */;
var _local8;
for (var _local9 in _local2) {
var _local4 = _local2[_local9];
var _local3 = flash.geom.Point.distance(tShape[0], _local4.mPosition);
if (_local3 < _local6) {
_local6 = _local3;
_local8 = _local4;
}
}
return(_local8);
}
return(undefined);
}
function LineCollide(p1, p2, tID) {
var _local11 = new flash.geom.Point(Math.floor(p1.x / mCellSize), Math.floor(p1.y / mCellSize));
var _local10 = new flash.geom.Point(Math.floor(p2.x / mCellSize), Math.floor(p2.y / mCellSize));
if (_local11.x > _local10.x) {
var _local17 = _local11.x;
_local11.x = _local10.x;
_local10.x = _local17;
}
if (_local11.y > _local10.y) {
var _local17 = _local11.y;
_local11.y = _local10.y;
_local10.y = _local17;
}
var _local13;
var _local7 = 10000000 /* 0x989680 */;
var _local12;
var _local9 = _local11.y;
while (_local9 <= _local10.y) {
var _local6 = _local11.x;
while (_local6 <= _local10.x) {
var _local3 = _MapCell(_local6, _local9);
for (var _local15 in _local3) {
var _local2 = _local3[_local15];
if (_local2.mCollidable && (_local2.mID != tID)) {
var _local4 = _local2.LineCollide(p1, p2);
var _local5 = flash.geom.Point.distance(p1, _local4);
if (_local5 < _local7) {
_local7 = _local5;
_local13 = _local4;
_local12 = _local3[_local15];
}
}
}
_local6++;
}
_local9++;
}
return(((_local12 == undefined) ? undefined : ({mThing:_local12, mPOI:_local13})));
}
function LineCollideQ(p1, p2) {
return(true);
}
var _CLASSID_ = "CArena_MapWho";
static var mCellSize = CArena_Map.mCellSize;
static var tc_poi1 = new flash.geom.Point(0, 0);
static var tc_poi2 = new flash.geom.Point(0, 0);
static var tc_poi3 = new flash.geom.Point(0, 0);
static var tc_poi4 = new flash.geom.Point(0, 0);
}
Symbol 540 MovieClip [__Packages.CProgrammer_Selection] Frame 0
class CProgrammer_Selection
{
var mcParent, mcProgrammer, mSelection, mMouseOver_Icon, mDrag_Icon, mPosOff, mMouseOver_Container;
function CProgrammer_Selection (tProgrammer, tParentMC) {
mcParent = tParentMC;
mcProgrammer = tProgrammer;
SetupMouseEvents();
}
function Dispose() {
}
function Clear() {
for (var _local2 in mSelection) {
mSelection[_local2].mSelected = false;
}
mSelection = new Array();
}
function Add(tIcon) {
mSelection = ((mSelection == undefined) ? (new Array()) : (mSelection));
Clear();
tIcon.mSelected = true;
mSelection[mSelection.length] = tIcon;
}
function SetupMouseEvents() {
mcParent.pClass = this;
mcParent.onMouseDown = function () {
this.pClass.ME_MouseDown();
};
}
function ME_MouseDown() {
if (mMouseOver_Icon == undefined) {
return(undefined);
}
mcParent.onMouseMove = function () {
this.pClass.ME_MouseMove(new flash.geom.Point(this._xmouse, this._ymouse));
};
mcParent.onMouseUp = function () {
this.pClass.ME_MouseUp(new flash.geom.Point(this._xmouse, this._ymouse));
};
}
function ME_MouseMove(mousePosition) {
if (mDrag_Icon == undefined) {
DragSelection_Start(mMouseOver_Icon);
}
DragSelection_Process(mousePosition);
}
function ME_MouseUp(mousePosition) {
delete mcParent.onMouseMove;
delete mcParent.onMouseUp;
DragSelection_Stop(mousePosition);
if (mMouseOver_Icon == undefined) {
return(undefined);
}
Add(mMouseOver_Icon);
}
function DragSelection_Start(tIcon) {
mMouseOver_Icon = undefined;
mPosOff = new flash.geom.Point(tIcon._xmouse, tIcon._ymouse);
mDrag_Icon = tIcon.Clone(mcParent);
tIcon.__set__mHighlight(false);
mDrag_Icon._alpha = 75;
switch (tIcon.mClickAction) {
case "Move" :
tIcon.mcContainer.Icon_Delete(tIcon);
break;
case "Copy" :
}
}
function DragSelection_Process(mousePosition) {
mDrag_Icon._x = mousePosition.x - (mDrag_Icon._width / 2);
mDrag_Icon._y = mousePosition.y - (mDrag_Icon._height / 2);
if (mMouseOver_Container != undefined) {
mMouseOver_Container.Icon_ShowInsert(mDrag_Icon);
}
updateAfterEvent();
}
function DragSelection_Stop(mousePosition) {
if (mDrag_Icon == undefined) {
return(undefined);
}
mDrag_Icon._x = mousePosition.x - mPosOff.x;
mDrag_Icon._y = mousePosition.y - mPosOff.y;
mMouseOver_Container.HideInsert();
if (mMouseOver_Container != undefined) {
mMouseOver_Container.Icon_Insert(mDrag_Icon);
}
mDrag_Icon.removeMovieClip();
mDrag_Icon = undefined;
}
function IconRollOver(tIcon) {
mMouseOver_Icon = tIcon;
}
function IconRollOut(tIcon) {
mMouseOver_Icon = undefined;
}
function ContainerRollOver(tContainer) {
mMouseOver_Container.HideInsert();
mMouseOver_Container = tContainer;
}
function ContainerRollOut(tContainer) {
mMouseOver_Container.HideInsert();
if (tContainer == mMouseOver_Container) {
mMouseOver_Container = undefined;
}
}
var _CLASSID_ = "CProgrammer_Selection";
}
Symbol 541 MovieClip [__Packages.CProgrammer_IconContainer] Frame 0
class CProgrammer_IconContainer extends MovieClip
{
var mcScrollerPane, _Icon_Main, cacheAsBitmap, mcMainIcon, mIconList, mThing, mcProgrammer, mCommand, _Color, attachMovie, getNextHighestDepth, mcPriorityIcon, _Scroll_Left, _Scroll_Right;
function CProgrammer_IconContainer () {
super();
mcScrollerPane._Icon._visible = false;
mcScrollerPane._Insert._visible = false;
mcScrollerPane._Empty._visible = false;
_Icon_Main._visible = false;
Scroller_Setup();
cacheAsBitmap = true;
mcScrollerPane.cacheAsBitmap = true;
}
function Clear() {
mcMainIcon.removeMovieClip();
for (var _local2 in mIconList) {
mIconList[_local2].removeMovieClip();
}
mIconList = new Array();
}
function _Update() {
if (mThing != undefined) {
AssignThing(mcProgrammer, mThing);
} else {
AssignCommand(mcProgrammer, mCommand);
}
}
function Dispose() {
}
function Process() {
}
function Draw() {
}
function AssignThing(tProgrammer, tThing) {
mcProgrammer = tProgrammer;
_Color.filters = [scidd.Draw.CColor.GetColorMatrixFilter(scidd.Draw.CColor.ColorMatrix_Colorize(scidd.Draw.CColor.FromRGB(tThing.mColorCode), 1, 0))];
Clear();
mcMainIcon = attachMovie("Programmer.Icon", "_Icon", getNextHighestDepth(), {_x:_Icon_Main._x, _y:_Icon_Main._y});
mcMainIcon.AssignThing(tProgrammer, tThing);
mcMainIcon.SetMousePress_None();
mIconList = new Array();
mThing = tThing;
var _local2 = 0;
var _local4 = 0;
while (_local2 < tThing.mCommand_RegisterList.length) {
var _local5 = tThing.mCommand_RegisterList[_local2];
if (_local5.mAction) {
var _local3 = mcScrollerPane.attachMovie("Programmer.Icon", "_Icon" + _local2, mcScrollerPane.getNextHighestDepth(), {_x:_local4, _y:0});
_local3.AssignCommand(tProgrammer, _local5);
_local3.SetMousePress_SelectAndCopy(this);
_local4 = _local4 + _Icon_Main._width;
mIconList[mIconList.length] = _local3;
}
_local2++;
}
mcScrollerPane._Background._width = (((_local4 + 5) < mcScrollerPane.mStartWidth) ? (mcScrollerPane.mStartWidth) : (_local4 + 5));
Scroller_Update();
}
function AssignCommand(tProgrammer, pCommand) {
mcProgrammer = tProgrammer;
_Color.filters = [scidd.Draw.CColor.GetColorMatrixFilter(scidd.Draw.CColor.ColorMatrix_Colorize(scidd.Draw.CColor.FromRGB(pCommand.mColorCode), 1, 0))];
Clear();
mcMainIcon = attachMovie("Programmer.Icon", "_Icon", getNextHighestDepth(), {_x:_Icon_Main._x, _y:_Icon_Main._y});
mcMainIcon.AssignCommand(tProgrammer, pCommand);
mcMainIcon.SetMousePress_None();
mCommand = pCommand;
mcPriorityIcon._Move_Up.pClass = (mcPriorityIcon._Move_Down.pClass = tProgrammer);
mcPriorityIcon._Move_Up.pContainer = (mcPriorityIcon._Move_Down.pContainer = this);
mcPriorityIcon._Move_Up.onRelease = function () {
this.pContainer.CompileRobot();
this.pClass.IconContainer_MoveUp(this.pContainer);
};
mcPriorityIcon._Move_Down.onRelease = function () {
this.pContainer.CompileRobot();
this.pClass.IconContainer_MoveDown(this.pContainer);
};
SetMouseEvents();
var _local2 = 0;
var _local5 = 0;
while (_local2 < pCommand.mCommandList.length) {
var _local3 = pCommand.mCommandList[_local2];
_local3.mColorCode = _local3.mThing.mColorCode;
var _local4 = mcScrollerPane.attachMovie("Programmer.Icon", "_Icon" + _local2, mcScrollerPane.getNextHighestDepth(), {_x:_local5, _y:0});
_local4.AssignCommand(tProgrammer, _local3);
_local4.SetMousePress_SelectAndMove(this);
_local5 = _local5 + _Icon_Main._width;
mIconList[mIconList.length] = _local4;
_local2++;
}
mcScrollerPane._Empty._visible = true;
mcScrollerPane._Empty._x = _local5;
_local5 = _local5 + _Icon_Main._width;
mcScrollerPane._Background._width = (((_local5 + 5) < mcScrollerPane.mStartWidth) ? (mcScrollerPane.mStartWidth) : (_local5 + 5));
if (mcScrollerPane._Background._width < mcScrollerPane.mStartWidth) {
mcScrollerPane._Background._width = mcScrollerPane.mStartWidth;
}
mcScrollerPane._Background._width = Math.round(mcScrollerPane._Background._width);
Scroller_Update();
}
function SetMouseEvents() {
mcScrollerPane.pClass = this;
mcScrollerPane.onMouseMove = function () {
this.pClass.ME_MouseMove(new flash.geom.Point(this._xmouse, this._ymouse));
};
}
function ME_MouseMove(mp) {
var _local3 = (((mp.x >= 0) && (mp.x < mcScrollerPane._width)) && (mp.y >= 0)) && (mp.y < mcScrollerPane._height);
if (mcScrollerPane.mMouseOver != _local3) {
mcScrollerPane.mMouseOver = _local3;
if (mcScrollerPane.mMouseOver == false) {
mcProgrammer.mSelection.ContainerRollOut(this);
} else {
mcProgrammer.mSelection.ContainerRollOver(this);
}
}
}
function Icon_DragOver(tIcon) {
}
function Icon_Insert(tIcon, tAction) {
tAction = ((tAction == undefined) ? "free" : (tAction));
switch (tAction) {
case "free" :
var _local3 = mCommand.AddCommand(tIcon.mCommand.mThing, tIcon.mCommand, GetInsertIndex());
CompileRobot();
break;
case "end" :
break;
case "begin" :
}
_Update();
}
function CompileRobot(tThing) {
CSaveData.obj.SetCodeForMyCombot(mcProgrammer.mThing.mCodeIndex, CCommand_Compiler.Encode_Thing(mcProgrammer.mThing));
}
function Icon_ShowInsert(tIcon) {
if ((mCommand != undefined) && (mCommand.mCommandListFull)) {
return(undefined);
}
mcScrollerPane._Insert._visible = true;
var _local2 = GetInsertIndex();
_local2 = ((_local2 > mIconList.length) ? (mIconList.length) : (_local2));
mcScrollerPane._Insert._x = _local2 * CProgrammer_Icon.mWidth;
}
function HideInsert() {
mcScrollerPane._Insert._visible = false;
}
function GetInsertIndex() {
return(Math.round(mcScrollerPane._xmouse / CProgrammer_Icon.mWidth));
}
function Icon_Delete(tIcon) {
if (mCommand != undefined) {
for (var _local3 in mIconList) {
if (tIcon == mIconList[_local3]) {
mCommand.DeleteCommand(tIcon.mCommand);
tIcon.removeMovieClip();
mIconList.splice(_local3, 1);
CompileRobot();
break;
}
}
}
_Update();
}
function Icon_Copy(tIcon) {
_Update();
}
function FindCommand(tCommand) {
for (var _local3 in mIconList) {
if (mIconList[_local3].mCommand == tCommand) {
return(mIconList[_local3]);
}
}
return(undefined);
}
function Scroller_Setup() {
var _local3 = new flash.filters.DropShadowFilter(5, 45, 0, 1, 4, 4, 0.34, 1);
var _local2 = new flash.filters.BevelFilter(2, 45, 16777215, 1, 0, 1, 4, 4, 0.5, 1, "inner");
_Scroll_Left.filters = [_local3, _local2];
_Scroll_Right.filters = [_local3, _local2];
mcScrollerPane.mStartWidth = mcScrollerPane._Background._width;
_Scroll_Left.pClass = this;
_Scroll_Left.onPress = function () {
this.pClass.Scroller_ScrollLeft();
};
_Scroll_Right.pClass = this;
_Scroll_Right.onPress = function () {
this.pClass.Scroller_ScrollRight();
};
}
function Scroller_Update() {
Scroller_CheckBounds();
}
function Scroller_ScrollLeft() {
mcScrollerPane._x = mcScrollerPane._x + (CProgrammer_Icon.mWidth / 2);
Scroller_CheckBounds();
}
function Scroller_ScrollRight() {
mcScrollerPane._x = mcScrollerPane._x - (CProgrammer_Icon.mWidth / 2);
Scroller_CheckBounds();
}
function Scroller_CheckBounds() {
var _local2 = true;
var _local3 = true;
if (mcScrollerPane._x <= ((_Scroll_Right._x - _Scroll_Right._width) - mcScrollerPane._width)) {
mcScrollerPane._x = (_Scroll_Right._x - _Scroll_Right._width) - mcScrollerPane._width;
_local2 = false;
}
if (mcScrollerPane._x >= (_Scroll_Left._x + _Scroll_Left._width)) {
mcScrollerPane._x = _Scroll_Left._x + _Scroll_Left._width;
_local3 = false;
}
if (mcScrollerPane._Background._width <= mcScrollerPane.mStartWidth) {
_local2 = false;
_local3 = _local2;
mcScrollerPane._x = _Scroll_Left._x + _Scroll_Left._width;
}
_Scroll_Left.enabled = (_local3 ? true : false);
_Scroll_Left._alpha = (_local3 ? 100 : 50);
_Scroll_Right.enabled = (_local2 ? true : false);
_Scroll_Right._alpha = (_local2 ? 100 : 50);
}
var _CLASSID_ = "CProgrammer_IconContainer";
}
Symbol 542 MovieClip [__Packages.CProgrammer_Controller] Frame 0
class CProgrammer_Controller extends MovieClip
{
static var mSize;
var mcBackground, mcContainer, mcController, mcWindow, mcDebug_Components, mcDebug_Commands, onEnterFrame, _xscale, _yscale, _width, _height, _x, _y, _Help_ActivateProgrammer, cacheAsBitmap, mcProgrammer, mcIconList, mThing, removeMovieClip, mcArena, _parent, _Size;
function CProgrammer_Controller () {
super();
mcBackground = mcContainer._Background;
mcController = mcContainer._Controller;
mcWindow = mcContainer._Window;
mcDebug_Components = mcContainer._Debug_Components;
mcDebug_Commands = mcContainer._Debug_Commands;
onEnterFrame = function () {
this.SetIcon(this.mcController._Icon_Play, "Icon.Control.Play", 1, 26367, "Run Robot code!", this.Control_Play);
this.SetIcon(this.mcController._Icon_FWD, "Icon.Control.FWD", 1, 26367, "Step forward!", this.Control_FWD);
this.SetIcon(this.mcController._Icon_REV, "Icon.Control.REV", 1, 26367, "Step backwards!", this.Control_REV);
this.SetIcon(this.mcController._Icon_Pause, "Icon.Control.Pause", 1, 26367, "Pause!", this.Control_Pause);
this.SetIcon(this.mcController._Icon_Programmer, "Icon.Control.Programmer", 2, 26367, "Open Learner", this.Control_Programmer);
this.SetIcon(this.mcController._Icon_PlaceDroid, "Icon.Place.Droid", 4, 26367, "Place Droid", this.Control_PlaceDroid);
this.SetIcon(this.mcController._Icon_PlaceWall, "Icon.Place.Wall", 4, 26367, "Place Wall", this.Control_PlaceWall);
this.SetIcon(this.mcController._Icon_PlacePickup, "Icon.Place.Pickup", 4, 26367, "Place Pickup", this.Control_PlacePickup);
this.mcController._Icon_PlaceDroid._visible = false;
this.mcController._Icon_PlaceWall._visible = false;
this.mcController._Icon_PlacePickup._visible = false;
this.SetIcon(this.mcController._Icon_ResetLevel, "Icon.Control.ResetLevel", 3, 16711680, "Reset the Arena", this.Control_ResetLevel);
this.SetIcon(this.mcController._Icon_Exit, "Icon.Control.Exit", 3, 16711680, "Exit current Arena", this.Control_Exit);
this.Control_Play();
this.mcBackground.pClass = this.mcContainer;
this.mcWindow.SetHelpText = function (tText) {
this._Bar_Bottom.mText = tText;
};
delete this.onEnterFrame;
};
_xscale = (_yscale = 75);
mSize = new flash.geom.Point(_width, _height);
_x = _x - ((10 * _xscale) / 100);
_y = _y - ((mcWindow._Bar_Top._height * _yscale) / 100);
_Help_ActivateProgrammer._visible = CSaveData.obj.mHelp_ActivateProgrammer;
cacheAsBitmap = true;
SetBaseThing();
}
function get mPanelWidth() {
return((((mcProgrammer == undefined) || (mcProgrammer._visible == false)) ? 0 : (_width)));
}
function get mPanelHeight() {
return(_height);
}
function SetIcon(tIcon, tIconImage, tGroup, tColor, tTooltip, tFunction) {
tIcon.Enable(this, true);
tIcon.CreateIcon(tIconImage, tColor);
tIcon.SetTooltip(tTooltip);
tIcon.pClass = this;
tIcon.mGroup = tGroup;
tIcon.mFunction = tFunction;
tIcon.onRelease = function () {
this.mFunction.call(this.pClass, this);
};
mcIconList = ((mcIconList == undefined) ? (new Array()) : (mcIconList));
mcIconList[mcIconList.length] = tIcon;
}
function SetBaseThing(tThing) {
mcProgrammer.Dispose();
delete mcProgrammer;
mThing = tThing;
if ((mThing.mCodeIndex >= 4) || (mThing == undefined)) {
mcController._Icon_Programmer._alpha = 50;
mcController._Icon_Programmer.enabled = false;
} else {
mcController._Icon_Programmer._alpha = 100;
mcController._Icon_Programmer.enabled = true;
}
}
function Process() {
if (mcProgrammer._visible) {
mcProgrammer.Monitor();
}
}
function Dispose() {
mcProgrammer.Dispose();
removeMovieClip();
}
function Control_Play(tIcon) {
tIcon = ((tIcon == undefined) ? (mcController._Icon_Play) : (tIcon));
SelectIcon(tIcon);
mcArena.mState_Play = true;
}
function Control_FWD(tIcon) {
SelectIcon(tIcon);
mcArena.mState_Step = true;
mcArena.mState_Play = false;
}
function Control_REV(tIcon) {
SelectIcon(tIcon);
}
function Control_Pause(tIcon) {
tIcon = ((tIcon == undefined) ? (mcController._Icon_Pause) : (tIcon));
SelectIcon(tIcon);
mcArena.mState_Play = false;
mcArena.mState_Step = false;
}
function Control_Teach(tIcon) {
SelectIcon(tIcon);
}
function Control_Exit(tIcon) {
SelectIcon(tIcon);
mcArena.SetCompleteState("aborted");
}
function Control_ResetLevel(tIcon) {
SelectIcon(tIcon);
mcArena.SetCompleteState("resetlevel");
}
function Control_Programmer(tIcon) {
if (mcProgrammer._visible) {
mcProgrammer._visible = false;
mcProgrammer.ResetThing();
tIcon.mSelected = false;
return(undefined);
}
CSaveData.obj.__set__mHelp_ActivateProgrammer(false);
_Help_ActivateProgrammer._visible = CSaveData.obj.mHelp_ActivateProgrammer;
CScoreCard.DeactivateAll();
mcArena.mArena_Data.mObjective = "none";
mcArena.mcTimer.removeMovieClip();
delete mcArena.mcTimer;
SelectIcon(tIcon);
var _local2 = _parent;
if (mcProgrammer == undefined) {
mcProgrammer = _parent.attachMovie("Programmer", "_Programmer", _parent.getNextHighestDepth());
mcProgrammer.AddBaseThing(mThing, mcArena.mArena_Data.mLearnType);
mcProgrammer._x = _x;
mcProgrammer._y = (_y + ((_Size._height * _yscale) / 100)) + 2;
} else {
mcProgrammer.ResetThing(true);
mcProgrammer._visible = true;
}
}
function Control_PlaceDroid() {
}
function Control_PlaceWall() {
}
function Control_PlacePickup() {
}
function SelectIcon(tIcon) {
for (var _local3 in mcIconList) {
if (tIcon.mGroup == mcIconList[_local3].mGroup) {
mcIconList[_local3].mSelected = false;
}
}
tIcon.mSelected = true;
}
var _CLASSID_ = "CProgrammer_Controller";
}
Symbol 543 MovieClip [__Packages.CProgrammer_Window] Frame 0
class CProgrammer_Window extends MovieClip
{
var _Bar_ActionOutline, _Bar_EventOutline, filters, _Bar_Top, _Bar_Actions, _Bar_Bottom, _Background;
function CProgrammer_Window () {
super();
_Bar_EventOutline.mStartHeight = (_Bar_ActionOutline.mStartHeight = _Bar_ActionOutline._height);
var _local4 = new flash.filters.DropShadowFilter(5, 45, 0, 1, 4, 4, 0.34, 1);
var _local3 = new flash.filters.BevelFilter(2, 45, 16777215, 1, 0, 1, 4, 4, 0.5, 1, "inner");
filters = [_local4, _local3];
Update(1, 0);
_Bar_Top._Close.pClass = this;
_Bar_Top._Close.onRelease = function () {
this.pClass.mcProgrammer.Hide();
};
}
function Update(tEventItems, tActionItems) {
_Bar_EventOutline._height = tEventItems * _Bar_EventOutline.mStartHeight;
_Bar_ActionOutline._height = tActionItems * _Bar_ActionOutline.mStartHeight;
var _local2 = 0;
_local2 = SetMCPosition(_Bar_Top, 0, _local2);
_local2 = SetMCPosition(_Bar_EventOutline, 0, _local2);
_local2 = SetMCPosition(_Bar_Actions, 0, _local2);
_local2 = SetMCPosition(_Bar_ActionOutline, 0, _local2);
_local2 = SetMCPosition(_Bar_Bottom, 0, _local2);
_Background._height = _local2;
}
function SetMCPosition(mc, px, py) {
mc._x = px;
mc._y = py;
return(py + mc._height);
}
function GetEventPosition() {
return(new flash.geom.Point(_Bar_EventOutline._x, _Bar_EventOutline._y));
}
function GetActionPosition() {
return(new flash.geom.Point(_Bar_ActionOutline._x, _Bar_ActionOutline._y));
}
function SetTitleText(tText) {
_Bar_Top.mText = tText;
}
function SetHelpText(tText) {
_Bar_Bottom.mText = tText;
}
function Dispose() {
}
function Process() {
}
function Draw() {
}
var _CLASSID_ = "CProgrammer_Window";
}
Symbol 544 MovieClip [__Packages.CScreen] Frame 0
class CScreen extends MovieClip
{
var mcTankCommand, _parent, mcContainer, _visible, _Icon_Back, mState, mStateCount, _Size;
function CScreen () {
super();
mcTankCommand = _parent._parent;
mcContainer = _parent;
_visible = false;
_Icon_Back.pClass = this;
_Icon_Back.onPress = function () {
CSound.mClick.PlaySound();
this.pClass.GoBack();
};
}
function Dispose() {
mState = "delete";
RemoveBitmapCopy();
}
function Process() {
mStateCount++;
switch (mState) {
case "startfadein" :
mState = "fadein";
MakeBitmapCopy();
case "fadein" :
var _local2 = mStateCount / mFadeInDuration;
if (_local2 >= 1) {
RemoveBitmapCopy();
_visible = true;
mState = "init";
_local2 = 1;
}
mcContainer.mcBitmapHolder._alpha = _local2 * 100;
break;
case "init" :
mState = "normal";
break;
case "normal" :
break;
case "fadeout" :
_local2 = mStateCount / mFadeOutDuration;
if (_local2 >= 1) {
Dispose();
_local2 = 1;
}
mcContainer.mcBitmapHolder._alpha = (1 - _local2) * 100;
}
}
function MakeBitmapCopy() {
mcContainer.dBMD = new flash.display.BitmapData(_Size._width, _Size._height, true, 16711680);
mcContainer.mcBitmapHolder = mcContainer.createEmptyMovieClip("_BitmapHolder", mcContainer.getNextHighestDepth());
mcContainer.mcBitmapHolder.attachBitmap(mcContainer.dBMD, 2, "auto", true);
mcContainer.dBMD.draw(this);
}
function RemoveBitmapCopy() {
mcContainer.dBMD.dispose();
mcContainer.mcBitmapHolder.removeMovieClip();
}
function Open() {
if (mState == "delete") {
return(undefined);
}
mState = "startfadein";
mStateCount = 0;
_visible = false;
}
function Close() {
if (mState != "normal") {
return(undefined);
}
mState = "fadeout";
mStateCount = 0;
_visible = false;
MakeBitmapCopy();
}
function Draw() {
}
function GoBack() {
mcTankCommand.SetState(CTankCommand.mState_Main);
}
function GoReturnState() {
mcTankCommand.SetState(((mcTankCommand.mReturnState == undefined) ? (CTankCommand.mState_Main) : (mcTankCommand.mReturnState)));
}
var _CLASSID_ = "CScreen";
var _BASECLASSID_ = "CScreen";
static var mFadeInDuration = 10;
static var mFadeOutDuration = 10;
}
Symbol 545 MovieClip [__Packages.CScreen_Main] Frame 0
class CScreen_Main extends CScreen
{
var _Icon_Sandbox, _Icon_Instructions, _Icon_Compete, _Icon_MyCombots, _Icon_Challenges, mMusicON, mMusicOFF, mSoundON, mSoundOFF, mDetailHIGH, mDetailLOW, Close, mcTankCommand;
function CScreen_Main () {
super();
_Icon_Sandbox.pClass = this;
_Icon_Sandbox.onPress = function () {
this.pClass.SetState_Sandbox();
};
_Icon_Instructions.pClass = this;
_Icon_Instructions.onPress = function () {
this.pClass.SetState_Instructions();
};
_Icon_Compete.pClass = this;
_Icon_Compete.onPress = function () {
this.pClass.SetState_Compete();
};
_Icon_MyCombots.pClass = this;
_Icon_MyCombots.onPress = function () {
this.pClass.SetState_MyCombots();
};
_Icon_Challenges.pClass = this;
_Icon_Challenges.onPress = function () {
this.pClass.SetState_Challenges();
};
mMusicON.pClass = this;
mMusicON.onPress = function () {
CSound.mClick.PlaySound();
this.pClass.MusicActive(false);
};
mMusicOFF.pClass = this;
mMusicOFF.onPress = function () {
CSound.mClick.PlaySound();
this.pClass.MusicActive(true);
};
mSoundON.pClass = this;
mSoundON.onPress = function () {
CSound.mClick.PlaySound();
this.pClass.SoundActive(false);
};
mSoundOFF.pClass = this;
mSoundOFF.onPress = function () {
CSound.mClick.PlaySound();
this.pClass.SoundActive(true);
};
mDetailHIGH.pClass = this;
mDetailHIGH.onPress = function () {
CSound.mClick.PlaySound();
this.pClass.Detail(false);
};
mDetailLOW.pClass = this;
mDetailLOW.onPress = function () {
CSound.mClick.PlaySound();
this.pClass.Detail(true);
};
SoundActive(CSaveData.obj.__get__mSoundActive());
MusicActive(CSaveData.obj.__get__mMusicActive());
Detail(CSaveData.obj.__get__mDetail());
}
function SetState_Sandbox() {
CSound.mClick.PlaySound();
Close();
mcTankCommand.SetState(CTankCommand.mState_Sandbox);
}
function SetState_Instructions() {
CSound.mClick.PlaySound();
Close();
mcTankCommand.SetState(CTankCommand.mState_Instructions);
}
function SetState_Compete() {
CSound.mClick.PlaySound();
Close();
mcTankCommand.SetState(CTankCommand.mState_Compete);
}
function SetState_MyCombots() {
CSound.mClick.PlaySound();
Close();
mcTankCommand.SetState(CTankCommand.mState_ManageRobots);
}
function SetState_Challenges() {
CSound.mClick.PlaySound();
Close();
mcTankCommand.SetState(CTankCommand.mState_Challenges);
}
function Detail(tState) {
mDetailHIGH._visible = tState;
mDetailLOW._visible = !tState;
CSaveData.obj.__set__mDetail(tState);
_root._quality = (tState ? "high" : "low");
}
function SoundActive(tState) {
mSoundON._visible = tState;
mSoundOFF._visible = !tState;
CSaveData.obj.__set__mSoundActive(tState);
CSound.SoundActive(tState);
}
function MusicActive(tState) {
mMusicON._visible = tState;
mMusicOFF._visible = !tState;
CSaveData.obj.__set__mMusicActive(tState);
CSound.MusicActive(tState);
CSound.mSong1_Track1.PlaySound();
}
function Dispose() {
super.Dispose();
}
function Process() {
super.Process();
}
function Draw() {
super.Draw();
}
var _CLASSID_ = "CScreen_Main";
}
Symbol 546 MovieClip [__Packages.CScreen_Instructions] Frame 0
class CScreen_Instructions extends CScreen
{
function CScreen_Instructions () {
super();
}
function Dispose() {
super.Dispose();
}
function Process() {
super.Process();
}
function Draw() {
super.Draw();
}
var _CLASSID_ = "CScreen_Instructions";
}
Symbol 547 MovieClip [__Packages.CScreen_Challenges] Frame 0
class CScreen_Challenges extends CScreen
{
var _Icon_Movement, _Icon_Combat, _Icon_CombatMovement;
function CScreen_Challenges () {
super();
SetMissionIcon(_Icon_Movement, 0);
SetMissionIcon(_Icon_Combat, 1);
SetMissionIcon(_Icon_CombatMovement, 2);
}
function SetMissionIcon(mcIcon, tMapIndex) {
mcIcon._Completed._visible = false;
mcIcon._Button_Select.pClass = this;
mcIcon._Button_Select.onRelease = function () {
CSound.mClick.PlaySound();
this.pClass.Close();
this.pClass.mcTankCommand.mMapIndex = tMapIndex;
this.pClass.mcTankCommand.mCombotList = [CSaveData.obj.__get__mCombotActiveIndex()];
this.pClass.mcTankCommand.SetState(CTankCommand.mState_LoadArena);
};
}
function Dispose() {
super.Dispose();
}
function Process() {
super.Process();
}
function Draw() {
super.Draw();
}
var _CLASSID_ = "CScreen_Challenges";
}
Symbol 548 MovieClip [__Packages.CScreen_Compete] Frame 0
class CScreen_Compete extends CScreen
{
var _Button_Compete, _SelectArena, _SelectOptions, _SelectCombots, Close, mMapPlayers, mcTankCommand, mMapIndex, _Combot_Selection, _Input_Code;
function CScreen_Compete () {
super();
SETUP_SelectArena();
SETUP_SelectOptions();
SETUP_Combot_Selection();
_Button_Compete.pClass = this;
_Button_Compete.onRelease = function () {
this.pClass.GoCompete();
};
_SelectArena.cacheAsBitmap = true;
_SelectOptions.cacheAsBitmap = true;
_SelectCombots.cacheAsBitmap = true;
}
function GoCompete() {
CSound.mClick.PlaySound();
Close();
switch (mMapPlayers) {
case 2 :
mcTankCommand.mCombotList = [CSaveData.obj.__get__mCompete_CombotCode1(), CSaveData.obj.__get__mCompete_CombotCode2()];
break;
case 3 :
mcTankCommand.mCombotList = [CSaveData.obj.__get__mCompete_CombotCode1(), CSaveData.obj.__get__mCompete_CombotCode2(), CSaveData.obj.__get__mCompete_CombotCode3()];
break;
case 4 :
mcTankCommand.mCombotList = [CSaveData.obj.__get__mCompete_CombotCode1(), CSaveData.obj.__get__mCompete_CombotCode2(), CSaveData.obj.__get__mCompete_CombotCode3(), CSaveData.obj.__get__mCompete_CombotCode4()];
}
mcTankCommand.mMapIndex = mMapIndex;
mcTankCommand.SetState(CTankCommand.mState_LoadArena);
}
function Dispose() {
super.Dispose();
}
function Process() {
super.Process();
}
function Draw() {
super.Draw();
}
function SETUP_SelectArena() {
var _local2 = [_SelectArena._Icon_Arena1, _SelectArena._Icon_Arena2, _SelectArena._Icon_Arena3, _SelectArena._Icon_Arena4, _SelectArena._Icon_Arena5];
var _local4 = [3, 4, 5, 6, 7];
var _local3 = [2, 2, 3, 4, 4];
for (var _local5 in _local2) {
_local2[_local5].mList = _local2;
_local2[_local5].mIndex = _local5;
_local2[_local5].mPlayers = _local3[_local5];
_local2[_local5].mMapIndex = _local4[_local5];
_local2[_local5]._Button.pClass = this;
_local2[_local5]._Button.onRelease = function () {
this.pClass.SelectArena(this._parent);
CSound.mClick.PlaySound();
};
}
SelectArena(_local2[CSaveData.obj.__get__mCompete_ArenaIndex()]);
}
function SelectArena(tIcon) {
for (var _local3 in tIcon.mList) {
tIcon.mList[_local3]._Selected._visible = false;
}
tIcon._Selected._visible = true;
SETUP_SelectCombots(tIcon.mPlayers);
CSaveData.obj.__set__mCompete_ArenaIndex(tIcon.mIndex);
mMapIndex = tIcon.mMapIndex;
mMapPlayers = tIcon.mPlayers;
}
function SETUP_SelectCombots(tPlayers) {
var _local3 = [_SelectCombots._Combot1, _SelectCombots._Combot2, _SelectCombots._Combot3, _SelectCombots._Combot4];
var _local4 = [CSaveData.obj.__get__mCompete_CombotCode1(), CSaveData.obj.__get__mCompete_CombotCode2(), CSaveData.obj.__get__mCompete_CombotCode3(), CSaveData.obj.__get__mCompete_CombotCode4()];
var _local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2].mIndex = _local2;
_local3[_local2]._Add.pClass = this;
_local3[_local2].mTextLabel.text = "Player #" + (_local2 + 1);
_local3[_local2].mCode = CSaveData.obj.Combot_IndexToCode(_local4[_local2]);
_local3[_local2].mTextName.text = CCommand_Compiler.Decode_RobotName(_local3[_local2].mCode);
if (_local2 < tPlayers) {
_local3[_local2]._Add.enabled = true;
_local3[_local2]._alpha = 100;
_local3[_local2]._Add.onRelease = function () {
this.pClass.Open_Combot_Selection(this._parent.mIndex);
CSound.mClick.PlaySound();
};
} else {
_local3[_local2]._Add.enabled = false;
_local3[_local2]._alpha = 35;
delete _local3[_local2]._Add.onRelease;
}
_local2++;
}
}
function SETUP_SelectOptions() {
var _local4 = [_SelectOptions._Button_TimeLimit, _SelectOptions._Button_Pickups, _SelectOptions._Button_Walls, _SelectOptions._Button_Droids];
var _local7 = [_SelectOptions.mTextTimeLimit, _SelectOptions.mTextPickups, _SelectOptions.mTextWalls, _SelectOptions.mTextDroids];
var _local8 = [["Unlimited", "30 Seconds", "1 Minute", "2 Minute", "3 Minute", "4 Minute", "5 Minute"], ["YES", "NO"], ["YES", "NO"], ["YES", "NO"]];
var _local5 = [[-1, 30, 60, 120, 180, 240, 300], [true, false], [true, false], [true, false]];
var _local6 = [CSaveData.obj.__get__mCompete_OptionTimeLimit(), CSaveData.obj.__get__mCompete_OptionPickups(), CSaveData.obj.__get__mCompete_OptionWalls(), CSaveData.obj.__get__mCompete_OptionDroids()];
var _local2 = 0;
while (_local2 < _local4.length) {
_local4[_local2].pClass = this;
_local4[_local2].mTextLabel = _local7[_local2];
_local4[_local2].mTextList = _local8[_local2];
_local4[_local2].mDataList = _local5[_local2];
_local4[_local2].mValue = _local6[_local2];
_local4[_local2].mIndex = _local2;
SetOptionText(_local4[_local2]);
_local4[_local2].onRelease = function () {
CSound.mClick.PlaySound();
var _local2 = 0;
while (_local2 < this.mDataList.length) {
if (this.mDataList[_local2] == this.mValue) {
this.mValue = this.mDataList[(((_local2 + 1) == this.mDataList.length) ? 0 : (_local2 + 1))];
switch (this.mIndex) {
case 0 :
CSaveData.obj.__set__mCompete_OptionTimeLimit(this.mValue);
break;
case 1 :
CSaveData.obj.__set__mCompete_OptionPickups(this.mValue);
break;
case 2 :
CSaveData.obj.__set__mCompete_OptionWalls(this.mValue);
break;
case 3 :
CSaveData.obj.__set__mCompete_OptionDroids(this.mValue);
}
this.pClass.SetOptionText(this);
break;
}
_local2++;
}
if (_local2 == this.mDataList.length) {
this.mValue = this.mDataList[0];
}
};
_local2++;
}
}
function SetOptionText(tOptionItem) {
for (var _local2 in tOptionItem.mDataList) {
if (tOptionItem.mDataList[_local2] == tOptionItem.mValue) {
tOptionItem.mTextLabel.text = tOptionItem.mTextList[_local2];
break;
}
}
}
function SETUP_Combot_Selection() {
_Combot_Selection._visible = false;
_Input_Code._visible = false;
FillPanel();
}
function Open_Combot_Selection(tIndex) {
_Combot_Selection._ClickMask.useHandCursor = false;
_Combot_Selection._ClickMask.onPress = function () {
};
_Combot_Selection.mAddIndex = tIndex;
_Combot_Selection.mCode = "";
_Combot_Selection._visible = true;
_Combot_Selection._Close.pClass = this;
_Combot_Selection._Close.onRelease = function () {
this.pClass.Exit_Combot_Selection();
CSound.mClick.PlaySound();
};
}
function Exit_Combot_Selection() {
_Combot_Selection._visible = false;
}
function Close_Combot_Selection() {
}
function Open_InputCode(tIcon) {
_Input_Code.mIcon = tIcon;
_Input_Code.mErrorCode = "";
_Input_Code._ClickMask.useHandCursor = false;
_Input_Code._ClickMask.onPress = function () {
};
_Input_Code.mErrorCode.text = "";
_Input_Code.mTextCode.text = "";
_Input_Code.mTextCode.pClass = this;
_Input_Code.mTextCode.onChanged = function (textfield_txt) {
this.pClass.ValidateInputCode(textfield_txt.text);
};
ValidateInputCode(tIcon.mCode);
_Input_Code._visible = true;
_Input_Code._Close.pClass = this;
_Input_Code._Close.onRelease = function () {
this.pClass.Exit_InputCode();
CSound.mClick.PlaySound();
};
_Input_Code._OK.pClass = this;
_Input_Code._OK.onRelease = function () {
this.pClass.Close_InputCode();
CSound.mClick.PlaySound();
};
}
function ValidateInputCode(tCode) {
var _local3 = ((tCode == undefined) ? true : false);
if ((tCode == undefined) || (tCode == "")) {
_Input_Code.mTextError.text = "";
_Input_Code._OK.enabled = false;
_Input_Code.mTextCode.text = "Enter code!";
return(undefined);
}
if (!CCommand_Compiler.Valid(tCode)) {
_Input_Code.mTextError.text = "INVALID CODE!";
_Input_Code.mTextError.textColor = 16711680 /* 0xFF0000 */;
_Input_Code._OK.enabled = false;
return(undefined);
}
_Input_Code.mTextError.text = "Code is valid!";
_Input_Code.mTextError.textColor = 65280;
_Input_Code._OK.enabled = true;
}
function Exit_InputCode() {
_Input_Code._visible = false;
}
function Close_InputCode() {
_Input_Code._visible = false;
var _local2 = _Input_Code.mTextCode.text;
CSaveData.obj.SetChallengerCombot(_Input_Code.mIcon.mChallengerIndex, _local2);
FillPanel();
}
function FillPanel() {
var _local5 = _Combot_Selection;
var _local4 = [_local5._Combot1, _local5._Combot2, _local5._Combot3, _local5._Combot4];
var _local6 = CSaveData.obj.GetMyCombots();
var _local3 = 0;
while (_local3 < _local4.length) {
var _local2 = _local4[_local3];
var _local8 = CCommand_Compiler.Decode_RobotName(_local6[_local3]);
_local2.mTextName.text = CCommand_Compiler.Decode_RobotName(_local6[_local3]);
_local2._ButtonAdd._visible = false;
_local2._Icon._Button_Select.mIcon = _local2;
_local2._Icon._Button_Select.pClass = this;
_local2.mCodeIndex = _local3;
_local2._Icon._Button_Select.onRelease = function () {
CSound.mClick.PlaySound();
this.pClass.SelectRobot_CS(this.mIcon);
};
_local3++;
}
_local4 = [_local5._Combot5, _local5._Combot6, _local5._Combot7, _local5._Combot8, _local5._Combot9, _local5._Combot10, _local5._Combot11, _local5._Combot12, _local5._Combot13, _local5._Combot14, _local5._Combot15, _local5._Combot16, _local5._Combot17, _local5._Combot18, _local5._Combot19, _local5._Combot20, _local5._Combot21, _local5._Combot22];
var _local9 = _local6.length;
var _local7 = CSaveData.obj.GetHouseCombots();
var _local10 = CSaveData.obj.GetChallengerCombots();
_local6 = _local7.concat(_local10);
_local3 = 0;
while (_local3 < _local4.length) {
var _local2 = _local4[_local3];
_local2._visible = false;
_local2._Icon._Button_Select.enabled = true;
_local2._Icon._alpha = 100;
_local2._ButtonAdd._visible = _local3 >= _local7.length;
_local3++;
}
_local3 = 0;
while (_local3 < _local4.length) {
var _local2 = _local4[_local3];
if (_local3 >= _local6.length) {
if (_local3 == _local6.length) {
_local2._visible = true;
_local2.mTextName.text = "";
_local2._Icon._Button_Select.enabled = false;
_local2._Icon._alpha = 30;
_local2._ButtonAdd._visible = true;
// unexpected jump
}
} else {
_local2._visible = true;
_local2.mTextName.text = CCommand_Compiler.Decode_RobotName(_local6[_local3]);
_local2.mCodeIndex = _local9 + _local3;
_local2.mCode = (_local2._Icon._Button_Select.mCode = CSaveData.obj.Combot_IndexToCode(_local2.mCodeIndex));
_local2._Icon._Button_Select.mIcon = _local2;
_local2._Icon._Button_Select.pClass = this;
_local2._Icon._Button_Select.onRelease = function () {
CSound.mClick.PlaySound();
this.pClass.SelectRobot_CS(this.mIcon);
};
_local2._ButtonAdd.mIcon = _local2;
_local2.mChallengerIndex = _local3 - _local7.length;
_local2._ButtonAdd.pClass = this;
_local2._ButtonAdd.onRelease = function () {
this.pClass.AddChallenger(this.mIcon);
CSound.mClick.PlaySound();
};
}
_local3++;
}
}
function AddChallenger(tIcon) {
Open_InputCode(tIcon);
}
function SelectRobot_CS(tIcon) {
Exit_Combot_Selection();
var _local3 = CSaveData.obj.Combot_IndexToCode(tIcon.mCodeIndex);
var _local4 = [_SelectCombots._Combot1, _SelectCombots._Combot2, _SelectCombots._Combot3, _SelectCombots._Combot4];
_local4[_Combot_Selection.mAddIndex].mTextName.text = CCommand_Compiler.Decode_RobotName(_local3);
_local4[_Combot_Selection.mAddIndex].mCode = _local3;
switch (_Combot_Selection.mAddIndex) {
case 0 :
CSaveData.obj.__set__mCompete_CombotCode1(tIcon.mCodeIndex);
break;
case 1 :
CSaveData.obj.__set__mCompete_CombotCode2(tIcon.mCodeIndex);
break;
case 2 :
CSaveData.obj.__set__mCompete_CombotCode3(tIcon.mCodeIndex);
break;
case 3 :
CSaveData.obj.__set__mCompete_CombotCode4(tIcon.mCodeIndex);
}
}
var _CLASSID_ = "CScreen_Compete";
var p = {mValue:""};
}
Symbol 549 MovieClip [__Packages.CScreen_LoadArena] Frame 0
class CScreen_LoadArena extends CScreen
{
var _Progress;
function CScreen_LoadArena () {
super();
}
function Dispose() {
super.Dispose();
}
function Process() {
super.Process();
_Progress.SetProgress(0);
}
function Draw() {
super.Draw();
}
var _CLASSID_ = "CScreen_LoadArena";
}
Symbol 550 MovieClip [__Packages.CScreen_Briefing] Frame 0
class CScreen_Briefing extends CScreen
{
function CScreen_Briefing () {
super();
}
function Dispose() {
super.Dispose();
}
function Process() {
super.Process();
}
function Draw() {
super.Draw();
}
var _CLASSID_ = "CScreen_Briefing";
}
Symbol 551 MovieClip [__Packages.CScreen_Debriefing] Frame 0
class CScreen_Debriefing extends CScreen
{
var _Icon_Back, mAppearList, _Score1, _Score2, _Score3, _Score4, keyListener, mouseListener, mState, mAppearTimeStamp, mAppearIndex, mcTankCommand;
function CScreen_Debriefing () {
super();
_Icon_Back.pClass = this;
_Icon_Back.onPress = function () {
CSound.mClick.PlaySound();
this.pClass.GoReturnState();
};
_Icon_Back._visible = false;
CArena.mEndStats.sort(SortPosition);
var _local3 = 0;
var _local4 = 0;
while (_local3 < CArena.mEndStats.length) {
var _local5 = CArena.mEndStats[_local3];
_local5.mPosition = _local4;
_local4 = ((_local5.mScore == CArena.mEndStats[_local3 + 1].mScore) ? (_local4) : (_local3 + 1));
_local3++;
}
mAppearList = new Array();
AddScore(_Score1, CArena.mEndStats[0]);
AddScore(_Score2, CArena.mEndStats[1]);
AddScore(_Score3, CArena.mEndStats[2]);
AddScore(_Score4, CArena.mEndStats[3]);
for (_local3 in mAppearList) {
for (var _local6 in mAppearList[_local3]) {
mAppearList[_local3][_local6]._visible = false;
}
}
CArena.mEndStats.sort(SortPosition);
_local3 = 0;
_local4 = 0;
while (_local3 < CArena.mEndStats.length) {
var _local5 = CArena.mEndStats[_local3];
_local5.mcScore._FinalPosition.gotoAndStop(_local4 + 1);
_local4 = ((_local5.mScore == CArena.mEndStats[_local3 + 1].mScore) ? (_local4) : (_local3 + 1));
_local3++;
}
keyListener = new Object();
keyListener.pClass = this;
keyListener.onKeyDown = function () {
this.pClass.Debrief_Complete();
};
Key.addListener(keyListener);
mouseListener = new Object();
mouseListener.pClass = this;
mouseListener.onMouseDown = function () {
this.pClass.Debrief_Complete();
};
Mouse.addListener(mouseListener);
}
function SortPosition(a, b) {
if (a.mScore < b.mScore) {
return(1);
}
if (a.mScore > b.mScore) {
return(-1);
}
return(0);
}
function AddScore(tScore, o) {
if (o == undefined) {
tScore._visible = false;
return(undefined);
}
var _local6 = o.mPosition;
for (var _local5 in o) {
}
var _local7 = 1000;
var _local10 = -10;
var _local8 = 10;
var _local9 = [5000, 2500, 1000, 500];
o.mHealth = int(((o.mHealth < 0) ? 0 : (o.mHealth)));
var _local11 = tScore._Icon.filters;
_local11[_local11.length] = scidd.Draw.CColor.GetColorMatrixFilter(scidd.Draw.CColor.ColorMatrix_Colorize(scidd.Draw.CColor.FromRGB(o.mTint), 1, 0));
tScore._Icon.filters = _local11;
tScore._Kills_Score.text = o.mKills * _local7;
tScore._Kills.text = ((("(" + o.mKills) + " x ") + _local7) + ")";
tScore._ShotsFired_Score.text = o.mShotsFired * _local10;
tScore._ShotsFired.text = ((("(" + o.mShotsFired) + " x ") + _local10) + ")";
tScore._ScoreAcquired.text = o.mScore;
tScore._Position_Score.text = _local9[_local6];
tScore._Position.text = ((("(" + (_local6 + 1)) + " = ") + _local9[_local6]) + ")";
tScore._HealthPreserved_Score.text = int(o.mHealth) * _local8;
tScore._HealthPreserved.text = ((("(" + int(o.mHealth)) + "% x ") + _local8) + ")";
tScore._FinalScore.text = ((((o.mKills * _local7) + (o.mShotsFired * _local10)) + _local9[_local6]) + o.mScore) + (int(o.mHealth) * _local8);
tScore.mRobotName.text = o.mRobotName;
var _local2 = 0;
while (_local2 < 7) {
mAppearList[_local2] = ((mAppearList[_local2] == undefined) ? (new Array()) : (mAppearList[_local2]));
_local2++;
}
mAppearList[0][mAppearList[0].length] = tScore._ScoreAcquired;
mAppearList[1][mAppearList[1].length] = tScore._HealthPreserved;
mAppearList[1][mAppearList[1].length] = tScore._HealthPreserved_Score;
mAppearList[2][mAppearList[2].length] = tScore._ShotsFired;
mAppearList[2][mAppearList[2].length] = tScore._ShotsFired_Score;
mAppearList[3][mAppearList[3].length] = tScore._Kills;
mAppearList[3][mAppearList[3].length] = tScore._Kills_Score;
mAppearList[4][mAppearList[4].length] = tScore._Position;
mAppearList[4][mAppearList[4].length] = tScore._Position_Score;
mAppearList[5][mAppearList[5].length] = tScore._FinalScore;
mAppearList[6][mAppearList[6].length] = tScore._FinalPosition;
o.mcScore = tScore;
o.mScore = Number(tScore._FinalScore.text);
}
function Dispose() {
super.Dispose();
}
function Debrief_Complete() {
Mouse.removeListener(mouseListener);
Key.removeListener(keyListener);
mAppearSpeed = 50;
}
function Process() {
super.Process();
if (mState == "normal") {
if ((getTimer() - mAppearTimeStamp) > mAppearSpeed) {
mAppearIndex++;
mAppearTimeStamp = mAppearTimeStamp + mAppearSpeed;
if (mAppearList[mAppearIndex] == undefined) {
return(undefined);
}
if (mAppearList[mAppearIndex + 1] == undefined) {
mcTankCommand.FrontendMusic();
_Icon_Back._visible = true;
}
CSound.mDebrief_Score.PlaySound();
for (var _local3 in mAppearList[mAppearIndex]) {
mAppearList[mAppearIndex][_local3]._visible = true;
}
}
} else if (mState == "init") {
mAppearTimeStamp = getTimer();
mAppearIndex = -1;
}
}
function Draw() {
super.Draw();
}
var _CLASSID_ = "CScreen_Debriefing";
var mAppearSpeed = 1000;
}
Symbol 552 MovieClip [__Packages.CScreen_GameComplete] Frame 0
class CScreen_GameComplete extends CScreen
{
function CScreen_GameComplete () {
super();
}
function Dispose() {
super.Dispose();
}
function Process() {
super.Process();
}
function Draw() {
super.Draw();
}
var _CLASSID_ = "CScreen_GameComplete";
}
Symbol 553 MovieClip [__Packages.CScreen_ManageRobots] Frame 0
class CScreen_ManageRobots extends CScreen
{
var _Combot1, _Combot2, _Combot3, _Combot4, mcList, mcTankCommand;
function CScreen_ManageRobots () {
super();
SetCombot(_Combot1, 0);
SetCombot(_Combot2, 1);
SetCombot(_Combot3, 2);
SetCombot(_Combot4, 3);
SelectCombot(CSaveData.obj.__get__mCombotActiveIndex());
}
function RenameRobot(mc, tRobotName) {
CSaveData.obj.SetCodeForMyCombot(mc.mIndex, CCommand_Compiler.Rename_RobotName(CSaveData.obj.GetCodeForMyCombot(mc.mIndex), tRobotName));
mc.mTextCode.text = CSaveData.obj.GetCodeForMyCombot(mc.mIndex);
}
function SetCombot(mc, tIndex) {
mcList = ((mcList == undefined) ? (new Array()) : (mcList));
mcList[tIndex] = mc;
mc._ActiveBar._visible = false;
mc.mIndex = tIndex;
var _local3 = CSaveData.obj.GetCodeForMyCombot(mc.mIndex);
mc.mTextCode.text = ((_local3 == "") ? "No Code!" : (_local3));
mc.mTextName.text = CCommand_Compiler.Decode_RobotName(_local3);
mc._Cover.pClass = this;
mc._Cover.mIndex = mc.mIndex;
mc._Cover.onRelease = function () {
CSound.mClick.PlaySound();
this.pClass.SelectCombot(this.mIndex);
};
mc.mTextName.pClass = this;
mc.mTextName.pMC = mc;
mc.mTextName.restrict = "A-Z 0-9 a-z";
mc.mTextName.onChanged = function (textfield_txt) {
this.pClass.RenameRobot(this.pMC, textfield_txt.text);
};
mc._Button.pClass = this;
mc._Button.mIndex = tIndex;
mc._Button.onRelease = function () {
CSound.mClick.PlaySound();
this.pClass.mcTankCommand.SetState(CTankCommand.mState_Sandbox);
this.pClass.mcTankCommand.mCombotList = [CSaveData.obj.__get__mCombotActiveIndex()];
this.pClass.mcTankCommand.mMapIndex = 8;
};
}
function SelectCombot(tIndex) {
var _local2 = 0;
while (_local2 < mcList.length) {
mcList[_local2]._ActiveBar._visible = _local2 == tIndex;
mcList[_local2]._Cover._visible = _local2 != tIndex;
_local2++;
}
CSaveData.obj.__set__mCombotActiveIndex(tIndex);
}
function Dispose() {
super.Dispose();
}
function Process() {
super.Process();
if (Key.isDown(36)) {
CSaveData.obj.ResetData();
mcTankCommand.SetState(CTankCommand.mState_Init);
}
}
function Draw() {
super.Draw();
}
var _CLASSID_ = "CScreen_ManageRobots";
}
Symbol 554 MovieClip [__Packages.CScreen_Intro] Frame 0
class CScreen_Intro extends CScreen
{
var mSequence, _Logo_SeanCooper, _Logo_CrazyMonkeys, mSequenceIndex, mcTankCommand, mState, mTimeSlice;
function CScreen_Intro () {
super();
mSequence = [_Logo_SeanCooper, _Logo_CrazyMonkeys];
for (var _local3 in mSequence) {
mSequence[_local3].stop();
mSequence[_local3]._visible = false;
}
mSequenceIndex = 0;
mcTankCommand.mSingleFrame = true;
}
function Dispose() {
super.Dispose();
}
function Process() {
super.Process();
if (mState == "normal") {
var _local3 = mSequence[mSequenceIndex];
if (_local3._visible == false) {
mTimeSlice = undefined;
_local3._visible = true;
_local3.gotoAndStop(1);
} else if (_local3._currentframe == _local3._totalframes) {
_local3._visible = false;
mSequenceIndex++;
if (mSequenceIndex >= mSequence.length) {
mcTankCommand.SetState(CTankCommand.mState_Main);
return(undefined);
}
} else {
_local3.gotoAndStop(GetFrameIndex(_local3._totalframes, _local3.mFrameRate));
}
}
}
function GetFrameIndex(tTotalFrames, tFrameRate) {
mTimeSlice = ((mTimeSlice == undefined) ? (getTimer()) : (mTimeSlice));
var _local2 = int((getTimer() - mTimeSlice) / (1000 / tFrameRate)) + 1;
if (_local2 > tTotalFrames) {
_local2 = tTotalFrames;
}
return(_local2);
}
function Draw() {
super.Draw();
}
var _CLASSID_ = "CScreen_Intro";
var mFrameCap = 10;
}
Symbol 30 MovieClip [Timer] Frame 1
function SetTime(tTime) {
if (tTime < 0) {
mTimer.text = "00:00.00";
} else {
mTimer.text = (((Pad0(int(tTime / 60000)) + ":") + Pad0(int((tTime / 1000) % 60))) + ".") + Pad0(int(tTime / 10) % 100);
}
}
function Pad0(tNumber) {
var _local1 = String(tNumber);
while (_local1.length < 2) {
_local1 = "0" + _local1;
}
return(_local1);
}
Symbol 32 MovieClip Frame 1
this.cacheAsBitmap = true;
Symbol 33 MovieClip [Arena] Frame 1
#initclip 105
Object.registerClass("Arena", CArena);
#endinitclip
Symbol 42 MovieClip [Programmer.Icon] Frame 1
#initclip 87
Object.registerClass("Programmer.Icon", CProgrammer_Icon);
#endinitclip
Symbol 60 MovieClip Frame 1
_visible = false;
stop();
Symbol 61 MovieClip [Programmer.Controller] Frame 1
#initclip 88
Object.registerClass("Programmer.Controller", CProgrammer_Controller);
#endinitclip
Symbol 78 MovieClip [Programmer] Frame 1
#initclip 89
Object.registerClass("Programmer", CProgrammer);
#endinitclip
Symbol 89 MovieClip [Programmer.Window] Frame 1
#initclip 90
Object.registerClass("Programmer.Window", CProgrammer_Window);
#endinitclip
Symbol 104 MovieClip [Icon.Container.2] Frame 1
#initclip 91
Object.registerClass("Icon.Container.2", CProgrammer_IconContainer);
#endinitclip
Symbol 108 MovieClip [Icon.Container] Frame 1
#initclip 92
Object.registerClass("Icon.Container", CProgrammer_IconContainer);
#endinitclip
Symbol 149 MovieClip [Sensor.Icon] Frame 1
_NodeList = [_node1, _node2, _node3];
Symbol 166 MovieClip [ScoreCard] Frame 1
#initclip 93
Object.registerClass("ScoreCard", CScoreCard);
#endinitclip
Symbol 192 MovieClip Frame 1
Symbol 194 MovieClip Frame 1
Symbol 199 Button
on (release) {
getURL ("http://www.crazymonkeygames.com", "_blank");
}
Symbol 223 MovieClip [Screen.Main] Frame 1
#initclip 94
Object.registerClass("Screen.Main", CScreen_Main);
#endinitclip
Instance of Symbol 204 MovieClip in Symbol 223 MovieClip [Screen.Main] Frame 1
on (release) {
getURL ("http://www.games.seantcooper.com", "_blank");
}
Symbol 245 MovieClip [Screen.Instructions] Frame 1
#initclip 95
Object.registerClass("Screen.Instructions", CScreen_Instructions);
#endinitclip
Symbol 272 MovieClip [Screen.Challenges] Frame 1
#initclip 96
Object.registerClass("Screen.Challenges", CScreen_Challenges);
#endinitclip
Symbol 365 MovieClip [Screen.Compete] Frame 1
#initclip 97
Object.registerClass("Screen.Compete", CScreen_Compete);
#endinitclip
Symbol 370 MovieClip Frame 1
function SetProgress(tProgress) {
mProgress++;
gotoAndStop((mProgress % (_totalframes - 1)) + 1);
}
var mProgress = 0;
Symbol 371 MovieClip [Screen.LoadArena] Frame 1
#initclip 98
Object.registerClass("Screen.LoadArena", CScreen_LoadArena);
#endinitclip
Symbol 373 MovieClip [Screen.Briefing] Frame 1
#initclip 99
Object.registerClass("Screen.Briefing", CScreen_Briefing);
#endinitclip
Symbol 407 MovieClip [Screen.Debriefing] Frame 1
#initclip 100
Object.registerClass("Screen.Debriefing", CScreen_Debriefing);
#endinitclip
Symbol 409 MovieClip [Screen.GameComplete] Frame 1
#initclip 101
Object.registerClass("Screen.GameComplete", CScreen_GameComplete);
#endinitclip
Symbol 422 MovieClip [Screen.ManageRobots] Frame 1
#initclip 102
Object.registerClass("Screen.ManageRobots", CScreen_ManageRobots);
#endinitclip
Symbol 448 MovieClip Frame 1
var mFrameRate = 24;
stop();
onRelease = function () {
getURL ("http://www.crazymonkeygames.com", "_blank");
};
Symbol 448 MovieClip Frame 100
Symbol 448 MovieClip Frame 116
mFinished = true;
stop();
_parent.play();
Symbol 451 MovieClip Frame 1
var mFrameRate = 30;
stop();
onRelease = function () {
getURL ("http://www.games.seantcooper.com", "_blank");
};
Symbol 452 MovieClip [Screen.Intro] Frame 1
#initclip 103
Object.registerClass("Screen.Intro", CScreen_Intro);
#endinitclip
Symbol 464 MovieClip [TankCommand] Frame 1
#initclip 104
Object.registerClass("TankCommand", CTankCommand);
#endinitclip
Symbol 468 MovieClip Frame 1
function Update() {
var _local3 = getTimer();
mSampleArray[mSampleIndex] = _local3 - mSampleTimeStamp;
mSampleTimeStamp = _local3;
var _local1 = 0;
var _local2 = 0;
while (_local1 < mSampleAmount) {
_local2 = _local2 + mSampleArray[_local1];
_local1++;
}
SetLow(GetFPS(mSampleArray[mSampleIndex]));
mTEXT_FPS = GetFPS(_local2 / mSampleAmount);
mSampleIndex = (++mSampleIndex) % mSampleAmount;
}
function GetFPS(tNumber) {
var _local1 = 1;
return(int((1000 / tNumber) * _local1) / _local1);
}
function SetLow(tNumber) {
if ((tNumber < mLowFPS) || ((getTimer() - mLowCount) >= 2000)) {
mLowFPS = tNumber;
mTEXT_LOW = (mLowFPS.toString() + ".") + mTEXT_LOW.substring(0, 20);
mLowCount = getTimer();
}
}
function Profile_Setup() {
var _local1 = mProfile_List.length - 1;
while (_local1 >= 0) {
mProfile_List[_local1].mTotalTime = 0;
_local1--;
}
}
function Profile_Start(tID, tRGB) {
var _local1 = FindID(tID);
if (_local1 == -1) {
_local1 = mProfile_List.length;
mProfile_List[_local1] = {mName:tID, mTimeStamp:0, mTotalTime:0, mRGB:tRGB};
}
mProfile_List[_local1].mTimeStamp = getTimer();
}
function Profile_End(tID) {
var _local2 = getTimer();
var _local1 = FindID(tID);
mProfile_List[_local1].mTotalTime = mProfile_List[_local1].mTotalTime + (_local2 - mProfile_List[_local1].mTimeStamp);
}
function Profile_Complete() {
var _local7 = 0;
var _local2 = mProfile_List.length - 1;
while (_local2 >= 0) {
_local7 = _local7 + mProfile_List[_local2].mTotalTime;
_local2--;
}
mTEXT_ProfileTime = _local7;
this.clear();
var _local3 = 40;
var _local5 = 24;
var _local9 = 140;
var _local10 = 12;
var _local8 = "";
_local2 = mProfile_List.length - 1;
while (_local2 >= 0) {
var _local4 = _local3 + ((mProfile_List[_local2].mTotalTime / _local7) * _local9);
var _local6 = _local5 + _local10;
this.beginFill(mProfile_List[_local2].mRGB, 100);
this.moveTo(_local3, _local5);
this.lineTo(_local4, _local5);
this.lineTo(_local4, _local6);
this.lineTo(_local3, _local6);
this.lineTo(_local3, _local5);
this.endFill();
_local3 = _local4;
_local8 = _local8 + ((((((Pad(mProfile_List[_local2].mName, 10) + "\t= ") + Pad(mProfile_List[_local2].mTotalTime.toString(), 4)) + "\t(") + Math.round((mProfile_List[_local2].mTotalTime / _local7) * 100)) + "%)") + newline);
_local2--;
}
mTEXT_Output = _local8;
}
function FindID(tID) {
var _local1 = mProfile_List.length - 1;
while (_local1 >= 0) {
if (mProfile_List[_local1].mName == tID) {
return(_local1);
}
_local1--;
}
return(-1);
}
function Pad(tString, tAmount) {
while (tString.length < tAmount) {
tString = tString + " ";
}
return(tString);
}
var mLowFPS = 0;
var mLowCount = 0;
var mSampleIndex = 0;
var mSampleAmount = 60;
var mSampleArray = new Array(mSampleAmount);
var mSampleTimeStamp = getTimer();
var mSampleTotalTime = 0;
_root.__FPS__ = this;
var mProfile_List = new Array();