Frame 1
_global.root = this;
Frame 2
function quitGame(score) {
if (this != _level0) {
_level0.quitGame(score);
}
stopAllSounds();
gotoAndStop (1);
}
function sendScore(score) {
if (this != _level0) {
_level0.sendScore(score);
}
}
var basePath = (((_url.indexOf("file:///") > -1) && (_level0 == _root)) ? "../" : "./");
if (_level0.filePath != null) {
basePath = _level0.filePath;
}
var splashTime = 8;
var doPerformanceTest = false;
var bytesToLoad = getBytesTotal();
if (_level0.VR_ENABLED) {
_global.VR_ON_LIVES = _level0.getVR("wb2_lives");
_global.VR_ON_SHIELD = _level0.getVR("wb2_shield");
_global.VR_ON_PLATFORMS = _level0.getVR("wb2_platforms");
_global.VR_ON_EMP = _level0.getVR("wb2_emp");
} else {
_global.VR_ON_LIVES = true;
_global.VR_ON_SHIELD = true;
_global.VR_ON_PLATFORMS = true;
_global.VR_ON_EMP = true;
}
nextFrame();
Frame 3
var st = (getTimer() + splashTime);
play();
Frame 4
play();
Frame 5
if ((_framesloaded > 14) && (getTimer() > st)) {
delete st;
play();
} else {
prevFrame();
}
Frame 10
function loadDisplay(ratioLoaded) {
mcLoadBar.gotoAndStop(Math.ceil((mcLoadBar._totalframes - 1) * ratioLoaded));
}
function lm(startBytes, totalBytes) {
updateAfterEvent();
var _local1 = (getBytesLoaded() - startBytes) / totalBytes;
if (_local1 < 1) {
loadDisplay(_local1);
} else {
loadDisplay(1);
clearInterval(loadID);
delete loadID;
delete lm;
gotoAndStop((doPerformanceTest ? "performance" : "process"));
}
}
if ((!doPerformanceTest) && (getBytesLoaded() >= bytesToLoad)) {
loadDisplay(1);
gotoAndStop ("process");
}
var loadID = setInterval(lm, 0, getBytesLoaded(), bytesToLoad - getBytesLoaded());
loadDisplay(0.001);
play();
Frame 11
nextFrame();
Frame 13
prevFrame();
Instance of Symbol 366 MovieClip [Character] in Frame 17
/* no clip actions */
Frame 20
_global.performance = new PerformanceTest(null, function () {
gotoAndStop ("process");
});
stop();
Frame 29
if (_global.processed) {
return(undefined);
}
_global.processed = true;
var n = DSGeneric;
SSGame.processConfig("<config><styles viewSlope=\"-1,2\"><s name=\"VR\" store=\"1\"><surface ambientColor=\"#FFCC00\" diffuseColor=\"#CCAA00\" specularColor=\"#FFFFEE\" thickness=\"10\" frontDepth=\"10\" rearDepth=\"10\" /><wall thickness=\"0\" /><empty thickness=\"0\" frontDepth=\"0\" rearDepth=\"0\" /></s><s name=\"grass\" depthLayer=\"8\" fillColor=\"#3F682C\" offsetX=\"0\" offsetY=\"0\"><surface thickness=\"0\" frontDepth=\"0\" rearDepth=\"0\" impactSound=\"ground\" sideTexture=\"tilegrass\" sideTextureMode=\"1\" sideTextureLayer=\"100\" sideTexturePoint=\"2\" friction=\"0.9\" traction=\"0.5\" /><wall thickness=\"0\" /><empty thickness=\"0\" frontDepth=\"0\" rearDepth=\"0\" /></s><s name=\"bridge\"><surface frontDepth=\"15\" rearDepth=\"15\" thickness=\"5\" impactSound=\"ground\" ambientColor=\"#333333\" diffuseColor=\"#443333\" specularColor=\"#996666\" surfaceTexture=\"BridgeTop\" sideTextureMode=\"0\" sideTextureLayer=\"100\" sideTexturePoint=\"2\" friction=\"0.9\" traction=\"0.7\" endAlign=\"0\" /><wall thickness=\"0\" /><empty thickness=\"0\" frontDepth=\"0\" rearDepth=\"0\" /></s><s name=\"dirt\" fillColor=\"#BFA598\"><surface frontDepth=\"30\" rearDepth=\"20\" impactSound=\"ground\" ambientColor=\"#333333\" diffuseColor=\"#44\" specularColor=\"#996666\" surfaceTexture=\"DirtTop\" thickness=\"5\" sideTextureMode=\"0\" sideTextureLayer=\"100\" sideTexturePoint=\"2\" friction=\"0.9\" traction=\"0.5\" /><wall thickness=\"0\" /><empty thickness=\"0\" frontDepth=\"0\" rearDepth=\"0\" /></s><s name=\"water\" fillColor=\"#000099\"><surface water=\"1\" frontDepth=\"15\" rearDepth=\"15\" ambientColor=\"#0000CC\" diffuseColor=\"#000099\" specularColor=\"#000066\" impactSound=\"splash\" friction=\"0.1\" traction=\"0.3\" /><wall water=\"1\" ambientColor=\"#0000CC\" diffuseColor=\"#000099\" specularColor=\"#000066\" impactSound=\"splash\" thickness=\"0\" frontDepth=\"15\" rearDepth=\"15\" /><empty water=\"1\" ambientColor=\"#0000CC\" diffuseColor=\"#000099\" specularColor=\"#000066\" thickness=\"0\" frontDepth=\"15\" rearDepth=\"15\" /></s><s name=\"stone\" fillColor=\"#BFA598\"><surface ambientColor=\"#453B37\" diffuseColor=\"#BFA598\" specularColor=\"#D6CFCD\" thickness=\"0\" impactSound=\"ground\" sideTexture=\"RuinSide\" sideTextureMode=\"1\" sideTextureLayer=\"100\" sideTexturePoint=\"2\" friction=\"0.9\" traction=\"0.5\" /><wall thickness=\"10\" ambientColor=\"#453B37\" diffuseColor=\"#BFA598\" specularColor=\"#D6CFCD\" /><empty thickness=\"0\" frontDepth=\"0\" rearDepth=\"0\" /></s><s name=\"ice\" fillColor=\"#223399\" offsetX=\"0\" offsetY=\"0\"><surface ambientColor=\"#660099\" diffuseColor=\"#33CCFF\" specularColor=\"#AAAAEE\" capSurface=\"1\" endAlign=\"2\" impactSound=\"ground\" friction=\"0.1\" traction=\"0.3\" /><wall ambientColor=\"#660099\" diffuseColor=\"#33CCFF\" specularColor=\"#AAAAEE\" thickness=\"0\" /><empty ambientColor=\"#660099\" diffuseColor=\"#33CCFF\" specularColor=\"#AAAAEE\" thickness=\"0\" frontDepth=\"0\" rearDepth=\"0\" /></s><s name=\"rubberball\" fillColor=\"#666666\" offsetX=\"0\" offsetY=\"0\"><surface ambientColor=\"#333333\" diffuseColor=\"#666666\" specularColor=\"#888888\" bounciness=\"1\" thickness=\"0\" /><wall ambientColor=\"#333333\" diffuseColor=\"#666666\" specularColor=\"#888888\" thickness=\"0\" /><empty ambientColor=\"#333333\" diffuseColor=\"#666666\" specularColor=\"#888888\" thickness=\"0\" frontDepth=\"0\" rearDepth=\"0\" /></s></styles><bg><bg name=\"TestBG\"><l z=\"5500\" tiles=\"TestBackground\" defaultCell=\"0\" scrollMultiplier=\"1\">1,2,3|4,5,6|7,8,9</l></bg><bg name=\"Level3\"><l z=\"6000\" tiles=\"TestBackground\" defaultCell=\"0\" scrollMultiplier=\"1\">4,5,6|7,8,9</l></bg></bg></config>");
SSGame.processLevel("<w version=\"1,0,0,0\" levelName=\"Level1\" preProcess=\"preSetLevel\" background=\"TestBG\" startNode=\"StartNode\" music=\"music0\"><objects types=\"SSShape,GameSpring,GamePoint,Checkpoint,CommandBox,GameElement,WalkingObject,VR_EMP,BouncingObject,RopeObject,DirectionArrow,GameSwing,GameVehicle,GameBigPoint,GameHealth,GameContainer,JumpingFish,FlyingObject\">0|1180|10980|0|||||||stone|-435|0|0|-435|-80|0|0|-80|3|0|0|0#0|4695|11620|0|||||||grass|310|-120|0|580|455|0|0|635|0|0|0|1#0|11990|11105|0|||||||stone|5|165|0|-495|165|0|-495|5|1|5|0|3#0|11255|11740|0|||||||bridge|645|-35|3|645|50|0|-15|65|0|-15|10|0#0|4930|12570|0|||||||stone|480|-145|3|850|0|3|850|95|0|0|95|0|0|0|0#0|3485|11655|0|||||||dirt|10|600|1|-330|600|0|-380|125|1|-215|120|3|10|0|3#0|3675|11590|0|||||||bridge|290|45|0|-180|160|0|-180|65|0|285|-15|3#0|4155|10920|0|||||||bridge|-300|50|0|-515|0|0|0|0|3#0|4705|11010|0|||||||dirt|0|-435|1|300|-545|2|300|85|0|0|0|0#0|1515|11180|0|||||||water|-50|150|0|-215|145|0|-215|-160|0|-50|-160|1#0|1690|11000|0|||||||grass|375|-70|3|785|-45|3|790|395|0|-230|355|0|-230|-20|0#0|3785|11290|0|||||||dirt|430|-25|3|415|130|1|70|130|1|50|20|1#1|285|10955|0|||||||35|940#2|1780|10905|0|||||||#2|1930|10895|0|||||||#2|2075|10885|0|||||||#3|4110|11265|0|||||||#0|265|10980|0|||||||DSGeneric|-130|0|0|-130|-1060|0|0|-1060|0|0|0|1#4|1050|11055|0|||||||2060||#5|980|10865|0||4||StartNode||||#6|2230|10880|0|||||||#7|2010|10835|0||||||#8|2955|10705|0||||||||#5|610|10935|0|Ferns|0||||||#0|260|10980|0|||||||grass|1050|0|3|1050|325|0|0|325|0|0|0|0#0|3015|11005|0|||||||water|0|195|0|-540|195|0|-540|0|0|0|0|3#0|3435|11100|0|||||||grass|-440|220|2|-420|-120|2|220|-40|3|400|210|1#9|4320|10960|0|||||||630#0|4400|11100|0|||||||grass|305|-90|3|605|-5|0|605|405|0|355|675|0|0|525|1|0|0|1#0|4225|11570|0|||||||dirt|20|215|1|230|285|3|120|320|0|-240|315|0|-265|5|0|0|0|3#0|3495|11995|0|||||||grass|855|20|3|1200|-95|3|1200|260|0|0|260|0|0|30|0#1|3595|12020|0||||||||980#0|4355|11000|0|||||||dirt|150|-40|0|240|40|0|45|105|0|0|0|0#0|4160|10920|0|||||||grass|150|-30|3|345|40|3|200|80|0|-10|60|0|0|0|0#0|3130|12040|0|||||||grass|10|65|0|-220|65|0|-150|15|3|0|0|3#0|2620|11800|0|||||||dirt|20|715|1|-240|685|0|-255|-210|0|0|-210|2#0|2750|12225|0|||||||grass|175|50|3|165|100|0|-115|100|0|-120|-30|0|30|35|3#0|2865|11970|0|||||||grass|-105|55|0|-240|50|0|-240|-20|0|-100|-30|3|0|0|3#1|2645|12200|0|||||||43|880#0|2710|11695|0|||||||grass|-95|-285|0|445|-285|0|445|-115|0|295|-35|1|-90|25|1#9|3040|11645|0|||||||320#10|2915|12095|0|||||||-60|114#0|2895|12445|0|||||||bridge|295|205|3|595|170|3|295|335|0|-5|80|0#11|3705|12245|0|||||||||400|#0|3940|12675|0|||||||grass|215|-65|3|680|-30|3|1305|-30|3|1305|255|0|95|80|0|0|0|0#0|2510|12700|0|||||||water|2150|0|3|2335|250|0|-350|250|0|-345|0|0#3|4570|12630|0||||StartNode2|||2#0|5240|12645|0|||||||grass|1805|0|3|1800|285|0|0|285|0|0|0|0#11|5525|12105|0||||||||||#11|6000|12035|0||||||||1||#0|6230|12260|0|||||||grass|490|0|3|455|115|0|50|110|0|0|0|0#11|7045|11830|0|||||||5||500|#0|6775|11660|0|||||||grass|2415|-240|0|1980|450|0|0|180|0|-405|-225|0#9|7560|11950|0|||||||600#11|8005|12005|0|||||||5||500|#0|7045|12670|0|||||||water|1670|0|3|1690|240|0|-5|250|0|0|0|0#11|8650|12100|0|||||||5|1.5|400|45#0|8795|12555|0|||||||dirt|830|0|3|1095|-115|3|1190|230|0|-65|270|0|-80|115|0|0|0|1#12|9520|12530|0||||||#4|9775|12535|0|||||||1650|190|#0|10130|12305|0|||||||dirt|185|105|3|500|145|3|710|95|3|675|395|0|145|325|0|-10|395|0|-80|165|0#3|9425|12535|0||||StartNode3|||3#5|9005|12520|0|ferns|0||||||#0|11010|12350|0|||||||dirt|430|0|3|460|125|0|30|165|0|-25|75|0#0|530|10710|0|||||||bridge|235|-95|3|405|-40|3|-35|-45|0|-35|-90|0#9|1810|10270|0|||||||500#0|1865|10395|0|||||||bridge|350|0|3|350|60|0|45|50|0|0|0|0#0|1400|9900|0|||||||grass|1390|20|0|960|375|0|410|375|0|-530|550|0|-855|15|0#10|1140|10890|0||||||||#0|3840|11140|0|||||||grass|-50|125|0|-120|25|0|60|20|3#6|4105|11510|0|||||||#6|3185|11720|0|||||||#10|4970|12555|0||||||||-18#1|7745|12630|0|||||||-26|720#13|7560|12510|0||||||#13|8250|12595|0||||||#2|7570|12250|0||||||#2|7630|12280|0||||||#1|11390|12355|0|||||||-20|1220#0|11425|12175|0|||||||dirt|570|-10|3|790|195|0|45|300|0|15|170|0|0|0|1#0|9980|11565|0|||||||stone|10|190|1|-130|200|0|-650|200|0|-640|-1020|0|-300|-1020|0|-310|45|1|-100|40|3|0|0|3#0|9680|10935|0|||||||stone|0|-100|0|280|-100|3|280|0|1|0|0|1#9|9750|10925|0|||||||610#9|9880|10935|0|||||||260#11|10220|10845|0||||||||||#11|10730|10845|0||||||||1||#11|11250|10840|0||||||||2||#0|11880|10920|0|||||||dirt|560|-15|0|335|1450|0|115|1245|0|110|-190|1#6|10820|11635|0|||||||0#6|10240|11535|0|||||||#4|11760|10790|0|||||||240|330|End#6|8130|12565|0|||||||#8|4220|12580|0||||||||#0|11060|11745|0|||||||bridge|5|40|0|-1095|-85|0|-1080|-175|0|0|0|3#0|7635|12625|0|||||||bridge|320|-30|3|675|5|3|675|75|0|60|75|0|65|15|0#8|2805|11910|0||||||||#2|2665|11890|0||||||#2|2715|11890|0||||||#13|2685|11835|0||||||#5|11850|11100|0|Door|||||||#6|5605|12440|0|||||||#14|3100|12000|0|||||||#15|855|10875|0|||||||GamePoint#0|2550|10905|0|||||||grass|105|-45|3|470|-60|3|575|0|3|0|0|0#9|2960|12105|0|||||||390#1|11490|11270|0|||||||-47|1520#1|9675|10745|0|||||||84|1500#16|1380|10965|0|||||||||#13|1305|10635|0||||||#13|2045|10340|0||||||#2|700|10565|0||||||#2|1960|10360|0||||||#2|2130|10360|0||||||#9|1000|10425|0|||||||220#11|1305|10370|0||||||||||#9|1665|10305|0|||||||330#2|1340|10855|0||||||#2|1420|10855|0||||||#2|3635|10995|0||||||#2|3755|11120|0||||||#2|3855|11115|0||||||#2|4005|11545|0||||||#2|3445|11650|0||||||#2|3285|11735|0||||||#2|3680|11980|0||||||#2|3740|11980|0||||||#2|3795|11985|0||||||#2|3770|11925|0||||||#2|3715|11925|0||||||#2|4040|11980|0||||||#2|4655|11860|0||||||#14|3535|11980|0|||||||#2|4285|11760|0||||||#2|4340|11780|0||||||#2|4400|11800|0||||||#2|3410|12475|0||||||#2|3465|12530|0||||||#2|3525|12570|0||||||#2|3600|12600|0||||||#2|3685|12615|0||||||#2|3765|12610|0||||||#2|3845|12590|0||||||#2|3915|12550|0||||||#2|3975|12500|0||||||#2|4035|12435|0||||||#2|5760|12225|0||||||#2|5280|12230|0||||||#2|6240|12165|0||||||#13|6955|12600|0||||||#6|6490|12585|0|||||||#6|6475|12210|0|||||||#16|3430|12665|0|||||||||#16|7555|12635|0|||||||||#17|10480|11170|0|||||||||#17|11910|12105|0|||||||-475||#2|10120|12410|0||||||#2|10220|12375|0||||||#2|10365|12370|0||||||#2|10525|12390|0||||||#2|10705|12375|0||||||#2|10570|11630|0||||||#2|10390|11605|0||||||#2|9810|11070|0||||||#2|10395|11065|0||||||#2|10445|11030|0||||||#2|10510|11025|0||||||#2|10560|11070|0||||||#2|10895|11050|0||||||#2|10940|11010|0||||||#2|11050|11020|0||||||#2|11090|11055|0||||||#2|11460|11200|0||||||#13|9735|10800|0||||||#13|11665|11685|0||||||#13|11700|12140|0||||||#0|11995|11550|0|||||||stone|0|40|0|-100|0|0|0|0|0#9|11940|11575|0|||||||450#2|11350|11710|0||||||#2|11455|11700|0||||||#2|10940|11685|0||||||#2|9750|11450|0||||||#2|9750|11320|0||||||#2|9750|11175|0||||||#2|9880|11005|0||||||#2|9795|10800|0||||||#2|9850|10800|0||||||#2|9910|10795|0||||||#2|11705|11075|0||||||#2|11640|11075|0||||||#2|11580|11075|0||||||#5|9840|11450|0|palm|||||||#5|3250|10780|0|Palm|6||||||#5|925|10805|0|Bamboo2|||||||#5|5800|12420|0|Palm|||||||#5|7050|12445|0|Palm||||||14|#10|6570|12250|0||||||||#10|3465|11020|0|||||||20|9#10|4195|11250|0|||||||23|34#10|4195|11420|0|||||||-212|-211#10|4340|12615|0|||||||5|4#10|9660|12530|0|||||||-3|-23#10|9630|12575|0||7||||||-23#5|10220|10700|0|bamboo2|3||||||#5|10730|10705|0|bamboo2|3||||||#5|11250|10690|0|bamboo2|3||||||#0|9510|10545|0|||||||stone|0|-115|0|1845|-115|0|1845|0|0|0|0|1#2|11790|12140|0||||||#2|11875|12140|0||||||#2|11600|12140|0||||||#2|11075|11835|0||||||#2|11175|11940|0||||||#2|11260|12095|0||||||#2|11335|12240|0||||||#2|3725|10885|0||||||#2|3815|10880|0||||||#2|4025|10885|0||||||#2|4100|10885|0||||||#13|3915|10875|0||||||#2|4185|10870|0||||||#2|4260|10850|0||||||#2|4360|10855|0||||||#2|4455|10890|0||||||#2|4135|11980|0||||||#2|4260|11975|0||||||#13|3920|11970|0||||||#14|3995|12615|0|||||||#5|5900|12120|0|bamboo2|0|||||52|#5|5650|12160|0|bamboo2|0|||||-67|#2|8985|12520|0||||||#2|9105|12515|0||||||#2|9225|12515|0||||||#15|2830|12230|0|||||||#15|11490|12135|0|||||||GamePoint#</objects></w>");
SSGame.processLevel("<w version=\"1,0,0,0\" levelName=\"Level2\" preProcess=\"preSetLevel\" background=\"TestBG\" startNode=\"StartNode\" music=\"Music0\"><objects types=\"SSShape,GameElement,CommandBox,GameSwing,VR_HiddenPlatform,GameSpring,RopeObject,GameBigPoint,Checkpoint,FlyingObject,JumpingFish,DirectionArrow,VR_Shield,VR_EMP,GameVehicle,RollingObject,BouncingObject,GamePoint,WalkingObject,GameFuel,GameHealth,GameContainer\">0|13915|7830|0|||||||stone|445|-60|3|445|150|0|5|150|0|0|0|0#0|13355|7860|0|||||||stone|405|-20|3|405|110|0|0|100|0|0|0|0#0|7525|5350|0|||||||dirt|795|230|3|795|385|1|330|360|0|0|245|0|0|5|0#0|9565|7935|0|||||||water|5505|-5|3|5500|330|0|0|315|0|0|0|0#0|1280|5790|0|||||||stone|220|-20|3|220|100|0|0|100|0|0|0|0#0|3715|5740|0|||||||dirt|115|25|3|405|25|3|560|10|3|700|65|3|635|320|0|10|320|0|-105|35|0|0|0|3#1|1890|5405|0||4||StartNode||||#2|15440|4410|0|||||||490|430|End#0|2025|5430|0|||||||bridge|0|65|0|-610|170|0|-610|70|0|-280|0|3|0|0|3#0|605|5655|0|||||||stone|335|0|3|335|215|1|895|215|3|895|770|0|5|770|0|0|0|0#0|2020|4715|0|||||||stone|140|0|3|140|730|1|0|730|1|0|0|1#0|610|5650|0|||||||stone|-175|340|0|-180|-1305|0|0|-1305|0|0|340|1#0|1500|5870|0|||||||bridge|570|-35|3|570|70|0|0|70|0|0|0|0#0|1495|5950|0|||||||water|3045|0|1|3045|390|0|-5|390|0|0|0|0#3|2455|5450|0|||||||5||450|#0|2275|5400|0|||||||stone|775|-80|3|770|40|0|-120|40|0|-120|-80|0#3|2975|5440|0|||||||3|1|250|55#0|3400|5835|0|||||||grass|-35|240|0|-205|250|0|-395|65|0|205|65|3#0|3470|5620|0|||||||dirt|-95|270|0|-260|275|0|-305|95|0|35|50|3#4|675|5615|0|||||||#0|2020|4845|0|||||||bridge|0|140|0|-455|145|0|-450|95|0|0|70|3#0|610|5560|0|||||||VR|255|0|3|255|50|0|0|50|0|0|0|0#0|610|5465|0|||||||VR|200|0|3|200|95|0|0|95|0|0|0|0#0|610|5370|0|||||||VR|135|0|3|135|95|0|0|95|0|0|0|0#5|615|5280|0|||||||42|1340#0|1700|4585|0|||||||stone|1275|-440|0|1275|-65|0|460|30|1|315|30|1|0|55|1|0|-430|0#6|1955|4615|0|||||||230#6|2240|4605|0|||||||620#0|2350|5320|0|||||||stone|-55|0|0|-55|-100|1|0|-100|3|0|0|1#0|2350|5320|0|||||||water|0|-85|0|605|-85|3|605|0|0|0|0|0#0|2955|5220|0|||||||stone|55|0|3|55|100|0|0|100|0|0|0|0#3|2625|4560|0|||||||5||400|#7|2090|4675|0||||||#7|2235|5270|0||||||#0|2975|4520|0|||||||stone|0|-350|0|885|-350|0|885|175|0|500|175|1|0|0|1#3|3170|4590|0||||||||1.5||#6|3835|4700|0|||||||950#4|3835|4760|0|||||||#0|3805|4905|0|||||||VR|0|140|0|-710|140|0|-710|90|0|-325|0|3|0|0|3#0|2910|5030|0|||||||VR|30|95|0|-560|145|0|-555|90|0|0|0|3#0|3480|5770|0|||||||dirt|30|125|0|-215|125|0|-190|0|0|10|40|3#0|3435|5410|0|||||||stone|340|0|3|340|105|1|0|105|1|0|0|1#8|3370|5675|0||||StartNode2|||#7|3490|5370|0||||||#0|4535|5855|0|||||||grass|245|-50|3|245|720|1|120|790|1|0|705|1|0|-40|1#0|4670|4680|0|||||||stone|540|0|0|540|870|1|125|870|1|0|745|1|0|0|1#0|5135|5955|0|||||||stone|30|-60|1|55|0|1|0|0|0#6|4860|5550|0|||||||1180#0|5210|5125|0|||||||stone|0|-180|0|430|-180|0|430|0|0|0|0|1#0|5550|4810|0|||||||stone|170|0|0|170|1485|1|0|1485|1|0|0|1#3|5165|5955|0||||||||||#6|5475|5135|0|||||||1550#6|5275|5135|0|||||||380#0|5335|5545|0|||||||DSGeneric|40|-290|1|70|0|1|0|0|1#7|5275|5405|0||||||#3|5165|5550|0||||||||||#0|5160|6310|0|||||||stone|40|50|1|-40|50|0|0|0|1#3|5160|6355|0||||||||||#0|4630|6790|0|||||||water|985|0|1|985|290|0|-310|295|0|-310|5|0#5|1375|5780|0||||||||740#9|4965|5990|0||||||||225|#9|5420|5600|0||||||||200|#10|5160|6745|0|||||||||#10|5550|6745|0|||||||600||#0|5615|6740|0|||||||grass|700|0|3|700|395|1|0|395|0|0|0|1#0|5720|5115|0|||||||stone|0|-175|0|805|-175|0|805|0|0|0|0|1#6|5815|5115|0|||||||1000#6|5970|5115|0|||||||1560#6|6125|5120|0|||||||1400#11|5860|6730|0||||||||-35#11|6080|6730|0||||||||-135#9|5970|6285|0|||||||||#9|6125|6000|0|||||||-175||#9|5980|5780|0|||||||-200||#9|6105|5215|0||||||||400|#7|6125|5160|0||||||#3|6415|5120|0||||||||||#0|6685|5480|0|||||||dirt|0|580|0|-480|580|0|-480|530|1|0|-125|1#5|6235|5980|0|||||||-28|820#0|6315|6775|0|||||||water|2670|-5|1|2670|265|0|0|280|0|0|0|0#0|6685|5355|0|||||||bridge|840|0|3|840|65|0|0|65|0|0|0|0#8|7030|5345|0||||StartNode3|||#0|6320|6680|0|||||||VR|980|0|3|980|75|0|0|75|0|0|0|0#12|5970|6615|0||||||#10|6380|6730|0|||||||||#5|6860|6675|0||||||||1780#4|6395|6625|0|||||||#13|4740|5660|0||||||#14|7470|5330|0||||||#0|8490|5610|0|||||||dirt|295|45|3|605|5|3|605|160|1|305|205|0|0|130|0|0|0|1#15|8950|5490|0|||||||#0|9230|5620|0|||||||dirt|240|110|3|490|85|3|315|230|0|0|170|0|0|0|1#2|7710|5825|0|||||||4000|160|#0|9720|5705|0|||||||bridge|550|-60|3|550|20|0|0|70|0|0|0|0#0|10270|5645|0|||||||stone|380|55|3|380|225|0|155|305|0|0|190|0|0|0|0#15|10070|5565|0|||||||#0|10865|5715|0|||||||stone|445|0|3|445|250|0|0|180|0|0|0|0#0|11465|5715|0|||||||grass|550|90|3|550|815|1|0|815|0|0|0|0#0|12150|5335|0|||||||dirt|-550|-80|1|-495|-395|0|460|-205|0|460|1700|1|0|1700|0|0|0|1#0|12150|6840|0|||||||grass|0|290|0|-540|290|0|-540|160|0|0|0|3#16|11830|6835|0||||||||#6|12080|5335|0|||||||1450#6|11545|6540|0|||||||1230#11|11905|5780|0||||||||#0|11685|7780|0|||||||grass|290|80|3|180|160|0|-285|160|0|-550|95|0|-290|0|3|0|0|3#0|11975|7860|0|||||||bridge|690|30|3|690|130|0|0|130|0|0|0|0#0|12665|7890|0|||||||grass|540|0|3|540|115|0|0|115|0|0|0|0#10|12035|7890|0|||||||||#10|12450|7895|0|||||||||#0|940|5765|0|||||||bridge|125|10|3|125|105|0|0|105|0|0|0|0#0|1325|5560|0|||||||bridge|10|80|0|-270|120|0|-270|50|0|0|0|3#1|1345|5645|0|bamboo2|6|||||-26|#1|1050|5720|0|bamboo2|6||||||#11|1390|5885|0||6||||||#17|1955|4880|0||||||#17|1875|4885|0||||||#17|1785|4885|0||||||#17|1695|4890|0||||||#18|3460|5635|0|||||||#1|2885|5920|0|ferns|||||||#17|2120|5690|0||||||#17|2450|5865|0||||||#17|2785|5690|0||||||#17|2645|5815|0||||||#17|2240|5810|0||||||#11|1775|5420|0|||||||-4|-180#17|1000|5735|0||||||#17|1110|5835|0||||||#17|1190|5835|0||||||#7|1000|5830|0||||||#17|910|5615|0||||||#17|840|5610|0||||||#17|755|5610|0||||||#10|1820|5900|0|||||||||#17|3835|5640|0||||||#17|3835|5560|0||||||#17|3835|5475|0||||||#17|3570|5370|0||||||#17|3635|5370|0||||||#17|3700|5370|0||||||#7|3835|4825|0||||||#17|3375|4750|0||||||#17|3295|4820|0||||||#17|3040|4815|0||||||#17|3185|4860|0||||||#17|2340|4775|0||||||#17|2620|4930|0||||||#17|2935|4745|0||||||#17|2800|4880|0||||||#17|2455|4880|0||||||#16|4715|5760|0||||||||#18|1745|5815|0|||||||#18|4025|5720|0|||||||#18|6215|6690|0|||||||#17|4950|5715|0||||||#17|5165|5815|0||||||#17|5380|5710|0||||||#17|5160|6220|0||||||#17|5370|6120|0||||||#17|4955|6120|0||||||#17|5040|5785|0||||||#17|5285|5780|0||||||#17|5475|5635|0||||||#17|4855|5640|0||||||#17|4855|5765|0||||||#17|4855|5885|0||||||#17|4850|6005|0||||||#17|5470|5740|0||||||#17|5475|5875|0||||||#17|5475|5990|0||||||#17|5470|6110|0||||||#17|5470|6230|0||||||#17|5470|6350|0||||||#17|5470|6460|0||||||#17|5470|6580|0||||||#17|5045|6190|0||||||#17|5285|6190|0||||||#17|4855|6240|0||||||#12|4020|5630|0||||||#17|4855|6120|0||||||#17|4855|6355|0||||||#17|4855|6480|0||||||#17|4860|6610|0||||||#17|4950|6515|0||||||#17|5040|6595|0||||||#17|5160|6625|0||||||#17|5285|6590|0||||||#17|5375|6515|0||||||#9|5395|6395|0|||||||225|175|#17|5890|6060|0||||||#17|5890|5950|0||||||#17|5890|5840|0||||||#17|5890|5710|0||||||#17|5890|5595|0||||||#17|5890|5475|0||||||#17|5890|5355|0||||||#17|5890|5245|0||||||#17|6050|6440|0||||||#17|6050|6310|0||||||#17|6050|6190|0||||||#17|6050|6060|0||||||#17|6050|5910|0||||||#17|6050|5770|0||||||#17|6050|5620|0||||||#17|6050|5470|0||||||#17|6045|5345|0||||||#17|6720|5230|0||||||#17|7615|5340|0||||||#17|7780|5390|0||||||#17|7945|5440|0||||||#17|8105|5485|0||||||#14|12990|7860|0||||||#0|14180|7700|0|||||||bridge|5|40|0|-1020|45|0|-1020|-165|0|-740|-165|3|-520|-35|3|0|0|3#0|12945|7510|0|||||||bridge|20|80|0|-485|-40|0|-420|-175|0|-355|-95|3|0|0|3#5|12540|7325|0|||||||76|1800#0|13670|7315|0|||||||bridge|190|65|3|695|-45|3|0|0|0#0|14365|5860|0|||||||stone|395|0|3|395|2095|0|0|2095|0|0|0|1#19|14315|7235|0||||||#5|13685|7335|0|||||||-38|#0|13230|6950|0|||||||bridge|0|100|0|-625|100|0|-625|-35|0|-300|60|3|0|0|3#15|13190|6860|0|||||||#5|12635|6915|0|||||||30|#1|7270|5255|0||||StartNodeTest||||#0|13045|6330|0|||||||bridge|240|65|3|855|65|3|1050|10|3|1050|115|0|0|115|0|0|0|0#15|13215|6295|0|||||||#15|13970|6240|0|||||||#5|14275|6340|0|||||||-73|1820#5|14335|6435|0||||||||#5|14345|5920|0|||||||-67|2160#17|12650|5705|0||||||#0|12605|6225|0|||||||bridge|315|0|3|835|-195|3|1225|-125|3|1550|-180|3|1560|-80|0|870|25|0|5|85|0|0|0|0#0|14755|4845|0|||||||stone|320|0|3|320|1385|0|0|1385|0|0|0|1#19|14335|6315|0||||||#19|12660|6180|0||||||#0|12610|5740|0|||||||bridge|250|0|3|430|-60|3|430|40|0|260|85|0|0|85|0|0|0|0#5|13065|5695|0|||||||32|#0|13420|5225|0|||||||bridge|305|100|3|585|-10|3|620|150|0|0|150|0|0|0|0#17|13725|5265|0||||||#17|13160|5555|0||||||#17|13245|5435|0||||||#17|13340|5305|0||||||#17|13500|5170|0||||||#5|14015|5215|0|||||||40|#0|15075|4845|0|||||||grass|1010|0|3|1010|465|0|0|465|0|0|0|0#18|13650|5245|0|||||||0#20|13590|6305|0|||||||#17|13415|7820|0||||||#17|13530|7810|0||||||#17|13650|7800|0||||||#17|13875|7640|0||||||#17|14120|7660|0||||||#17|14005|7645|0||||||#17|11550|7075|0||||||#17|11555|7185|0||||||#17|11545|7335|0||||||#17|11550|7520|0||||||#17|12080|5860|0||||||#17|12080|6020|0||||||#17|12080|6195|0||||||#17|12080|6415|0||||||#17|13060|6135|0||||||#17|13180|6085|0||||||#17|13295|6040|0||||||#17|13915|5210|0||||||#17|14805|4810|0||||||#17|14895|4805|0||||||#17|14985|4805|0||||||#11|15055|4835|0||||||||#11|11760|7780|0||||||||#11|14315|7765|0|||||||-6|-172#17|14170|7260|0||||||#17|14035|7295|0||||||#17|13885|7325|0||||||#17|13795|7305|0||||||#17|12740|6915|0||||||#17|12835|6940|0||||||#17|12935|6965|0||||||#17|13040|6950|0||||||#7|13160|6915|0||||||#7|13590|6355|0||||||#7|14335|6360|0||||||#17|13155|6325|0||||||#17|13275|6355|0||||||#17|13410|6360|0||||||#17|13755|6355|0||||||#17|13900|6350|0||||||#17|14030|6320|0||||||#17|13855|6060|0||||||#17|13935|6040|0||||||#17|14015|6030|0||||||#11|3250|5690|0||||||||#20|5815|5170|0|||||||#20|5475|5525|0|||||||#11|6765|5345|0||||||||#8|12790|7875|0||||StartNode4|||#1|15570|4835|0|door|||||||#21|12900|7470|0|||||||GamePoint#21|13230|7510|0|||||||GamePoint#21|13760|7645|0|||||||GamePoint#21|13510|6365|0|||||||GamePoint#21|13675|6365|0|||||||GamePoint#19|12750|5700|0||||||#21|3885|5730|0|||||||GameBigPoint#</objects></w>");
SSGame.processLevel("<w version=\"1,0,0,0\" levelName=\"Level3\" preProcess=\"preSetLevel\" background=\"Level3\" startNode=\"StartNode\" music=\"Music0\"><objects types=\"SSShape,GameElement,CommandBox,GameVehicle,GameSpring,RopeObject,RollingObject,GameSwing,WalkingObject,Checkpoint,DirectionArrow,VR_HiddenPlatform,GameBigPoint,FlyingObject,JumpingFish,BouncingObject,GamePoint,GameContainer\">0|6805|7675|0|||||||dirt|0|170|0|-355|80|0|-355|-30|0|0|0|3#1|470|7555|0||4||StartNode||||#2|17875|7030|0|||||||30|30|Machine#0|1430|7600|0|||||||stone|-605|420|0|-1665|420|0|-1665|-540|0|-1265|-540|0|-1265|0|1|-605|0|3#1|1200|7565|0|palm|||||||#1|1425|7555|0|palm|||||||#1|1690|7555|0|palm|||||||#1|1285|7425|0|palm|6||||||#1|1555|7425|0|palm|6||||||#0|1130|7600|0|||||||grass|845|60|3|865|400|0|0|305|0|0|0|0#3|675|7570|0||||||#0|1975|7745|0|||||||water|620|0|3|620|320|0|0|340|0|0|0|0#0|1975|7660|0|||||||bridge|625|0|3|625|55|0|0|55|0|0|0|0#0|2600|7660|0|||||||grass|505|-60|3|505|400|0|0|400|0|0|0|0#4|3075|7610|0|||||||51|#0|4180|7435|0|||||||grass|205|-110|3|415|-55|3|885|5|3|1085|-105|3|1330|335|0|-125|325|0|0|0|1#0|5615|7260|0|||||||grass|855|0|3|855|275|0|0|275|0|0|0|0#4|4200|7450|0|||||||-63|1600#0|3100|7735|0|||||||water|3505|-5|3|3510|290|0|0|290|0|0|0|0#0|6605|7730|0|||||||water|1080|380|3|1080|865|0|0|295|0|0|0|0#1|6550|7130|0|bamboo2||||||33|#5|6630|7015|0|||||||570#6|5200|7300|0|||||||#7|7060|7320|0||||||||||#0|6755|6990|0|||||||grass|605|90|3|605|365|1|310|325|0|-10|435|0|-70|125|1#4|6785|7675|0||||||||500#0|7440|6535|0|||||||grass|525|85|0|445|965|0|-10|865|0|0|0|1#7|7555|7435|0||||||||1.5||#0|7815|7840|0|||||||grass|340|-65|3|200|95|0|50|-65|0#4|7900|7770|0|||||||54|1060#0|8910|7835|0|||||||grass|255|75|3|510|-15|3|525|160|1|0|160|0|0|0|1#8|9005|7820|0|||||||#0|9345|7395|0|||||||grass|450|65|3|935|70|3|870|300|0|20|180|0|-20|-160|1#7|9650|7590|0||||||||||#7|10135|7680|0||||||||1.5||#0|10430|8005|0|||||||grass|220|-50|3|655|-50|3|655|490|1|0|515|0|0|0|0#9|10710|7940|0|||||||#8|10985|7920|0|||||||#10|10830|7940|0||||||||#4|10410|8045|0||||||||880#11|10410|7555|0|||||||#0|10350|7595|0|||||||VR|185|10|3|345|-5|3|340|70|0|0|65|0|0|0|0#4|10735|7595|0|||||||-46|960#0|11090|8295|0|||||||stone|570|0|3|570|205|1|0|205|0|0|0|0#0|11225|7945|0|||||||grass|440|0|3|445|305|1|0|170|0|0|0|1#0|11655|7455|0|||||||grass|630|0|0|630|240|0|280|240|0|0|170|0|0|0|0#7|11855|7665|0||||||||||#4|11295|8290|0||||||||800#5|12170|7690|0|||||||350#0|10430|8110|0|||||||water|5|485|0|-2750|485|0|-2750|0|0|0|0|3#12|10410|7635|0||||||#1|12430|7730|0|Bamboo2||||||108|#0|11660|8375|0|||||||water|1320|-210|3|1320|130|0|0|130|0|5|-210|0#13|12315|8025|0||||||||-275|#14|12165|8095|0|||||||||#5|12445|7745|0|||||||290#5|12555|7775|0|||||||150#0|11665|8095|0|||||||stone|0|200|0|-105|200|0|-105|0|1|0|0|0#0|12970|7945|0|||||||grass|405|0|3|405|580|1|0|580|0|0|0|1#1|12855|7825|0|Bamboo2||||||-48|#7|12755|7730|0|||||||3||200|55#5|13155|6495|0|||||||670#0|13085|7175|0|||||||stone|190|20|3|190|155|1|70|245|1|0|150|1|0|0|1#0|13375|7375|0|||||||stone|155|0|3|155|145|0|0|145|0|0|0|0#7|13460|7525|0||||||||||#0|13750|7520|0|||||||stone|0|-65|0|140|-65|3|295|-120|3|505|-70|3|505|0|0|0|0|0#7|14000|7525|0||||||||1.5||#5|14335|7020|0|||||||950#0|15465|8135|0|||||||water|0|365|0|-2090|365|0|-2090|0|0|0|0|1#5|13450|6515|0||2|||||440#5|13155|7405|0|||||||480#10|13450|7365|0|||||||-1|-180#0|13395|6955|0|||||||stone|110|0|3|110|100|1|0|100|1|0|0|1#1|13660|7430|0|Bamboo2||||||-71|#4|13650|7450|0||||||||660#0|13055|6490|0|||||||stone|0|-125|0|1400|-120|0|1400|110|0|0|0|1#15|13450|6915|0||||||||#13|13370|6795|0|||||||||#5|13305|6510|0|||||||240#4|13510|6985|0|||||||58|840#0|14085|6955|0|||||||stone|730|-35|3|730|75|0|-30|70|1|-30|-30|0#9|14375|6915|0|||||||#0|14815|6925|0|||||||bridge|1010|120|3|1010|240|0|0|80|0|0|-5|0#0|15810|6645|0|||||||grass|1045|0|3|1045|220|0|0|220|1|0|0|0#0|15460|7170|0|||||||water|3015|0|3|3020|365|0|-180|360|0|-180|0|0#0|15280|7165|0|||||||stone|-160|970|0|-155|-80|1|0|-80|3|185|970|0#0|15130|7135|0|||||||VR|-75|50|0|-745|50|0|-745|0|0|-75|5|3#11|14410|7095|0|||||||#12|14335|7090|0||||||#4|15090|7225|0||||||||#4|15015|6650|0|||||||60|1120#1|14930|6515|0|Bamboo2||||||-33|#5|13450|7055|0||2|||||300#14|15940|7120|0|||||||||#14|16315|7120|0|||||||||#5|15945|6865|0|||||||220#5|16140|6865|0|||||||240#5|16320|6860|0|||||||140#7|16635|6860|0|||||||||250|#0|17785|7070|0|||||||stone|595|90|0|-440|95|0|-440|0|0|595|0|3#0|16945|7070|0|||||||grass|400|0|3|400|100|0|0|100|0|0|0|1#11|10235|7405|0|||||||#0|10260|7690|0|||||||VR|315|130|3|315|180|0|-5|100|0|0|0|0#16|210|7565|0||||||#16|285|7565|0||||||#12|250|7505|0||||||#16|1385|7570|0||||||#16|1530|7580|0||||||#16|1660|7590|0||||||#0|1130|7595|0|||||||bridge|0|80|0|-305|85|0|-305|5|0|0|5|3#16|2050|7620|0||||||#16|2145|7620|0||||||#16|2240|7620|0||||||#16|2330|7620|0||||||#16|2415|7620|0||||||#16|2505|7620|0||||||#16|5640|7210|0||||||#16|5250|7270|0||||||#16|5420|7120|0||||||#16|6735|7075|0||||||#16|6825|7065|0||||||#16|6910|7060|0||||||#16|7000|7055|0||||||#16|7085|7050|0||||||#12|7305|7030|0||||||#16|6850|7480|0||||||#16|6935|7555|0||||||#16|7055|7585|0||||||#16|7180|7550|0||||||#16|7265|7475|0||||||#16|7550|7705|0||||||#16|7765|7595|0||||||#16|7675|7670|0||||||#16|7440|7675|0||||||#12|7355|7605|0||||||#12|9410|7215|0||||||#16|9500|7270|0||||||#16|9585|7315|0||||||#16|9670|7350|0||||||#16|9750|7390|0||||||#16|9830|7415|0||||||#16|9920|7420|0||||||#16|10015|7425|0||||||#16|10115|7420|0||||||#16|11510|8260|0||||||#16|11440|8260|0||||||#16|11370|8260|0||||||#16|11215|8260|0||||||#16|11140|8260|0||||||#16|11370|8195|0||||||#16|11440|8195|0||||||#16|11175|8210|0||||||#16|11140|8165|0||||||#16|11140|8105|0||||||#16|11140|8045|0||||||#16|11140|7985|0||||||#16|11245|8205|0||||||#16|12500|7820|0||||||#16|12630|7840|0||||||#16|12745|7890|0||||||#16|12870|7845|0||||||#12|15095|7140|0||||||#12|13160|6545|0||||||#12|13305|6560|0||||||#12|13455|6570|0||||||#12|13445|7095|0||||||#12|13160|7465|0||||||#16|13245|7685|0||||||#16|13455|7795|0||||||#16|13675|7685|0||||||#16|13335|7765|0||||||#16|13580|7750|0||||||#16|13785|7695|0||||||#16|14005|7795|0||||||#16|13885|7755|0||||||#16|14100|7775|0||||||#16|14205|7700|0||||||#16|13790|7425|0||||||#16|13870|7420|0||||||#16|13940|7400|0||||||#16|14015|7370|0||||||#16|13650|7375|0||||||#16|13650|7310|0||||||#16|13650|7245|0||||||#16|13650|7175|0||||||#16|13225|6685|0||||||#16|13220|6615|0||||||#16|13380|6615|0||||||#16|13380|6690|0||||||#10|13070|7925|0||||||||-30#12|15935|6595|0||||||#12|16080|6595|0||||||#12|16215|6595|0||||||#12|16350|6595|0||||||#12|16490|6600|0||||||#12|16640|6600|0||||||#12|16770|6600|0||||||#8|15320|6940|0|||||||#8|14975|6900|0|||||||#16|15490|6965|0||||||#16|15590|6980|0||||||#16|15700|6990|0||||||#16|15090|6915|0||||||#10|17150|7060|0||||||||#9|6095|7240|0|||||||#1|17885|7055|0|EvilMachine|2||EvilMachine||||#0|18700|5680|0|||||||stone|0|1820|0|-325|1820|0|-325|0|1|0|0|0#17|2605|7625|0|||||||GamePoint#17|8110|7740|0|||||||GameBigPoint#17|15205|7060|0|||||||GameBigPoint#1|17255|6920|0|Palm|5||||||#1|17440|7045|0|Ferns|||||||#</objects></w>");
SSGame.onReady = function () {
gotoAndStop ("complete");
};
SSGame.process();
Frame 36
stop();
Frame 45
stop();
Frame 47
SSGame.startNewGame();
Frame 50
prevFrame();
Symbol 22 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 1
stop();
Symbol 45 MovieClip Frame 1
stop();
Symbol 49 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 1
stop();
Symbol 143 Button
on (release) {
if (PostVRTips) {
nextFrame();
} else {
gotoAndStop ("help");
}
}
Symbol 154 Button
on (release) {
prevFrame();
}
Symbol 155 Button
on (release) {
nextFrame();
}
Symbol 160 Button
on (release) {
prevFrame();
}
Symbol 175 MovieClip Frame 1
stop();
Symbol 188 Button
on (release) {
_root.startGame();
}
Symbol 189 MovieClip Frame 52
stop();
Symbol 918 MovieClip [__Packages.SSInterface] Frame 0
class SSInterface extends MovieClip
{
static var currentGame, target, currentObject;
var stop, gotoAndStop, btnCover;
function SSInterface () {
super();
register(this);
stop();
}
function onUnload() {
unregister(this);
}
function show(frame, noPause) {
if (!noPause) {
currentGame.pause();
}
(gotoAndStop(frame));// not popped
btnCover.onRelease = function () {
};
btnCover.useHandCursor = false;
}
static function hide() {
target.resume();
}
static function showScreen(screen, noPause) {
target.show(screen, noPause);
}
function resume() {
(gotoAndStop(1));// not popped
currentGame.resume();
}
static function register(mc) {
target = mc;
}
static function unregister(mc) {
target = null;
}
static function registerGame(game) {
}
static function unwatchObject() {
if (!currentObject) {
return(undefined);
}
var _local2;
_local2 = watchList;
var _local1 = _local2.length;
while (_local1-- , _local1 > -1) {
_local2[_local1].t.unwatch(_local2[_local1].n);
}
currentObject = null;
}
static function watchObject(obj, initMethod) {
currentGame = obj.control.world.engine;
unwatchObject();
initMethod.apply(SSInterface, arguments);
currentObject = obj;
}
static function watchProp(obj, prop, method) {
obj.watch(prop, method);
watchList.push({n:prop, t:obj});
method(prop, obj[prop], obj[prop]);
}
static function textValue(prop, oldValue, newValue) {
target[prop] = newValue;
return(newValue);
}
static function meterValue(prop, oldValue, newValue) {
target[prop].setValue(newValue);
return(newValue);
}
static function invertedMeterValue(prop, oldValue, newValue) {
target[prop].value = 1 - newValue;
return(newValue);
}
static function unwatchProp() {
}
static var watchList = [];
}
Symbol 919 MovieClip [__Packages.GDK.Base] Frame 0
class GDK.Base extends MovieClip
{
static var root;
var worlds, useMask, setMask, attachMovie, tabChildren, _xscale, _yscale, _parent, sendEvent, mcMask, mcDead0, engineIntervalID, lastUpdate, onStart, onPause, onResume, onStop, activeWorld, onUpdate, onWorldChanged;
function Base () {
super();
new GDK.EventSubscriber(this);
worlds = new GDK.Collection();
if (useMask) {
setMask(attachMovie("Square", "mcMask", 13421568));
}
root = this;
tabChildren = false;
setSize(Math.round(_xscale), Math.round(_yscale));
_yscale = (_xscale = 100);
previewClip = _parent._name == "contents";
if (!previewClip) {
for (var _local3 in this) {
if (_local3.indexOf("mcDead") != -1) {
this[_local3].swapDepths(1048575);
this[_local3].removeMovieClip();
}
}
}
}
function setSize(w, h, noEvent) {
if ((w == width) && (h == height)) {
return(undefined);
}
halfWidth = w * 0.5;
halfHeight = h * 0.5;
if (noEvent) {
width = w;
height = h;
} else {
sendEvent("Resize", (width = w), (height = h), width, height);
}
if (useMask) {
mcMask._xscale = w;
mcMask._yscale = h;
}
if (mcDead0) {
mcDead0._xscale = w;
mcDead0._yscale = h;
}
}
function start() {
if (engineIntervalID) {
return(undefined);
}
lastUpdate = getTimer();
engineIntervalID = setInterval(function (o) {
o.update();
}, 0, this);
onStart();
sendEvent("Start");
running = true;
update();
}
function pause() {
paused = true;
onPause();
sendEvent("Pause");
update();
}
function resume() {
paused = false;
onResume();
sendEvent("Resume");
update();
}
function stop() {
running = false;
clearInterval(engineIntervalID);
delete engineIntervalID;
onStop();
sendEvent("Stop");
}
function update() {
if (paused) {
lastUpdate = getTimer();
return(undefined);
}
var _local2 = Math.min(maxFrameTime, (lastUpdate - ((lastUpdate = getTimer()))) * -0.001);
_local2 = lastElapsed - Math.max(-maxTimeDifference, Math.min(maxTimeDifference, lastElapsed - _local2));
activeWorld.update(_local2);
activeWorld.render(_local2);
onUpdate();
sendEvent("Update", (lastElapsed = _local2));
}
function getWorld(name) {
var _local2 = worlds.length;
while (_local2-- , _local2 > -1) {
if (worlds[_local2].name == name) {
return(worlds[_local2]);
}
}
return(null);
}
function addWorld(worldObj) {
if (!worlds.addMember(worldObj)) {
return(undefined);
}
worldObj.displayNode = this;
worldObj.engine = this;
}
function removeWorld(worldObj) {
var _local2 = worlds.length;
while (_local2-- , _local2 > -1) {
if (worlds[_local2] == worldObj) {
worlds.splice(_local2, 1);
}
}
delete worlds[worldObj.name];
worldObj.removeFromScene();
}
function removeAllWorlds() {
activeWorld.removeFromScene();
activeWorld = null;
var _local2 = worlds.length;
while (_local2-- , _local2 > -1) {
worlds[_local2].removeFromScene();
}
worlds = new GDK.Collection();
}
function setActiveWorld(worldObj) {
if (activeWorld == worldObj) {
return(undefined);
}
activeWorld.removeFromScene();
activeWorld = worldObj;
worldObj.addToScene();
worldObj.update(0.0001);
onWorldChanged();
sendEvent("WorldChanged");
}
function onUnload() {
stop();
sendEvent("Unload");
setActiveWorld(null);
}
var previewClip = false;
var paused = false;
var width = 100;
var height = 100;
var halfWidth = 50;
var halfHeight = 50;
var version = "GDK 1,3,80,0";
var running = false;
var maxFrameTime = 0.05;
var lastElapsed = 0.005;
var maxTimeDifference = 0.005;
}
Symbol 920 MovieClip [__Packages.GDK.EventSubscriber] Frame 0
class GDK.EventSubscriber
{
var mappedEvents;
function EventSubscriber (obj) {
initObject(obj);
}
static function initObject(obj) {
obj.addEvent = GDK.EventSubscriber.prototype.addEvent;
obj.removeEvent = GDK.EventSubscriber.prototype.removeEvent;
obj.sendEvent = GDK.EventSubscriber.prototype.sendEvent;
obj.removeAllEvents = GDK.EventSubscriber.prototype.removeAllEvents;
obj.mappedEvents = {};
}
function addEvent(name, method, target, options) {
if (!target) {
target = this;
}
var _local2;
_local2 = mappedEvents[name];
if (!_local2) {
_local2 = (mappedEvents[name] = []);
}
var _local3 = {t:target, fn:method, n:(options & EVENT_NAME_AS_ARGUMENT) > 0};
if ((options & 1) == 0) {
_local2.push(_local3);
} else {
_local2.unshift(_local3);
}
}
function sendEvent(name) {
var _local4;
_local4 = mappedEvents[name];
if (_local4) {
var _local5 = arguments.slice(1);
var _local3 = _local4.length;
while (_local3-- , _local3 > -1) {
_local4[_local3].fn.apply(_local4[_local3].t, (_local4[_local3].n ? arguments : (_local5)));
}
}
}
function removeEvent(name, method, target) {
var _local3;
if ((name == null) || (!(_local3 = mappedEvents[name]))) {
return(undefined);
}
var _local2 = _local3.length;
if (!target) {
while (_local2-- , _local2 > -1) {
if (_local3[_local2].fn == method) {
_local3.splice(_local2, 1);
}
}
} else if (!method) {
while (_local2-- , _local2 > -1) {
if (_local3[_local2].t == target) {
_local3.splice(_local2, 1);
}
}
} else {
while (_local2-- , _local2 > -1) {
if ((_local3[_local2].fn == method) && (_local3[_local2].t == target)) {
_local3.splice(_local2, 1);
}
}
}
}
function removeAllEvents(target) {
var _local3;
for (var _local5 in mappedEvents) {
_local3 = mappedEvents[_local5];
var _local2 = _local3.length;
while (_local2-- , _local2 > -1) {
if (_local3[_local2].t == target) {
_local3.splice(_local2);
}
}
}
}
static var CALL_LAST = 1;
static var EVENT_NAME_AS_ARGUMENT = 2;
}
Symbol 921 MovieClip [__Packages.GDK.Collection] Frame 0
class GDK.Collection extends Array
{
var id, push, length, splice;
function Collection () {
super();
Collections[(id = ++created)] = this;
}
static function removeFromAll(obj) {
var _local1;
_local1 = obj.__col;
if (!_local1) {
return(undefined);
}
for (var _local3 in _local1) {
Collections[_local3].removeMember(obj);
}
}
static function removeAll() {
}
function addMember(obj) {
if (obj.__col[id]) {
return(false);
}
push(obj);
if (!obj.__col) {
obj.__col = {count:0};
}
obj.__col[id] = true;
obj.__col.count++;
return(true);
}
function removeMember(obj) {
if (!obj.__col[id]) {
return(false);
}
var _local2 = length;
while (_local2-- , _local2 > -1) {
if (this[_local2] == obj) {
splice(_local2, 1);
break;
}
}
if (!(--obj.__col.count)) {
delete obj.__col;
} else {
delete obj.__col[id];
}
delete this[length];
return(true);
}
function update(elapsed) {
var _local2 = length;
while (_local2-- , _local2 > -1) {
this[_local2].update(elapsed);
}
}
function send(sID) {
var _local4 = arguments.slice(1);
var _local3 = length;
while (_local3-- , _local3 > -1) {
this[_local3][sID].apply(this[_local3], _local4);
}
}
static var Collections = [];
static var created = 0;
}
Symbol 922 MovieClip [__Packages.GDK.Node] Frame 0
class GDK.Node
{
var onAddToWorld, addEvent, onRemoveFromWorld, onAddToScene, onRemoveFromScene, onAddDisplay, onRemoveDisplay, target, sendEvent, world, children, onBeginParent, onEndParent, onAddChild, parent, displayNode, assetID, onCollision, onMove, name;
function Node () {
uniqueID = ++created;
new GDK.EventSubscriber(this);
setRenderable(renderable);
setAffectChildren(affectChildren);
if (onAddToWorld) {
addEvent("addToWorld", onAddToWorld, this);
}
if (onRemoveFromWorld) {
addEvent("removeFromWorld", onRemoveFromWorld, this);
}
if (onAddToScene) {
addEvent("addToScene", onAddToScene, this);
}
if (onRemoveFromScene) {
addEvent("removeFromScene", onRemoveFromScene, this);
}
if (onAddDisplay) {
addEvent("addDisplay", onAddDisplay, this);
}
if (onRemoveDisplay) {
addEvent("removeDisplay", onRemoveDisplay, this);
}
}
function setAngle(angle) {
this.angle = angle;
if (target) {
target._rotation = angle;
}
sendEvent("rotate", angle);
}
function addToScene() {
if (inScene) {
return(undefined);
}
world.addActiveObject(this);
inScene = true;
addDisplay();
sendEvent("addToScene");
if (children) {
var _local2 = children.length;
while (_local2-- , _local2 > -1) {
children[_local2].addToScene();
}
}
}
function removeFromScene() {
if ((!inScene) || (keepInScene)) {
return(undefined);
}
removeDisplay();
inScene = false;
world.removeActiveObject(this);
sendEvent("removeFromScene");
if (children) {
var _local2 = children.length;
while (_local2-- , _local2 > -1) {
children[_local2].removeFromScene();
}
}
}
function setAffectChildren(b) {
if (affectChildren == b) {
return(undefined);
}
if ((affectChildren = b)) {
if (children) {
onBeginParent();
}
} else if (children) {
onEndParent();
}
}
function addChild(child, isolated) {
if ((!allowChildren) || (child.parent == this)) {
return(false);
}
child.parent.removeChild(child);
child.parent = this;
if (world && (world != child.world)) {
world.addObject(child, true);
}
if (children == undefined) {
if (affectChildren) {
positionChanged = pv_positionChanged;
}
onBeginParent();
hasChildren = true;
children = [child];
} else {
children.push(child);
}
if (inScene && (!isolated)) {
child.addToScene();
}
onAddChild(child);
return(true);
}
function removeChild(child) {
if ((!children) || (child.parent != this)) {
return(undefined);
}
var _local2 = children.length;
while (_local2-- , _local2 > -1) {
if (children[_local2] == child) {
children.splice(_local2, 1);
break;
}
}
child.parent = undefined;
if (!children.length) {
delete positionChanged;
onEndParent();
hasChildren = false;
delete children;
}
}
function addToWorld(newWorld) {
newWorld.addObject(this);
}
function removeFromWorld() {
world.removeObject(this);
}
function detachFromParent() {
parent.removeChild(this);
}
function becomeChildTo(parent) {
parent.addChild(this);
}
function requestDisplaySpace() {
if (!displayNode) {
var _local2 = parent;
while (_local2) {
if (_local2.isDisplayNode) {
break;
}
_local2 = _local2.parent;
}
displayNode = (_local2 ? (_local2.target) : (world.target));
}
var _local3;
if (assetID != null) {
_local3 = displayNode.attachMovie(assetID, "mc" + uniqueID, 2130690045 - uniqueID);
} else {
_local3 = displayNode.createEmptyMovieClip("mc" + uniqueID, 2130690045 - uniqueID);
}
return(_local3);
}
function addDisplay() {
if ((!renderable) || (target)) {
return(undefined);
}
queueForDisplay();
target = requestDisplaySpace();
sendEvent("addDisplay");
}
function removeDisplay() {
sendEvent("removeDisplay");
target.swapDepths(0);
target.removeMovieClip();
delete target;
}
function setAssetID(newAssetID) {
if (assetID == newAssetID) {
return(undefined);
}
if (inScene) {
removeDisplay();
}
assetID = newAssetID;
if (inScene) {
addDisplay();
}
}
function queueForDisplay() {
if (renderable) {
world.queueForDisplay(this);
}
}
function setRenderable(b) {
if (b) {
delete queueForDisplay;
if (inScene) {
addDisplay();
}
} else if (inScene) {
removeDisplay();
}
}
function checkCollisionList(objects, flag, options, maxCol) {
if (maxCol == null) {
maxCol = 256;
}
if (flag == null) {
return(undefined);
}
stopCol = false;
var _local3 = 0;
var _local6;
var _local4 = objects.length;
collisionID++;
var _local2;
while ((!stopCol) && ((_local4--) > -1)) {
_local2 = objects[_local4];
if (((_local2 != this) && (collisionID != _local2.lastCollisionID)) && ((flag & _local2.classID) > 0)) {
_local2.lastCollisionID = collisionID;
_local6 = checkCollision(_local2);
if (_local6) {
_local3++;
}
switch (_local6) {
case 1 :
if (onCollision(objects[_local4], options) == COLLISION_CANCEL) {
return(_local3);
}
break;
default :
break;
case 2 :
return(_local3);
}
}
}
return(_local3);
}
function checkCollision(obj) {
return(false);
}
function moveTo(x, y, z) {
moveBy(x - this.x, y - this.y, z - this.z);
}
function moveBy(x, y, z) {
if ((x || (y)) || (z)) {
this.x = this.x + x;
this.y = this.y + y;
this.z = this.z + z;
positionChanged(x, y, z);
}
}
function moveToGlobally(x, y, z) {
}
function positionChanged(xShift, yShift, zShift) {
onMove(xShift, yShift, zShift);
queueForDisplay();
}
function pv_positionChanged(xShift, yShift, zShift) {
onMove(xShift, yShift, zShift);
var _local2 = children.length;
while (_local2-- , _local2 > -1) {
children[_local2].moveBy(xShift, yShift, zShift);
}
queueForDisplay();
}
function setDisplay() {
target._x = x;
target._y = y;
}
function getUpdates() {
world.addEvent("update", function (elapsed) {
this.update(elapsed);
}, this);
}
function cancelUpdates() {
world.removeEvent("update", null, this);
}
function timelineUpdate() {
queueForDisplay();
}
function toString() {
return(((className + " #") + uniqueID) + (name ? (("(" + name) + ")") : ""));
}
static var created = 0;
var className = "Node";
var uniqueID = -1;
var x = 0;
var y = 0;
var z = 0;
var isDisplayNode = false;
var angle = 0;
var renderable = true;
static var COLLISION_OK = 1;
static var COLLISION_CANCEL = 2;
static var COLLISION_SKIP_EVENT = 3;
static var collisionID = 0;
var classID = 0;
var collisionMask = 0;
var collisionOverlap = false;
var inScene = false;
var keepInScene = false;
var rogueNode = false;
var affectChildren = true;
var allowChildren = true;
var hasChildren = false;
var stopCol = false;
var editor_isItem = false;
var editor_tool = "CreateObject";
var editor_description = "Description for item";
var editor_name = "Generic Object";
var editor_args_names = [];
var editor_args_values = [];
var editor_args_types = [];
var editor_args_options = [];
var editor_args_descriptions = [];
var editor_args_mode = [];
var editor_args_component = [];
var editor_commands = [];
var editor_canChangeAsset = true;
var editor_canChangeLayer = true;
var editor_canChangeFrame = true;
var editor_nullDefaultsOnSave = true;
var editor_canRotate = false;
var editor_canScale = false;
}
Symbol 923 MovieClip [__Packages.GDK.World] Frame 0
class GDK.World extends GDK.Node
{
var uniqueID, children, objects, displayQueue, activeObjects, references, name, viewport, world, addEvent, removeEvent, engine, target, sendEvent, inScene, addDisplay, onAddToScene, removeChild;
function World (name, viewPort) {
super();
uniqueID = ++worldsCreated;
children = null;
objects = [];
displayQueue = [];
activeObjects = [];
references = {};
this.name = ((name != null) ? (name) : ("World " + uniqueID));
if (viewport) {
addObject(viewport);
} else if (useDefaultCamera) {
addObject((viewport = new GDK.Viewport()));
}
world = this;
}
function addActiveObject(obj) {
if (obj.__a) {
return(undefined);
}
obj.__a = true;
activeObjects.push(obj);
}
function removeActiveObject(obj) {
if ((!obj.__a) || (activeLock)) {
return(undefined);
}
delete obj.__a;
var _local2 = activeObjects.length;
while (_local2-- , _local2 > -1) {
if (activeObjects[_local2] == obj) {
activeObjects.splice(_local2, 1);
return(undefined);
}
}
}
function removeAllActive() {
activeLock = true;
var _local2 = activeObjects.length;
while (_local2-- , _local2 > -1) {
delete activeObjects[_local2].__a;
activeObjects[_local2].removeFromScene();
}
activeObjects.splice(0);
activeLock = false;
}
function addToUpdateList(obj) {
addEvent("update", obj.update, obj);
}
function removeFromUpdateList(obj) {
removeEvent("update", null, obj);
}
function render(elapsed) {
var _local2;
_local2 = displayQueue.length;
if (!_local2) {
return(undefined);
}
while (_local2-- , _local2 > -1) {
displayQueue[_local2].setDisplay(elapsed);
delete displayQueue[_local2].queueForDisplay;
}
displayQueue = [];
updateAfterEvent();
}
function centerViewport(vertical, horizontal) {
viewport.halfWidth = (target._x = ((viewport.screenWidth = engine.width)) * 0.5);
viewport.halfHeight = (target._y = ((viewport.screenHeight = engine.height)) * 0.5);
}
function queueForDisplay(obj) {
if (!obj.queueForDisplay) {
return(undefined);
}
obj.queueForDisplay = null;
displayQueue.push(obj);
}
function update(elapsed) {
sendEvent("update", elapsed);
render(elapsed);
}
function addObject(obj, isolated) {
if (obj.world == this) {
return(false);
}
if (obj.world) {
obj.world.removeObject(obj);
}
obj.world = this;
obj.uniqueID = ++objectsAdded;
if (obj.children.length) {
var _local4 = obj.children.length;
while (_local4-- , _local4 > -1) {
addObject(obj.children[_local4], true);
}
}
if (obj.name != null) {
references[obj.name] = obj;
}
if ((!obj.rogueNode) && (!isolated)) {
super.addChild(obj, true);
}
obj.positionChanged(0, 0, 0);
obj.sendEvent("addToWorld");
return(true);
}
function addToScene() {
if (inScene) {
return(undefined);
}
inScene = true;
addDisplay();
target.swapDepths(uniqueID + 1);
onAddToScene();
if (children) {
var _local2 = children.length;
while (_local2-- , _local2 > -1) {
if (children[_local2].inScene) {
children[_local2].removeFromScene();
children[_local2].addToScene();
}
}
}
}
function removeObject(obj) {
obj.removeFromScene();
removeChild(obj);
if (obj.name != null) {
delete references[obj.name];
}
GDK.Collection.removeFromAll(obj);
removeFromUpdateList(obj);
obj.onRemoveFromWorld();
obj.__proto__ = null;
}
function addChild(obj, isolated) {
super.addChild(obj, true);
}
function timelineUpdate(elapsed) {
render(elapsed);
}
static var worldsCreated = -1;
var assetID = null;
var className = "World";
var useDefaultCamera = true;
var isDisplayNode = true;
var renderable = true;
var affectChildren = false;
var activeLock = false;
var objectsAdded = 0;
}
Symbol 924 MovieClip [__Packages.GDK.Viewport] Frame 0
class GDK.Viewport extends GDK.Node
{
var focusDepth, wTan, hTan;
function Viewport () {
super();
}
function setFieldOfView(angle) {
if (FOV - angle) {
tanFOV = Math.tan(((FOV = angle)) * 0.008726646);
focusDepth = -((wTan = halfWidth / tanFOV));
hTan = halfHeight / tanFOV;
}
}
var screenWidth = 0;
var screenHeight = 0;
var halfWidth = 0;
var halfHeight = 0;
var changed = false;
var className = "Camera";
var renderable = false;
var setDisplay = null;
var FOV = 30;
var tanFOV = 0.577350269189626;
var viewDistance = 100;
var sectorChanged = false;
var assetID = null;
}
Symbol 925 MovieClip [__Packages.CallStack] Frame 0
class CallStack extends Array
{
var push, lastTime, countdowntime, intervalID, onFinish, splice, length;
function CallStack () {
super();
}
static function pauseAll() {
var _local1 = runningStacks.length;
while (_local1-- , _local1 > -1) {
runningStacks[_local1].pause();
}
return(false);
}
static function unpauseAll() {
var _local1 = runningStacks.length;
while (_local1-- , _local1 > -1) {
runningStacks[_local1].unpause();
}
}
static function stopAll() {
var _local1 = runningStacks.length;
while (_local1-- , _local1 > -1) {
runningStacks[_local1].stop();
}
return(false);
}
static function buildCall(target, method) {
var _local2 = arguments.slice(2);
_local2.target = target;
_local2.method = method;
return(_local2);
}
function call(target, method) {
push(buildCall.apply(this, arguments));
}
function wait(seconds) {
call(this, startCountDown, seconds);
}
function startCountDown(seconds) {
lastTime = getTimer() * 0.001;
countdowntime = seconds;
return(countdown);
}
function countdown() {
countdowntime = countdowntime + (lastTime - ((lastTime = getTimer() * 0.001)));
return(countdowntime <= 0);
}
function waitUntilEqual(target, property, targetValue) {
call(target, untilEqual, property, targetValue);
}
function untilEqual(property, targetValue) {
return(this[property] == targetValue);
}
function start() {
if (running) {
return(undefined);
}
running = true;
runningStacks.push(this);
index = 0;
intervalID = setInterval(function (o) {
o.update();
}, updateInterval, this);
}
function stop() {
clearInterval(intervalID);
var _local2 = runningStacks.length;
while (_local2-- , _local2 > -1) {
if (runningStacks[_local2] == this) {
runningStacks.splice(_local2, 1);
}
}
running = false;
return(false);
}
function finish() {
onFinish();
stop();
}
function pause() {
paused = true;
return(false);
}
function resume() {
lastTime = getTimer() * 0.001;
paused = false;
}
function update() {
if (paused) {
return(false);
}
var _local3 = this[index];
var _local2 = _local3.method.apply(_local3.target, _local3);
switch (typeof(_local2)) {
case "function" :
_local3.method = _local2;
break;
case "object" :
if (_local2.className == "CallStack") {
splice(index, 1, buildCall(_local2, _local2.update));
} else if (_local2.length != null) {
splice(index, 1, _local2);
}
break;
default :
if (_local2 || (_local2 == null)) {
if ((++index) > length) {
finish();
return(true);
}
} else {
if (_local2 != STOP_STACK) {
break;
}
stop();
break;
}
}
return(false);
}
function toString() {
return("Call Stack");
}
static var runningStacks = [];
static var STOP_STACK = Number.MAX_VALUE;
var className = "CallStack";
var updateInterval = 0;
var paused = false;
var running = false;
var index = 0;
}
Symbol 926 MovieClip [__Packages.SSGame] Frame 0
class SSGame extends GDK.Base
{
static var classes, target, player;
var addEvent, baseSound, worlds, activeWorld;
function SSGame () {
super();
SSInterface.registerGame(this);
GDK.EventSubscriber.initObject(SSGame);
setTargetComponent(this);
classes = [];
registerClass(SSShape);
registerClass(SSZone);
registerClass(GameSpring);
registerClass(GamePoint);
registerClass(GameHealth);
registerClass(GameCharacter);
registerClass(Explosive);
registerClass(Checkpoint);
registerClass(CommandBox);
registerClass(DirectionArrow);
registerClass(GameElement);
registerClass(Spikes);
registerClass(GameLife);
registerClass(GameVehicle);
registerClass(WalkingObject);
registerClass(FlyingObject);
registerClass(RopeObject);
registerClass(GameContainer);
registerClass(GameBigPoint);
registerClass(GameHealthBig);
registerClass(RollingObject);
registerClass(FlyingObject);
registerClass(BouncingObject);
registerClass(JumpingFish);
registerClass(GameFuel);
registerClass(GameSwing);
registerClass(VR_HiddenPlatform);
registerClass(VR_EMP);
registerClass(VR_Shield);
registerClass(MessageBox);
registerClass(SSDrawStyle);
addEvent("Pause", onGamePause);
addEvent("Resume", onGameResume);
baseSound = new Sound(this);
}
static function setTargetComponent(mc) {
target = mc;
}
static function staticInit() {
processStack.wait(0.1);
}
static function registerClass(cls) {
var _local1 = GDK.Tools.lookupClassName(cls);
if (_local1 == null) {
return(undefined);
}
if (classes[_local1]) {
return(undefined);
}
cls.className = _local1;
classes.push((classes[_local1] = _local1));
}
static function loadConfig(url) {
processStack.wait(0.01);
var _local2 = new XML();
_local2.ignoreWhite = true;
_local2.onLoad = function () {
this.loaded = true;
};
_local2.loaded = false;
processStack.call(SSGame, function (x, url) {
x.load(url);
}, _local2, url);
processStack.call(_local2, function () {
return(this.loaded == true);
});
processStack.call(SSGame, processConfig, _local2);
}
static function processConfig(data) {
if (typeof(data) == "string") {
data = new XML(data);
}
var _local2;
var _local1 = -1;
_local2 = data.firstChild.childNodes;
var _local3 = _local2.length;
while (_local1++ , _local1 < _local3) {
switch (_local2[_local1].nodeName.toLowerCase()) {
case "styles" :
processStyles(_local2[_local1]);
break;
case "bg" :
processBackgrounds(_local2[_local1]);
break;
case "objects" :
processObjects(_local2[_local1]);
}
}
}
static function processBackgrounds(data) {
if (typeof(data) == "string") {
data = new XML(data);
}
var _local13;
var _local16 = data.firstChild;
if (!_local16) {
return(undefined);
}
var _local18;
var _local15;
var _local20;
var _local3;
var _local17;
var _local19;
var _local11;
do {
_local20 = [];
var _local21 = (_global[_local16.attributes.name] = {layers:_local20});
_local18 = _local16.childNodes;
_local15 = _local18.length;
while (_local15-- , _local15 > -1) {
_local3 = _local18[_local15].attributes;
_local17 = _local3.tiles;
if ((!_local17.length) || (!(_local19 = Number(_local3.z)))) {
continue;
}
var _local9 = Number(_local3.w);
var _local12 = Number(_local3.h);
if ((!_local9) || (!_local12)) {
var _local7 = _global.root.attachMovie(_local17, "TMPBGTEST", 987700);
if (!_local7) {
continue;
}
_local9 = _local7._width;
_local12 = _local7._height;
_local7.removeMovieClip();
}
_local11 = new SSBackground(_local17, _local19, _local9, _local12, Number(_local3.scrollMultiplier));
_local20.push(_local11);
_local13 = Number(_local3.offsetX);
if (!isNaN(_local13)) {
_local11.offsetX = _local13;
}
_local13 = Number(_local3.offsetY);
if (!isNaN(_local13)) {
_local11.offsetY = _local13;
}
_local11.stationary = (Number(_local3.stationary) || (_local3.stationary == "true")) || (_local3.stationary == "yes");
var _local14 = _local18[_local15].firstChild.nodeValue;
var _local10 = GDK.Tools.trim;
if (_local14.length > 0) {
var _local4;
var _local6;
var _local2 = _local14.split("|");
_local9 = 0;
var _local5 = _local2.length;
while (_local5-- , _local5 > -1) {
if (!((_local2[_local5] = _local10(_local2[_local5]))).length) {
_local2.splice(_local5, 1);
continue;
}
_local2[_local5] = _local2[_local5].split(",");
_local6 = _local2[_local5];
_local4 = _local6.length;
_local9 = Math.max(_local4, _local9);
while (_local4-- , _local4 > -1) {
_local6[_local4] = parseInt(_local10(_local6[_local4]));
}
}
var _local8 = new GDK.Grid(_local9, _local2.length, (Number(_local3.defaultCell) ? (Number(_local3.defaultCell)) : 0));
_local5 = _local2.length;
while (_local5-- , _local5 > -1) {
_local4 = _local2[_local5].length;
while (_local4-- , _local4 > -1) {
_local8.setCell(_local4, _local5, _local2[_local5][_local4]);
}
}
_local11.setPattern(_local8);
}
}
_local16 = _local16.nextSibling;
} while (_local16);
}
static function processObjects(data) {
if (typeof(data) == "string") {
data = new XML(data);
}
var _local1 = data.firstChild;
if (!_local1) {
return(undefined);
}
var _local3;
do {
_local1 = _local1.nextSibling;
} while (_local1);
}
static function processStyles(data) {
if (typeof(data) == "string") {
data = new XML(data);
}
var _local7 = data.firstChild;
if (!_local7) {
return(undefined);
}
var _local8;
do {
_local8 = _local7.attributes;
if (_local8.name == null) {
} else {
var _local9 = (_global[_local8.name] = function () {
var _local3 = [];
var _local2 = this.__proto__;
while (_local2 = _local2.__proto__ , _local2) {
_local3.push(_local2);
}
var _local4 = _local3.length;
while (_local4-- , _local4 > -1) {
_local3[_local4].constructor.apply(this);
}
});
var _local5 = _local9.prototype;
_local5.__proto__ = _global[_local8.using].prototype;
if (_local5.__proto__ == null) {
_local5.__proto__ = SSDrawStyle.prototype;
}
_local5.className = _local8.name;
_local5.styleXML = _local7;
}
_local7 = _local7.nextSibling;
} while (_local7);
}
static function loadLevel(url) {
var _local3 = -1;
var _local4 = arguments.length;
while (_local3++ , _local3 < _local4) {
var _local2 = new XML();
_local2.ignoreWhite = true;
var lev = new SSLevel();
processStack.call(SSGame, function (data, url) {
data.load(url);
}, _local2, arguments[_local3]);
processStack.waitUntilEqual(_local2, "loaded", true);
processStack.call(lev, lev.readXML, _local2);
processStack.waitUntilEqual(lev, "ready", true);
processStack.call(SSGame, function () {
SSGame.levels.push((SSGame.levels[lev.name] = lev));
}, lev);
}
}
static function processLevel(data) {
var lev = new SSLevel();
if (typeof(data) == "string") {
data = new XML(data);
}
processStack.call(lev, lev.readXML, data);
processStack.waitUntilEqual(lev, "ready", true);
processStack.call(SSGame, function () {
SSGame.levels.push((SSGame.levels[lev.name] = lev));
}, lev);
}
static function processStyle(data) {
}
static function processBackground(data) {
}
static function process() {
if (running) {
return(undefined);
}
running = true;
processStack.onFinish = function () {
SSGame.ready = true;
SSGame.onReady();
};
processStack.start();
delete process;
}
function gotoWorld(name, targetNode, char) {
var _local2 = worlds[name];
if (_local2) {
if (_local2 != activeWorld) {
}
} else {
generateWorld(name, targetNode, char);
}
}
function generateWorld(name, targetNode, char) {
_global.root.levelIntro.show(currentLevel);
var _local4 = levels[String(name)];
_local4.targetNode = targetNode;
_local4.char = char;
_local4.onComplete = function (base, ssw) {
var _local3 = new GameCharacter();
_local3.keepInScene = false;
ssw.addObject((ssw.character = _local3));
ssw.addPlayer(SSGame.player);
if (ssw.references[this.targetNode] != null) {
_local3.setRestorePoint(ssw.references[this.targetNode]);
_local3.restore();
}
base.setActiveWorld(ssw);
SSGame.player.setControl(_local3);
SSInterface.watchObject(SSGame.player, function (obj) {
this.watchProp(SSGame, "currentLevel", function (prop, oldValue, newValue) {
SSInterface.target[prop] = newValue + 1;
return(newValue);
});
this.watchProp(obj, "score", this.textValue);
this.watchProp(obj, "lives", this.textValue);
this.watchProp(obj, "fuel", this.meterValue);
this.watchProp(obj, "shield", this.textValue);
this.watchProp(obj, "health", this.meterValue);
});
GameSound.playMusic(this.music, 0.5, true);
base.start();
SSInterface.hide();
_global.root.levelIntro.hide();
};
_local4.build(this);
}
function addMaterial() {
}
function addShapeStyle() {
}
static function startNewGame() {
player = new GamePlayer();
SSInterface.hide();
currentLevel = 0;
if (Key.isDown(17)) {
if (Key.isDown(50)) {
currentLevel = 1;
} else if (Key.isDown(51)) {
currentLevel = 2;
}
}
target.activeWorld = null;
target.removeAllWorlds();
target.gotoWorld(levels[currentLevel].name, levels[currentLevel].startNode);
}
static function nextLevel() {
if ((++currentLevel) >= levels.length) {
winGame();
target.removeAllWorlds();
return(undefined);
}
_global.root.gotoAndStop("cacheLoad");
var _local2 = target.activeWorld.character;
target.gotoWorld(levels[currentLevel].name, levels[currentLevel].startNode, _local2);
}
static function exitLevel() {
}
static function winGame() {
SSInterface.showScreen("WinGame", true);
}
function onGamePause() {
baseSound.setVolume(0);
GameSound.pause();
}
function onGameResume() {
baseSound.setVolume(100);
GameSound.resume();
}
static var _sinit = staticInit();
static var levels = [];
static var styles = [];
static var backgrounds = [];
static var processStack = new CallStack();
static var running = false;
static var ready = false;
static var currentLevel = 0;
}
Symbol 927 MovieClip [__Packages.SSObject] Frame 0
class SSObject extends GDK.Node
{
var addEvent, velocity, angle, target, frame, z, x, y, world, depth, onDisplay, uniqueID, sectors, inScene, keepInScene, onMove, queueForDisplay, localSounds, sndTransform, getUpdates, motionTime, motionDist, motionVec, motionDir, motionLeft, motionRight, motionTop, motionBottom, collisionData, checkCollisionList, collisionMask, moveBy;
function SSObject () {
super();
addEvent("addDisplay", SSAddDisp, this);
velocity = new Vector();
localTop = (localLeft = -radius);
localBottom = (localRight = radius);
}
function addToScene() {
oz = null;
gdkAddToScene();
}
function removeFromScene() {
oz = null;
gdkRemoveFromScene();
}
function SSAddDisp() {
target._rotation = angle;
target.gotoAndStop(frame);
}
function setDisplay(viewport, elapsed, vdr, vl, vr) {
if ((z - viewport.z) != viewport.wTan) {
var _local5 = (screenX = ((viewport.wTan * (x - viewport.x)) / (z - viewport.z)) + viewport.halfWidth);
var _local4 = (screenY = ((viewport.wTan * (y - viewport.y)) / (z - viewport.z)) + viewport.halfHeight);
} else {
var _local5 = (screenX = (vdr * (viewport.x - x)) + viewport.halfWidth);
var _local4 = (screenY = (vdr * (viewport.y - y)) + viewport.halfHeight);
}
target._x = (-world.target._x) + _local5;
target._y = (-world.target._y) + _local4;
if (oz != ((oz = z - viewport.z))) {
target.swapDepths((depth = calculateDepth()));
target._xscale = (target._yscale = ((viewport.wTan * 1) / (z - viewport.z)) * 100);
}
onDisplay(viewport, elapsed, vdr, vl, vr);
}
function calculateDepth() {
if (z == 0) {
return(((Math.floor(20000 - oz) * 32768) + (depthLayer * 32768)) + uniqueID);
}
if (z < 0) {
return(((Math.floor(20000 - oz) * 32768) + uniqueID) + 524288);
}
return((Math.floor(20000 - oz) * 32768) + uniqueID);
}
function removeFromSectorGrid() {
var _local3;
var _local2;
var _local4 = sectors.length;
while (_local4-- , _local4 > -1) {
_local3 = sectors[_local4];
_local2 = _local3.length;
while (_local2-- , _local2 > -1) {
if (_local3[_local2] == this) {
_local3.splice(_local2, 1);
break;
}
}
}
sectors = [];
}
function addToSectorGrid() {
if (sectors.length > 0) {
removeFromSectorGrid();
}
var _local3 = world.sectors;
var _local6;
var _local2;
var _local4;
_local6 = (rightSector - leftSector) + 1;
var _local5 = _local6 * ((bottomSector - topSector) + 1);
while (_local5-- , _local5 > -1) {
_local2 = leftSector + (_local5 % _local6);
_local4 = topSector + Math.floor(_local5 / _local6);
if (_local3[_local2]) {
if (_local3[_local2][_local4]) {
_local3[_local2][_local4].push(this);
} else {
_local3[_local2][_local4] = [this];
}
} else {
_local3[_local2] = {};
_local3[_local2][_local4] = [this];
}
sectors.push(_local3[_local2][_local4]);
}
}
function updateBounds() {
var _local3 = leftSector != ((leftSector = Math.floor(((left = x + localLeft)) / SSGlobal.GRID_SIZE)));
var _local4 = topSector != ((topSector = Math.floor(((top = y + localTop)) / SSGlobal.GRID_SIZE)));
var _local5 = rightSector != ((rightSector = Math.floor(((right = x + localRight)) / SSGlobal.GRID_SIZE)));
var _local6 = bottomSector != ((bottomSector = Math.floor(((bottom = y + localBottom)) / SSGlobal.GRID_SIZE)));
if (((_local3 || (_local4)) || (_local5)) || (_local6)) {
removeFromSectorGrid();
addToSectorGrid();
var _local2 = world.viewport;
if ((inScene && (!keepInScene)) && ((((_local2.leftSector > rightSector) || (_local2.topSector > bottomSector)) || (_local2.rightSector < leftSector)) || (_local2.bottomSector < topSector))) {
removeFromScene();
}
}
}
function positionChanged(xShift, yShift, zShift) {
world.onObjectMoved(this);
onMove(xShift, yShift, zShift);
if (trackInSectorGrid) {
updateBounds();
}
if (inScene) {
queueForDisplay();
}
}
function createSound(id, linkageID) {
var _local2 = world.createSound(id, linkageID);
if (!localSounds) {
localSounds = [];
}
_local2.id = id;
localSounds[id] = _local2;
localSounds.push(_local2);
return(_local2);
}
function deleteSound(id) {
world.deleteSound(id);
var _local3 = localSounds[id];
var _local2 = localSounds.length;
while (_local2-- , _local2 > -1) {
if (localSounds[_local2] == _local3) {
localSounds.splice(_local2, 1);
break;
}
}
delete localSounds[id];
}
function setupSound(sndObj) {
sndObj.playing = false;
}
function positionSound(sndObj, x, y, bubbleX, bubbleY) {
var _local4 = world.viewport;
var _local3 = Math.max(0, 1 - Math.abs((_local4.y - y) / bubbleY));
if (_local3 == 0) {
sndObj.stop();
sndObj.playing = false;
return(undefined);
}
var _local5 = Math.max(0, 1 - Math.abs((_local4.left - x) / bubbleX));
var _local6 = Math.max(0, 1 - Math.abs((_local4.right - x) / bubbleX));
if ((_local5 == 0) && (_local6 == 0)) {
sndObj.stop();
sndObj.playing = false;
return(undefined);
}
sndTransform.ll = (_local5 * _local3) * 100;
sndTransform.rr = (_local6 * _local3) * 100;
sndObj.setTransform(sndTransform);
if (!sndObj.playing) {
sndObj.start(0, 1048575);
sndObj.playing = true;
}
}
function setVelocity(vel) {
if (!vel.__get__length()) {
return(undefined);
}
velocity = vel;
getUpdates();
inMotion = inMotionTime;
addEvent("removeFromScene", onAutoMotionLeaveScene);
}
function onAutoMotionLeaveScene() {
if (inMotion) {
world.removeObject(this);
}
}
function calculateMotionData(elapsed) {
motionTime = elapsed;
motionDist = ((motionVec = new Vector(velocity.x * elapsed, velocity.y * elapsed, 0))).length;
motionDir = motionVec.getNormalized();
if (motionVec.x > 0) {
motionLeft = left;
motionRight = right + motionVec.x;
} else {
motionLeft = left + motionVec.x;
motionRight = right;
}
if (motionVec.y > 0) {
motionTop = top;
motionBottom = bottom + motionVec.y;
} else {
motionTop = top + motionVec.y;
motionBottom = bottom;
}
}
function checkCollisions(elapsed) {
collisionData = null;
calculateMotionData(elapsed);
var _local2 = SSGlobal.GRID_SIZE;
var _local4 = world.getObjectsInSectors(Math.floor(motionLeft / _local2), Math.floor(motionTop / _local2), Math.floor(motionRight / _local2), Math.floor(motionBottom / _local2));
var _local3 = checkCollisionList(_local4, collisionMask);
if (collisionData) {
shapeCollision(collisionData);
}
return(_local3);
}
function update(elapsed) {
updatePosition(elapsed);
}
function shapeCollision(colData) {
}
function updatePosition(elapsed) {
moveBy(velocity.x * elapsed, velocity.y * elapsed, velocity.z * elapsed);
}
static var ArgTypes = [Function, Number, Number, Number];
static var DefaultArgType = Number;
var assetID = null;
var mapIconID = null;
var left = 0;
var top = 0;
var right = 0;
var bottom = 0;
var localLeft = 0;
var localTop = 0;
var localRight = 0;
var localBottom = 0;
var leftSector = 0;
var topSector = 0;
var rightSector = 0;
var bottomSector = 0;
var trackInSectorGrid = true;
var radius = 25;
var depthLayer = 3;
var autoAddToScene = true;
var gdkAddToScene = GDK.Node.prototype.addToScene;
var gdkRemoveFromScene = GDK.Node.prototype.removeFromScene;
var oz = null;
var screenX = 0;
var screenY = 0;
var inMotion = 0;
var inMotionTime = 0.5;
var stopCol = false;
}
Symbol 928 MovieClip [__Packages.Vector] Frame 0
class Vector
{
function Vector (x, y, z) {
if ((x || (y)) || (z)) {
this.x = (x ? (x) : 0);
this.y = (y ? (y) : 0);
this.z = (z ? (z) : 0);
}
}
function loc(x, y, z) {
this.x = x;
this.y = y;
this.z = z;
}
function copy() {
return(new Vector(x, y, z));
}
function copyTo(a) {
a.x = x;
a.y = y;
a.z = z;
}
function copyFrom(a) {
x = a.x;
y = a.y;
z = a.z;
}
function distanceToVector(a) {
var _local4 = a.x - x;
var _local3 = a.y - y;
var _local2 = a.z - z;
return(Math.sqrt(((_local4 * _local4) + (_local3 * _local3)) + (_local2 * _local2)));
}
function distanceToCoordinates(x, y, z) {
var _local4 = this.x - x;
var _local3 = this.y - y;
var _local2 = this.z - z;
return(Math.sqrt(((_local4 * _local4) + (_local3 * _local3)) + (_local2 * _local2)));
}
function get magnitude() {
return(Math.sqrt(((x * x) + (y * y)) + (z * z)));
}
function get length() {
return(Math.sqrt(((x * x) + (y * y)) + (z * z)));
}
function set length(newLength) {
var _local2 = newLength / Math.sqrt(((x * x) + (y * y)) + (z * z));
x = x * _local2;
y = y * _local2;
z = z * _local2;
//return(length);
}
function dot(v) {
return(((x * v.x) + (y * v.y)) + (z * v.z));
}
function cross(v) {
if (!v) {
v = VECPZ;
}
return(new Vector((y * v.z) - (z * v.y), (z * v.x) - (x * v.z), (x * v.y) - (y * v.x)));
}
function normalize() {
var _local2 = Math.sqrt(((x * x) + (y * y)) + (z * z));
x = x / _local2;
y = y / _local2;
z = z / _local2;
return(this);
}
function getNormalized() {
var _local2 = Math.sqrt(((x * x) + (y * y)) + (z * z));
return(new Vector(x / _local2, y / _local2, z / _local2));
}
function multiply(scalar) {
x = x * scalar;
y = y * scalar;
z = z * scalar;
}
function divide(scalar) {
if (!scalar) {
x = 0;
y = 0;
z = 0;
return(undefined);
}
x = x / scalar;
y = y / scalar;
z = z / scalar;
}
function reverse() {
x = x * -1;
y = y * -1;
z = z * -1;
}
function getReversed() {
return(new Vector(-x, -y, -z));
}
function toString() {
return(((((("Vector(" + x) + ",") + y) + ",") + z) + ")");
}
static var ZERO = new Vector(0, 0, 0);
static var VECPX = new Vector(1, 0, 0);
static var VECNX = new Vector(-1, 0, 0);
static var VECPY = new Vector(0, 1, 0);
static var VECNY = new Vector(0, -1, 0);
static var VECPZ = new Vector(0, 0, 1);
static var VECNZ = new Vector(0, 0, -1);
var x = 0;
var y = 0;
var z = 0;
}
Symbol 929 MovieClip [__Packages.SSGlobal] Frame 0
class SSGlobal
{
function SSGlobal () {
}
static var DRAW_LIGHT_DIRECTION = new Vector(2, 1, 0).normalize();
static var DRAW_VIEW_DIRECTION = new Vector(-1, 2, 0).normalize();
static var EDGE_GROUPING_MASK = 15;
static var GRID_SIZE = 300;
static var CLSID_ZONE = 65536;
static var CLSID_SHAPE = 131072;
static var CLSID_MAINCHAR = 1048576;
static var CLSID_VEHICLE = 1048832;
static var CLSID_CONTAINER = 67108864;
static var CLSID_OBSTACLE = 16777216;
static var CLSID_MOBILEOBJECT = 33554432;
static var CLSID_OBJECT = 4194304;
static var CLSID_EXPLOSIVE = 4194560;
static var CLSID_KILLBOX = CLSID_OBJECT;
static var CLSID_VENT = 4194816;
static var CLSID_SWING = 4195328;
static var CLSID_COLLECTABLE = 8388608;
static var CLSID_POINT = 8388624;
static var CLSID_HEALTH = 8388640;
static var CLSID_FLAG = 8388672;
static var CLSID_SHIELD = 8388736;
static var CLSID_CHECKPOINT = 8388864;
static var EDGE_SYSTEM_PROPS = 65535;
static var EDGE_USER_PROPS = 4294901760;
static var EDGE_DEFAULT = 0;
static var EDGE_OFF = EDGE_DEFAULT;
static var EDGE_COLLISION = 1;
static var EDGE_CAN_STAND = 65537;
static var GRAVITY = 650;
static var editor_DrawStyles = ["DSNoFill", "DSGeneric"];
static var editor_EdgeDrawStyles = [];
static var ED_OBJ_DELIMETER = "#";
static var ED_OBJ_ATTR_DELIM = "|";
}
Symbol 930 MovieClip [__Packages.SSShape] Frame 0
class SSShape extends SSObject
{
var style, points, drawStyle, world, leftSector, left, localLeft, x, topSector, top, localTop, y, rightSector, right, localRight, bottomSector, bottom, localBottom, removeFromSectorGrid, addToSectorGrid, colEdges, edges, depth, calculateDepth, inScene, removeDisplay, addDisplay, target, normals, instances, shapeObj, props;
function SSShape (style) {
super();
if (isInstance || (arguments.length < 1)) {
return;
}
this.style = (((style != null) && (typeof(style) != "string")) ? (style) : (SSDrawStyle));
var _local5 = arguments.slice(1);
points = [];
var _local4 = _local5.length;
while (_local4-- , _local4 > -1) {
_local4--;
_local4--;
points.push(new SSShapeVertex(_local5[_local4], _local5[_local4], _local5[_local4 + 3]));
}
points[0].props = _local5[2];
points.reverse();
build();
}
function onAddToWorld() {
if (drawStyle.store) {
world.addToCollection(drawStyle.className, this);
}
}
function updateBounds() {
var _local2 = leftSector != ((leftSector = Math.floor(((left = x + localLeft)) / SSGlobal.GRID_SIZE)));
var _local3 = topSector != ((topSector = Math.floor(((top = y + localTop)) / SSGlobal.GRID_SIZE)));
var _local4 = rightSector != ((rightSector = Math.floor(((right = x + localRight)) / SSGlobal.GRID_SIZE)));
var _local5 = bottomSector != ((bottomSector = Math.floor(((bottom = y + localBottom)) / SSGlobal.GRID_SIZE)));
if (((_local2 || (_local3)) || (_local4)) || (_local5)) {
removeFromSectorGrid();
addToSectorGrid();
}
}
function build() {
var _local9 = points.length - 1;
var _local2;
var _local3;
var _local4;
var _local8;
var _local6;
var _local7;
var _local5;
_local6 = points[_local9].x;
_local8 = _local6;
_local5 = points[_local9].y;
_local7 = _local5;
colEdges = [];
edges = [];
edges[_local9] = new SSShapeEdge(points[_local9], points[0]);
while (_local9-- , _local9 > -1) {
edges[_local9] = new SSShapeEdge(points[_local9], points[_local9 + 1]);
points[_local9].index = _local9;
edges[_local9].next = edges[_local9 + 1];
edges[_local9 + 1].previous = edges[_local9];
_local8 = Math.min(points[_local9].x, _local8);
_local6 = Math.max(points[_local9].x, _local6);
_local7 = Math.min(points[_local9].y, _local7);
_local5 = Math.max(points[_local9].y, _local5);
}
_local9 = edges.length - 1;
edges[_local9].next = edges[0];
edges[0].previous = edges[_local9];
localLeft = _local8;
localRight = _local6;
localTop = _local7;
localBottom = _local5;
_local9 = edges.length;
while (_local9-- , _local9 > -1) {
_local2 = edges[_local9];
_local3 = _local2.a;
_local4 = _local2.b;
_local2.shape = this;
_local2.center = new Vector(_local3.x + ((_local4.x - _local3.x) * 0.5), _local3.y + ((_local4.y - _local3.y) * 0.5));
_local2.radius = 0.5 * ((_local2.length = ((_local2.span = new Vector(_local4.x - _local3.x, _local4.y - _local3.y))).length));
if (_local3.x > _local4.x) {
_local2.left = _local4.x;
_local2.right = _local3.x;
} else {
_local2.left = _local3.x;
_local2.right = _local4.x;
}
if (_local3.y > _local4.y) {
_local2.top = _local4.y;
_local2.bottom = _local3.y;
} else {
_local2.top = _local3.y;
_local2.bottom = _local4.y;
}
_local2.direction = _local2.span.getNormalized();
_local2.normal = _local2.direction.cross();
_local2.angle = (Math.atan2(_local2.direction.y, _local2.direction.x) * 180) / Math.PI;
_local2.props = _local3.props;
if (_local2.props & 1) {
colEdges.push(_local2);
}
}
_local9 = edges.length;
while (_local9-- , _local9 > -1) {
_local2 = edges[_local9];
((_local2.a.normal = new Vector(_local2.previous.normal.x + _local2.normal.x, _local2.previous.normal.y + _local2.normal.y))).normalize();
_local2.a.scale = 1 / _local2.a.normal.dot(_local2.normal);
}
((drawStyle = new this.style())).init(points, edges);
if (depthLayer != drawStyle.depthLayer) {
depthLayer = drawStyle.depthLayer;
depth = calculateDepth();
}
if (inScene) {
redraw();
}
}
function redraw() {
removeDisplay();
addDisplay();
}
function onAddDisplay() {
target._visible = !disabled;
if (drawStyle.depthLayer != null) {
depthLayer = Number(drawStyle.depthLayer);
target.swapDepths(calculateDepth());
}
drawStyle.draw(target);
}
function editor_onInit(obj) {
normals = [];
instances = [];
points = [];
var _local4 = obj.props.slice(obj.propNames.length);
obj.propOptions[10] = _global.__drawStyles;
var _local3 = _local4.length;
while (_local3-- , _local3 > -1) {
_local3--;
_local3--;
points.push(new Vector(Number(_local4[_local3]), Number(_local4[_local3]), Number(_local4[_local3])));
}
}
function editor_onDisplay(target, external) {
target.drawClip.removeMovieClip();
var _local4 = target.createEmptyMovieClip("drawClip", 0);
var _local6 = SSShape;
var _local5 = (shapeObj = {});
_local5.__proto__ = _local6.prototype;
_local6.apply(_local5, [_global[props[10]]].concat(props.slice(11)));
_local5.drawStyle.showInfo();
_local5.drawStyle.draw(_local4);
_local4 = target.createEmptyMovieClip("shape", 1);
_local4.beginFill(13421806, 0);
var _local3 = points.length;
_local4.moveTo(points[0].x, points[0].y);
while (_local3-- , _local3 > -1) {
_local4.lineTo(points[_local3].x, points[_local3].y);
}
_local4.endFill();
}
function editor_onSelect() {
}
var isInstance = false;
var disabled = false;
var assetID = null;
var depthLayer = 2;
var className = "Shape";
var setShape = Object.prototype.constructor;
var classID = SSGlobal.CLSID_SHAPE;
var editor_name = "Shape";
var editor_isItem = true;
var editor_tool = "CreateShape";
var editor_args_names = ["style"];
var editor_args_values = ["DSGeneric"];
var editor_args_types = ["string"];
var editor_args_options = [["DSGeneric"]];
var editor_args_descriptions = [];
var editor_args_mode = [0];
var editor_args_component = ["List"];
var editor_commands = ["Reverse"];
var editor_canChangeAsset = false;
var editor_canChangeFrame = false;
var editor_canChangeName = false;
var editor_nullDefaultsOnSave = false;
}
Symbol 931 MovieClip [__Packages.SSDrawing] Frame 0
class SSDrawing
{
var lightDirection, inst, iLayers, setup, define, defineFromXML, prepare, points, edges, __proto__, groups, pickStyle, root, target;
function SSDrawing (obj) {
if (!lightDirection) {
lightDirection = SSGlobal.DRAW_LIGHT_DIRECTION;
}
inst = [];
iLayers = [];
}
function initStyle(force) {
if (!styles[className]) {
setup();
define();
defineFromXML();
prepare();
styles[className] = this;
}
}
function init(points, edges) {
this.points = points;
this.edges = edges;
__proto__.initStyle();
var _local5;
var _local4;
groups = [];
var _local2 = -1;
var _local6 = edges.length;
while (_local2++ , _local2 < _local6) {
_local4 = edges[_local2].props & edgeGroupMask;
if (_local4 != _local4) {
_local5 = [edges[_local2]];
groups.push(_local5);
_local5.mask = _local4;
} else {
_local5.push(edges[_local2]);
}
edges[_local2].attributes = pickStyle(_local4);
}
if (((groups.length > 1) && (_local5 != edges[0])) && (_local4 == (edges[0].props & edgeGroupMask))) {
groups[0] = groups.pop().concat(groups[0]);
groups[0].mask = _local4;
}
process();
}
function process() {
showInfo();
}
function calculateLighting(normal, ambient, diffuse, specular) {
var _local3;
_local3 = Math.sin(lightDirection.dot(normal) * 1.570796);
if (_local3 <= 0) {
return(new RGB(diffuse.r - ((specular.r - diffuse.r) * _local3), diffuse.g - ((specular.g - diffuse.g) * _local3), diffuse.b - ((specular.b - diffuse.b) * _local3)));
}
return(new RGB(diffuse.r + ((ambient.r - diffuse.r) * _local3), diffuse.g + ((ambient.g - diffuse.g) * _local3), diffuse.b + ((ambient.b - diffuse.b) * _local3)));
}
function draw(root) {
this.root = (target = root);
target.clear();
created = 0;
var _local3 = inst;
var _local2 = -1;
var _local4 = _local3.length;
while (_local2++ , _local2 < _local4) {
_local3[_local2][0].apply(this, _local3[_local2][1]);
}
}
function instruction(method) {
inst.push([method, arguments.slice(1)]);
}
function solidShape(color) {
inst.push([_solid, arguments]);
}
function bitmapShape(textureID, p) {
var _local9 = _global.root.attachMovie(textureID, "tmp", 834201);
var _local12 = _local9._width;
var _local11 = _local9._height;
_local9.removeMovieClip();
var _local3 = p.length;
var _local6;
var _local5;
var _local8;
var _local7;
_local8 = p[0].x;
_local6 = _local8;
_local7 = p[0].y;
_local5 = _local7;
while (_local3-- , _local3 > 0) {
_local6 = Math.min(p[_local3].x, _local6);
_local5 = Math.min(p[_local3].y, _local5);
_local8 = Math.max(p[_local3].x, _local8);
_local7 = Math.max(p[_local3].y, _local7);
}
var _local10 = Math.ceil((_local8 - _local6) / _local12);
var _local13 = Math.ceil((_local7 - _local5) / _local11);
inst.push([_bitmapShape, [textureID, p, _local6, _local5, _local12, _local11, _local10, _local10 * _local13]]);
}
function gradientShape() {
inst.push([_gradient, arguments]);
}
function assetStrip(linkageID, from, to, tile, skewOnX, skewOnY) {
if (((linkageID == null) || (from == null)) || (to == null)) {
return(undefined);
}
var _local3 = new Vector(to.x - from.x, to.y - from.y, 0);
if (skewOnX == null) {
skewOnX = true;
}
if (skewOnY == null) {
skewOnY = true;
}
var _local4 = (Math.atan2(_local3.y, _local3.x) * 180) / Math.PI;
inst.push([_assetStrip, [linkageID, from.x, from.y, _local3.length, tile, (skewOnX ? (_local4) : 0), (skewOnY ? (_local4) : 0)]]);
}
function textureStrip(linkageID, from, to, tile, skewX) {
if (((linkageID == null) || (from == null)) || (to == null)) {
return(undefined);
}
var _local3 = new Vector(to.x - from.x, to.y - from.y, 0);
inst.push([_assetStrip, [linkageID, from.x, from.y, _local3.length, tile, (skewX ? (skewX) : 0), (Math.atan2(_local3.y, _local3.x) * 180) / Math.PI]]);
}
function transform() {
if (arguments.length) {
inst.push([_transform, arguments]);
}
}
function _transform(x, y, rot) {
target._x = x;
target._y = y;
target._rotation = rot;
}
function _assetStrip(linkageID, x, y, len, tile, skewX, skewY) {
var _local13;
var _local8 = skewX != skewY;
if (_local8) {
var _local4 = MovieClipSkew.create(target, null, "mc" + created, ++created);
_local4.skew(skewX, skewY);
} else {
var _local4 = target.createEmptyMovieClip("mc" + created, ++created);
_local4._rotation = skewX;
}
_local4._x = x;
_local4._y = y;
var _local3 = _local4.attachMovie(linkageID, "m0", 0);
var _local5 = _local3._width;
var _local7 = 1;
if (tile) {
_local7 = Math.max(1, Math.round(len / _local5));
var _local2 = _local7;
while (_local2-- , _local2) {
_local3 = _local4.attachMovie(linkageID, "m" + _local2, _local2);
_local3._x = _local2 * _local5;
}
}
if (_local8) {
_local4.asset._xscale = ((len / (tile ? (_local7 * _local5) : (_local5))) * 100) + 1;
} else {
_local4._xscale = (len / (tile ? (_local7 * _local5) : (_local5))) * 100;
}
}
function createTarget(targetName, depth, linkageID) {
if (linkageID != null) {
inst.push([((linkageID == null) ? (_createEmptyTarget) : (_createAssetTarget)), arguments]);
}
}
function setTarget(targetName) {
inst.push([_setTarget, arguments]);
}
function setLayer(layerNum) {
if (iLayers[layerNum]) {
goRootTarget("mc" + layerNum);
} else {
inst.push([_setLayer, arguments]);
iLayers[layerNum] = true;
}
}
function _setLayer(num) {
target = root.createEmptyMovieClip("mc" + num, num);
}
function goRoot() {
inst.push([_goRoot, arguments]);
}
function goRootTarget() {
inst.push([_goRootTarget, arguments]);
}
function attachAndPlaceMovie() {
inst.push([_attachAndPlaceMC, arguments]);
}
function showInfo() {
inst.push([_showInfo]);
}
function _solid(color, p) {
var _local5 = target;
_local5.beginFill(color);
var _local3;
if (arguments.length > 2) {
var _local6 = arguments.length;
while (_local6-- , _local6) {
p = arguments[_local6];
_local3 = p.length;
_local5.moveTo(p[0].x, p[0].y);
while (_local3-- , _local3 > -1) {
_local5.lineTo(p[_local3].x, p[_local3].y);
}
}
} else {
_local3 = p.length;
_local5.moveTo(p[0].x, p[0].y);
while (_local3-- , _local3 > -1) {
_local5.lineTo(p[_local3].x, p[_local3].y);
}
}
_local5.endFill();
}
function _gradient(type, colors, alphas, ratios, matrix, p) {
var _local4 = target;
_local4.beginGradientFill(type, colors, alphas, ratios, matrix);
var _local2 = p.length;
_local4.moveTo(p[0].x, p[0].y);
while (_local2-- , _local2 > -1) {
_local4.lineTo(p[_local2].x, p[_local2].y);
}
_local4.endFill();
}
function _bitmapShape(tileID, p, l, t, w, h, tw, i) {
var _local3;
var _local7 = target.createEmptyMovieClip("_T" + created, ++created);
_local7._x = l;
_local7._y = t;
while (i-- , i > -1) {
_local3 = _local7.attachMovie(tileID, "m" + i, i);
_local3._x = (i % tw) * w;
_local3._y = Math.floor(i / tw) * h;
}
var _local6 = target.createEmptyMovieClip("_F" + created, ++created);
_local6.beginFill(0);
i = p.length;
_local6.moveTo(p[0].x, p[0].y);
while (i-- , i) {
_local6.lineTo(p[i].x, p[i].y);
}
_local6.endFill();
_local7.setMask(_local6);
}
function _createEmptyTarget(name, depth) {
if (name == null) {
name = "CLIP" + created;
} else if (target[name]) {
return(undefined);
}
target.createEmptyMovieClip(name, (depth ? (depth) : (created)));
created++;
}
function _createAssetTarget(name, depth, linkageID) {
if (name == null) {
name = "CLIP" + created;
} else if (target[name]) {
return(undefined);
}
target.attachMovie(linkageID, name, (depth ? (depth) : (created)));
created++;
}
function _createTarget(name, depth, linkageID) {
if (target[name]) {
return(undefined);
}
if (name == null) {
name = "mc" + created;
}
if (linkageID != null) {
target.attachMovie(linkageID, name, (depth ? (depth) : (created)));
} else {
target.createEmptyMovieClip(name, (depth ? (depth) : (created)));
}
created++;
}
function _setTarget(name) {
target = target[name];
}
function _goRoot() {
target = root;
}
function _goRootTarget(name) {
target = root[name];
}
function _attachAndPlaceMC(assetID, depth, x, y) {
var _local2 = target.attachMovie(assetID, (assetID + "_") + depth, depth);
_local2._x = x;
_local2._y = y;
}
function _showInfo() {
var _local4 = edges.length;
if (target != root) {
target = root;
}
var _local3 = target.createEmptyMovieClip("info", 65535);
var _local2;
while (_local4-- , _local4 > -1) {
_local2 = edges[_local4];
_local3.lineStyle(0, (((_local2.props & 1) != 0) ? 16711680 : 13421772));
_local3.moveTo(_local2.a.x + _local2.span.x, _local2.a.y + _local2.span.y);
_local3.lineTo(_local2.a.x, _local2.a.y);
_local3.lineStyle(3, 255);
_local3.moveTo(_local2.a.x + (_local2.span.x * 0.5), _local2.a.y + (_local2.span.y * 0.5));
_local3.lineTo((_local2.a.x + (_local2.span.x * 0.5)) + (_local2.normal.x * 30), (_local2.a.y + (_local2.span.y * 0.5)) + (_local2.normal.y * 30));
_local3.lineStyle(3, 65280);
_local3.moveTo(_local2.a.x, _local2.a.y);
_local3.lineTo(_local2.a.x + (_local2.a.normal.x * 30), _local2.a.y + (_local2.a.normal.y * 30));
}
}
function toString() {
return("DrawStyle " + className);
}
static var GRADIENT_ALPHAS = [100, 100];
static var GRADIENT_RATIOS = [0, 255];
static var styles = {};
var edgeGroupMask = SSGlobal.EDGE_GROUPING_MASK;
var created = 0;
var stylePrepared = false;
var className = "SSDrawStyle";
}
Symbol 932 MovieClip [__Packages.RGB] Frame 0
class RGB extends Number
{
function RGB (r, g, b) {
super();
switch (arguments.length) {
case 3 :
this.r = r;
this.g = g;
this.b = b;
break;
case 0 :
break;
case 1 :
hex(r);
}
}
function hex(i) {
r = i >>> 16;
g = (i - (r << 16)) >>> 8;
b = i % 256;
}
function toHex() {
var _local4 = ((r << 16) + (g << 8)) + b;
var _local5 = "";
var _local3 = 20;
while (_local3 > -1) {
var _local2 = _local4 >>> _local3;
_local5 = _local5 + ((_local2 > 9) ? (chr(55 + _local2)) : (_local2));
_local4 = _local4 - (_local2 << _local3);
_local3 = _local3 - 4;
}
return("0x" + _local5);
}
function addChannel(ir, ig, ib) {
r = r + ir;
g = g + ig;
b = b + ib;
}
function subChannel(ir, ig, ib) {
r = r - ir;
g = g - ig;
b = b - ib;
}
function addColor(v) {
r = r + v.r;
g = g + v.g;
b = b + v.b;
}
function subColor(v) {
r = r - v.r;
g = g - v.g;
b = b - v.b;
}
function valueOf() {
return(((r << 16) + (g << 8)) + b);
}
function toString() {
return(((((("RGB(" + r) + ",") + g) + ",") + b) + ")");
}
var r = 0;
var g = 0;
var b = 0;
}
Symbol 933 MovieClip [__Packages.MovieClipSkew] Frame 0
class MovieClipSkew extends MovieClip
{
var __get___xskew, __get___yskew, skewClip, asset;
function MovieClipSkew () {
super();
}
static function create(parent, linkageID, newName, depth) {
var _local1 = parent.createEmptyMovieClip(newName, depth);
var _local2 = _local1.createEmptyMovieClip("skewClip", 0);
if (linkageID == null) {
_local2 = _local2.createEmptyMovieClip("asset", 0);
} else {
_local2 = _local2.attachMovie(linkageID, "asset", 0);
}
_local2._rotation = -45;
_local1.__proto__ = MovieClipSkew.prototype;
_local1.asset = _local2;
_local1.skew(0, 0);
return(_local1);
}
function set _xskew(v) {
skew(v, __yskew);
//return(__get___xskew());
}
function get _xkew() {
return(__xskew);
}
function set _yskew(v) {
skew(__xskew, v);
//return(__get___yskew());
}
function get _ykew() {
return(__yskew);
}
function skew(x, y) {
var _local3 = x * 0.0174532925199433 /* Math.PI/180 */;
var _local2 = y * 0.0174532925199433 /* Math.PI/180 */;
var _local4 = (skewClip._rotation = ((((__xskew = x)) + ((__yskew = y))) / 2) + 45);
skewClip._xscale = ((100 * (Math.cos(_local3) + Math.sin(_local2))) / Math.sin(_local4 * 0.0174532925199433 /* Math.PI/180 */)) * 0.7071;
skewClip._yscale = ((100 * (Math.sin(_local3) + Math.cos(_local2))) / Math.sin(_local4 * 0.0174532925199433 /* Math.PI/180 */)) * 0.7071;
}
function attachMovie() {
return(asset.attachMovie.apply(asset, arguments));
}
var __xskew = 0;
var __yskew = 0;
}
Symbol 934 MovieClip [__Packages.SSDrawStyle] Frame 0
class SSDrawStyle extends SSDrawing
{
var viewSlope, surfaceEdge, wallEdge, emptyEdge, styleXML, lightDirection, viewAngle, points, groups, setLayer, fillTexture, bitmapShape, fillColor, solidShape, transform, calculateLighting, assetStrip, inst;
function SSDrawStyle () {
super();
}
function setup() {
viewSlope = SSGlobal.DRAW_VIEW_DIRECTION;
surfaceEdge = new SSMaterial();
wallEdge = new SSMaterial();
emptyEdge = new SSMaterial();
}
function define() {
}
function applyNodeToObject(obj, node) {
var _local3 = node.attributes;
var _local1;
var _local4;
for (var _local5 in _local3) {
_local4 = obj.types[_local5];
if (_local4 == null) {
_local4 = obj.defaultType;
}
switch (_local4) {
case "hex" :
_local1 = GDK.Tools.hexToNumber(_local3[_local5]);
if (!isNaN(_local1)) {
obj[_local5] = _local1;
}
break;
case "number" :
_local1 = Number(_local3[_local5]);
if (!isNaN(_local1)) {
obj[_local5] = _local1;
}
break;
case "string" :
_local1 = _local3[_local5];
if (_local1.length > 0) {
obj[_local5] = _local1;
}
break;
case "vector" :
_local1 = _local3[_local5].split(",");
_local1 = new Vector(Number(_local1[0]), Number(_local1[1]), Number(_local1[2]));
if (_local1.length == Number.NaN) {
break;
}
obj[_local5] = _local1;
}
}
}
function defineFromXML() {
if (styleXML == null) {
return(undefined);
}
applyNodeToObject(this, styleXML);
var _local4;
var _local2;
var _local5;
_local5 = styleXML.childNodes;
var _local3 = _local5.length;
while (_local3-- , _local3 > -1) {
_local2 = _local5[_local3];
_local4 = this[_local2.nodeName + "Edge"];
if (!_local4) {
continue;
}
applyNodeToObject(_local4, _local2);
}
delete styleXML;
}
function prepare() {
viewSlope.normalize();
lightDirection.normalize();
surfaceEdge.prepare();
wallEdge.prepare();
emptyEdge.prepare();
}
function process() {
capEnd = ((viewSlope.x < 0) ? (((viewSlope == 0) ? 0 : -1)) : 1);
viewAngle = Math.atan2(-viewSlope.x, viewSlope.y) * 57.2957795;
mainFill(points);
var _local2 = groups.length;
while (_local2-- , _local2 > -1) {
groupFill(groups[_local2], groups[_local2].mask);
}
}
function mainFill(points) {
setLayer(mainFillLayer);
if (fillTexture != null) {
bitmapShape(fillTexture, points);
} else if (fillColor != null) {
setLayer(mainFillLayer);
solidShape(fillColor, points);
}
transform(offsetX, offsetY);
}
function pickStyle(mask) {
if (mask & 1) {
if (mask & 2) {
return(surfaceEdge);
}
return(wallEdge);
}
return(emptyEdge);
}
function createSegment(point, normal, edge, material, scale) {
if (scale == null) {
scale = 1;
}
var _local7 = viewSlope.x;
var _local6 = viewSlope.y;
var _local3 = point;
var _local8 = ((material.rearDepth > 0) ? (new Vector(_local3.x - (material.rearDepth * _local7), _local3.y - (material.rearDepth * _local6), 0)) : (_local3));
var _local9 = ((material.frontDepth > 0) ? (new Vector(_local3.x + (material.frontDepth * _local7), _local3.y + (material.frontDepth * _local6), 0)) : (_local3));
var _local11 = normal.dot(edge.normal);
if (material.thickness > 0) {
var _local13 = material.thickness;
var _local5 = _local13 / _local11;
var _local10 = new Vector((_local9.x - (normal.x * _local5)) + (material.sideExtrude * _local7), (_local9.y - (normal.y * _local5)) + (material.sideExtrude * _local6), 0);
var _local15 = new Vector((_local8.x - (normal.x * _local5)) - (material.sideExtrude * _local7), (_local8.y - (normal.y * _local5)) - (material.sideExtrude * _local6), 0);
var _local16 = new Vector(_local3.x - (normal.x * _local5), _local3.y - (normal.y * _local5), 0);
} else {
var _local10 = _local9;
var _local15 = _local8;
}
var _local14 = (material.bottomDepth ? (new Vector(_local10.x - (material.bottomDepth * _local7), _local10.y - (material.bottomDepth * _local6), 0)) : (_local10));
var _local12 = [_local8, _local3, _local9, _local10, _local14, _local16, _local15];
((_local12.normal = new Vector(normal.x * _local11, normal.y * _local11, 0))).normalize();
return(_local12);
}
function groupFill(edges, mask) {
var _local3 = edges[0].attributes;
if (_local3 == null) {
return(undefined);
}
var _local17 = new SSDrawing();
var _local34 = new SSDrawing();
var _local35 = new SSDrawing();
var _local38 = new SSDrawing();
var _local40 = edges[0].previous == edges[edges.length];
var _local18 = edges.length;
var _local24 = [];
var _local2;
var _local4;
var _local7 = _local3.ambientColor;
var _local6 = _local3.diffuseColor;
var _local8 = _local3.specularColor;
if (_local40) {
_local24[_local18] = (_local24[0] = createSegment(edges[0].a, edges[0].a.normal, edges[0], _local3));
} else {
switch (_local3.endAlign) {
case 0 :
default :
_local2 = (_local24[0] = createSegment(edges[0].a, edges[0].normal, edges[0], _local3));
_local4 = (_local24[_local18] = createSegment(edges[_local18 - 1].b, edges[_local18 - 1].normal, edges[_local18 - 1], _local3));
// unexpected jump
case 1 :
_local2 = (_local24[0] = createSegment(edges[0].a, edges[0].a.normal, edges[0], _local3));
_local4 = (_local24[_local18] = createSegment(edges[_local18 - 1].b, edges[_local18 - 1].b.normal, edges[_local18 - 1], _local3));
// unexpected jump
case 2 :
}
_local2 = (_local24[0] = createSegment(edges[0].a, edges[0].previous.direction, edges[0], _local3));
_local4 = (_local24[_local18] = createSegment(edges[_local18 - 1].b, edges[_local18 - 1].next.direction, edges[_local18 - 1], _local3));
if (_local3.capSurface && (_local3.thickness > 0)) {
var _local16 = _local2.normal.cross(Vector.VECNZ);
if (viewSlope.dot(_local16) < 0) {
var _local11 = calculateLighting(_local16, _local7, _local6, _local8).valueOf();
_local17.solidShape(_local11, [_local2[1], _local2[2], _local2[3], _local2[5]]);
_local34.solidShape(_local11, [_local2[0], _local2[1], _local2[5], _local2[6]]);
}
_local16 = _local4.normal.cross(Vector.VECNZ);
if (viewSlope.dot(_local16) < 0) {
var _local11 = calculateLighting(_local16, _local7, _local6, _local8).valueOf();
_local17.solidShape(_local11, [_local4[1], _local4[2], _local4[3], _local4[5]]);
_local34.solidShape(_local11, [_local4[0], _local4[1], _local4[5], _local4[6]]);
}
}
}
while (_local18-- , _local18) {
_local24[_local18] = createSegment(edges[_local18].a, edges[_local18].a.normal, edges[_local18], _local3);
}
var _local36 = (SSMaterial.TEXTURES_ENABLED ? (_local3.surfaceTexture) : null);
var _local43 = _local3.surfaceTextureMode;
var _local19 = _local3.sideExtrude;
var _local20 = _local3.smoothing;
var _local42 = 1 - _local20;
var _local41 = viewSlope.x * 180;
var _local28 = _local3.ratios;
var _local25 = _local3.alphas;
var _local39 = _local3.frontDepth + _local3.rearDepth;
var _local37;
_local18 = edges.length;
_local4 = _local24[_local18];
var _local5;
var _local21;
var _local26 = edges[_local18 - 1].b;
var _local13;
var _local22;
var _local27 = _local4.normal;
var _local32;
var _local10;
var _local14;
if (!_local19) {
_local14 = calculateLighting(Vector.VECPZ, _local7, _local6, _local8).valueOf();
}
while (_local18-- , _local18 > -1) {
_local21 = edges[_local18].a;
_local2 = _local24[_local18];
_local5 = edges[_local18];
_local13 = _local5.normal;
_local22 = _local2.normal;
_local37 = viewSlope.dot(_local5.normal) < 0;
if (_local37 && (_local39 > 0)) {
if (_local36 != null) {
_local17.textureStrip(_local36, _local2[_local3.surfaceTexturePoint], _local4[_local3.surfaceTexturePoint], _local3.surfaceTextureMode, viewAngle);
} else if (_local20 != 0) {
if (_local20 == 1) {
var _local11 = calculateLighting(_local22, _local7, _local6, _local8).valueOf();
_local10 = calculateLighting(_local27, _local7, _local6, _local8).valueOf();
} else {
var _local11 = calculateLighting(smoothNormal(_local13, _local22, _local20), _local7, _local6, _local8).valueOf();
_local10 = calculateLighting(smoothNormal(_local13, _local27, _local20), _local7, _local6, _local8).valueOf();
}
switch (_local3.smoothingQuality) {
case 0 :
default :
_local32 = [_local11, _local10];
// unexpected jump
case 1 :
_local32 = [_local11, calculateLighting(_local13, _local7, _local6, _local8).valueOf(), _local10];
// unexpected jump
case 2 :
}
var _local23 = calculateLighting(_local13, _local7, _local6, _local8).valueOf();
_local32 = [_local11, _local23, _local23, _local10];
var _local15 = _local5.length;
var _local33 = new GradientMatrix(_local5.center.x, _local5.center.y, _local15, _local15, (viewSlope.x * _local15) * 0.5, 0);
_local17.gradientShape("linear", _local32, _local25, _local28, _local33, [_local2[1], _local2[2], _local4[2], _local4[1]]);
_local34.gradientShape("linear", _local32, _local25, _local28, _local33, [_local2[0], _local2[1], _local4[1], _local4[0]]);
} else {
var _local29 = calculateLighting(_local13, _local7, _local6, _local8).valueOf();
_local17.solidShape(_local29, [_local2[1], _local2[2], _local4[2], _local4[1]]);
_local34.solidShape(_local29, [_local2[0], _local2[1], _local4[1], _local4[0]]);
}
} else if ((!_local37) && (_local3.bottomDepth)) {
var _local29 = calculateLighting(_local13.getReversed(), _local7, _local6, _local8).valueOf();
_local38.solidShape(_local29, [_local2[3], _local2[4], _local4[4], _local4[3]]);
}
if (_local19 && (_local3.thickness > 0)) {
var _local12 = _local3.thickness;
var _local16 = new Vector((-_local5.normal.x) * _local12, (-_local5.normal.y) * _local12, -_local19).cross(_local5.direction);
_local16.normalize();
_local14 = calculateLighting(_local16, _local7, _local6, _local8).valueOf();
if (_local3.sideSmoothing) {
var _local31;
var _local30;
_local31 = new Vector((-_local21.normal.x) * _local12, (-_local21.normal.y) * _local12, -_local19).cross(_local5.direction);
_local31.normalize();
_local30 = new Vector((-_local26.normal.x) * _local12, (-_local26.normal.y) * _local12, -_local19).cross(_local5.direction);
_local30.normalize();
var _local11 = calculateLighting(smoothNormal(_local16, _local31, _local3.sideSmoothing), _local7, _local6, _local8).valueOf();
_local10 = calculateLighting(smoothNormal(_local16, _local30, _local3.sideSmoothing), _local7, _local6, _local8).valueOf();
var _local33 = new GradientMatrix((_local2[2].x + _local4[3].x) / 2, (_local2[2].y + _local4[3].y) / 2, _local5.length, _local5.length, (viewSlope.x * _local15) * 0.5, 0);
switch (_local3.smoothingQuality) {
case 0 :
default :
_local32 = [_local11, _local10];
// unexpected jump
case 1 :
_local32 = [_local11, _local14, _local10];
// unexpected jump
case 2 :
}
_local32 = [_local11, _local14, _local14, _local10];
_local17.gradientShape("linear", _local32, _local25, _local28, _local33, [_local2[2], _local2[3], _local4[3], _local4[2]]);
} else {
_local35.solidShape(_local14, [_local2[2], _local2[3], _local4[3], _local4[2]]);
}
} else {
_local35.solidShape(_local14, [_local2[2], _local2[3], _local4[3], _local4[2]]);
}
if (_local3.sideTexture != null) {
setLayer(_local3.sideTextureLayer);
assetStrip(_local3.sideTexture, _local2[_local3.sideTexturePoint], _local4[_local3.sideTexturePoint], _local3.sideTextureMode, _local3.sideTextureAlign, true);
}
_local26 = _local21;
_local27 = _local22;
_local4 = _local2;
}
setLayer(_local3.bottomSurfaceLayer);
inst.push.apply(inst, _local38.inst);
setLayer(_local3.frontSurfaceLayer);
inst.push.apply(inst, _local17.inst);
setLayer(_local3.sideSurfaceLayer);
inst.push.apply(inst, _local35.inst);
setLayer(_local3.rearSurfaceLayer);
inst.push.apply(inst, _local34.inst);
}
function smoothNormal(a, b, i) {
return(new Vector((a.x * (1 - i)) + (b.x * i), (a.y * i) + (b.y * i), 0).normalize());
}
var offsetX = 0;
var offsetY = 0;
var mainFillLayer = 20;
var store = false;
var types = {fillTexture:"string", fillColor:"hex", viewSlope:"vector", lightDirection:"vector"};
var defaultType = "number";
var caseSensitive = true;
var capEnd = true;
var className = "SSDrawStyle";
var editor_drawStyle = true;
static var editor_ignore = true;
}
Symbol 935 MovieClip [__Packages.SSMaterial] Frame 0
class SSMaterial
{
var ratios, alphas;
function SSMaterial () {
}
function prepare() {
if (layerShift) {
var _local2 = layerShift;
rearSurfaceLayer = rearSurfaceLayer + _local2;
frontSurfaceLayer = frontSurfaceLayer + _local2;
sideSurfaceLayer = sideSurfaceLayer + _local2;
bottomSurfaceLayer = bottomSurfaceLayer + _local2;
sideTextureLayer = sideTextureLayer + _local2;
}
if (frontDepth < 0) {
frontDepth = 0;
}
if (rearDepth < 0) {
rearDepth = 0;
}
if (thickness < 0) {
thickness = 0;
}
if (bottomDepth < 0) {
bottomDepth = 0;
}
ambientColor = new RGB(ambientColor);
diffuseColor = new RGB(diffuseColor);
specularColor = new RGB(specularColor);
switch (smoothingQuality) {
case 0 :
default :
ratios = [0, 255];
alphas = [100, 100];
break;
case 1 :
ratios = [0, 128, 255];
alphas = [100, 100, 100];
break;
case 2 :
ratios = [0, 96, 159, 255];
alphas = [100, 100, 100, 100];
}
}
function toString() {
return("SSMaterial");
}
static var LOW_QUALITY = 0;
static var MEDIUM_QUALITY = 1;
static var HIGH_QUALITY = 2;
static var TEXTURES_ENABLED = true;
var initialized = false;
var surfaceTextureMode = 1;
var surfaceTexturePoint = 0;
var sideTextureMode = 1;
var sideTexturePoint = 4;
var sideTextureAlign = false;
var rearSurfaceLayer = 10;
var frontSurfaceLayer = 30;
var sideSurfaceLayer = 32;
var bottomSurfaceLayer = 29;
var sideTextureLayer = 31;
var layerShift = 0;
var ambientColor = 6710886;
var diffuseColor = 10066329;
var specularColor = 15658751;
var smoothing = 0;
var sideSmoothing = 0;
var smoothingQuality = HIGH_QUALITY;
var capSurface = false;
var endAlign = 1;
var segmentLine = true;
var thickness = 10;
var frontDepth = 10;
var rearDepth = 10;
var sideExtrude = 0;
var bottomDepth = 0;
var friction = 0.9;
var traction = 0.5;
var bounciness = 0.1;
var emitDust = false;
var defaultType = "number";
var types = {impactSound:"string", ambientColor:"hex", diffuseColor:"hex", specularColor:"hex", surfaceTexture:"string", sideTexture:"string"};
}
Symbol 936 MovieClip [__Packages.GDK.Tools] Frame 0
class GDK.Tools
{
function Tools () {
}
static function sortArrayOn(a, s, toNew) {
if (flashVersion >= 7) {
a.sortOn(s, Array.NUMERIC);
}
var _local6 = -1;
var _local7 = a.length;
var _local3;
var _local10;
var _local8;
var _local4;
var _local5;
var _local9;
while (_local6++ , _local7-- , _local6 <= _local7) {
_local4 = _local6;
_local10 = a[_local4][s];
_local5 = _local7;
_local3 = _local5;
_local8 = a[_local3][s];
if (_local10 > _local8) {
_local9 = a[_local4];
a[_local4] = a[_local5];
a[_local5] = _local9;
_local4 = _local6;
_local10 = a[_local4][s];
_local5 = _local7;
_local3 = _local5;
_local8 = a[_local3][s];
}
while (_local3-- , _local3 > _local6) {
if (_local10 > a[_local3][s]) {
_local4 = _local3;
_local10 = a[_local4][s];
} else if (_local8 < a[_local3][s]) {
_local5 = _local3;
_local8 = a[_local5][s];
}
}
if (_local4 != _local6) {
_local9 = a[_local6];
a[_local6] = a[_local4];
a[_local4] = _local9;
}
if (_local5 != _local7) {
_local9 = a[_local7];
a[_local7] = a[_local5];
a[_local5] = _local9;
}
}
}
static function hexToNumber(hexStr) {
if (hexStr.charAt(0) == "#") {
return(Number("0x" + hexStr.substr(1)));
}
if ((hexStr.charAt(1) == "x") || (hexStr.charAt(1) == "X")) {
return(Number(hexStr));
}
return(Number("0x" + hexStr));
}
static function binary(n) {
var _local1 = "";
var _local3 = 32;
var _local2 = 1;
do {
_local1 = String(Number((n & _local2) != 0)) + _local1;
_local2 = _local2 * 2;
_local3--;
} while (_local3 > -1);
return(_local1);
}
static function hex(n, t) {
var _local2 = "";
var _local1;
var _local5 = 0;
var _local3 = 8;
while (_local3-- , _local3 > -1) {
_local1 = n & 15;
_local2 = ((_local1 < 10) ? (_local1) : (chr(55 + _local1))) + _local2;
if (_local1 > 0) {
_local5 = _local3;
}
n = n >> 4;
}
return((t ? (_local2) : (_local2.substr(_local5))));
}
static function readHexString(hexStr) {
var _local2 = Number("0x" + hexStr.charAt(0));
var _local5 = Number("0x" + hexStr.substr(1, 3));
var _local3 = hexStr.substr(4);
var _local1 = _local3.length / _local2;
var _local4 = new GDK.Grid(_local5, Math.ceil(_local1 / _local5), 0);
while (_local1-- , _local1 > -1) {
_local4[_local1] = Number("0x" + _local3.substr(_local1 * _local2, _local2));
}
return(_local4);
}
static function lookupClassName(cls) {
var _local4;
for (var _local3 in _global) {
if (_global[_local3] == cls) {
return(_local3);
}
}
return(null);
}
static function trim(str) {
var _local1 = str.length;
do {
_local1--;
if (_local1 <= -1) {
break;
}
} while (str.charCodeAt(_local1) <= 32);
if (_local1 == -1) {
return("");
}
var _local2 = -1;
do {
_local2++;
if (_local2 >= _local1) {
break;
}
} while (str.charCodeAt(_local2) <= 32);
return(str.substring(_local2, _local1 + 1));
}
static var flashVersion = parseInt(_level0.$version.substr(4));
static var flashMinorVersion = Number(_level0.$version.split(",")[2]);
}
Symbol 937 MovieClip [__Packages.GDK.Grid] Frame 0
class GDK.Grid extends Array
{
var length;
function Grid (w, h, defaultValue) {
super();
setSize(((w == null) ? 0 : (w)), ((h == null) ? 0 : (h)), true);
if (defaultValue != null) {
this.defaultValue = defaultValue;
}
}
function get width() {
return(_width);
}
function set width(x) {
setSize(x, _height);
//return(width);
}
function get height() {
return(_height);
}
function set height(x) {
setSize(_width, x);
//return(height);
}
function setSize(w, h, noRebuild) {
if ((w == _width) && (h == _height)) {
return(false);
}
if ((h != null) && (h > 0)) {
_overflow = false;
setCell = setCell2D_Fixed;
getCell = getCell2D_Fixed;
_area = w * h;
if ((!noRebuild) && (_mode == 0)) {
}
_mode = 3;
} else {
_overflow = true;
if (x <= 0) {
setCell = setCell2D;
getCell = getCell2D;
if ((!noRebuild) && (_mode == 0)) {
}
_mode = 1;
} else {
delete setCell;
delete getCell;
if ((!noRebuild) && (_mode != 0)) {
}
_mode = 0;
}
}
_width = ((w <= 0) ? 0 : (w));
_height = ((h <= 0) ? 0 : (h));
return(true);
}
function setCell(w, v) {
this[w] = v;
}
function __resolve(v) {
return(defaultValue);
}
function getCell(w) {
return(((((value = this[w])) != null) ? (value) : (defaultValue)));
}
function setCell2D(w, h, val) {
if ((h != null) && (h < 0)) {
h = Math.floor(w / _width);
} else {
w = w + (h * _width);
}
if (h >= _height) {
_height = h + 1;
}
this[w] = val;
}
function getCell2D(w, h) {
if (h != null) {
return(this[w + (((h < 0) ? (_height + (h % _height)) : (h)) * _width)]);
}
return(this[w] % _width);
}
function setCell2D_Fixed(w, h, val) {
var _local3;
var _local2;
_local3 = w % _width;
_local2 = h % _height;
this[((_local3 < 0) ? (_width + _local3) : (_local3)) + (((_local2 < 0) ? (_height + _local2) : (_local2)) * _width)] = val;
}
function getCell2D_Fixed(x, y) {
if (((!repeatX) && (!((x > -1) && (x < _width)))) || ((!repeatY) && (!((y > -1) && (y < _height))))) {
return(defaultValue);
}
var _local3;
var _local2;
_local3 = x % _width;
_local2 = y % _height;
return(this[((_local3 < 0) ? (_width + _local3) : (_local3)) + (((_local2 < 0) ? (_height + _local2) : (_local2)) * _width)]);
}
function toString() {
var _local3 = "";
var _local2 = length;
_local2 = length;
while (_local2-- , _local2 > 0) {
_local3 = this[_local2] + _local3;
_local3 = (((_local2 % width) == 0) ? ",\n" : ",") + _local3;
}
if (length > 0) {
_local3 = this[0] + _local3;
}
return(_local3);
}
function copyFromArray(a) {
var _local2 = a.length;
while (_local2-- , _local2 > -1) {
this[_local2] = a[_local2];
}
}
var _overflow = true;
var defaultValue = null;
var _width = 0;
var _height = 0;
var _area = 0;
var repeatX = true;
var repeatY = true;
var _mode = 0;
}
Symbol 938 MovieClip [__Packages.SSShapeVertex] Frame 0
class SSShapeVertex extends Vector
{
var x, y, z;
function SSShapeVertex (x, y, props) {
super();
this.x = x;
this.y = y;
this.props = props;
}
function toString() {
return(((((("ShapeVert (" + x) + ",") + y) + ",") + z) + ")");
}
var props = SSGlobal.EDGE_DEFAULT;
var scale = 0;
}
Symbol 939 MovieClip [__Packages.SSShapeEdge] Frame 0
class SSShapeEdge
{
var a, b;
function SSShapeEdge (a, b) {
this.a = a;
this.b = b;
}
function toString() {
return((a + " -> ") + b);
}
var radius = 0;
var props = SSGlobal.EDGE_DEFAULT;
var length = 0;
var angle = 0;
}
Symbol 940 MovieClip [__Packages.GradientMatrix] Frame 0
class GradientMatrix extends Object
{
function GradientMatrix (x, y, width, height, hSkew, vSkew) {
super();
g = (x ? (x) : (g));
h = (y ? (y) : (h));
a = (width ? (width) : (a));
e = (height ? (height) : (e));
d = (hSkew ? (hSkew) : (d));
b = (vSkew ? (vSkew) : (b));
}
function set hSkew(v) {
d = v;
//return(hSkew);
}
function get hSkew() {
return(d);
}
function set vSkew(v) {
b = v;
//return(vSkew);
}
function get vSkew() {
return(b);
}
function set width(v) {
a = v;
//return(width);
}
function get width() {
return(a);
}
function set height(v) {
e = v;
//return(height);
}
function get height() {
return(e);
}
function set x(v) {
g = v;
//return(x);
}
function get x() {
return(g);
}
function set y(v) {
h = v;
//return(y);
}
function get y() {
return(h);
}
function set rotation(v) {
b = (d = v);
//return(rotation);
}
function get rotation() {
return((b + d) * 0.5);
}
var a = 1;
var b = 0;
var c = 0;
var d = 0;
var e = 1;
var f = 0;
var g = 50;
var h = 50;
var i = 1;
}
Symbol 941 MovieClip [__Packages.SSZone] Frame 0
class SSZone extends SSObject
{
var localTop, localLeft, localRight, localBottom, radius, onColMethod, owner, args;
function SSZone (type, size, onCollision, ownerObject) {
super();
if (arguments.length) {
init.apply(this, arguments);
}
}
function init(type, size, onCollision, ownerObject) {
if ((boundType = type)) {
if (size) {
localTop = (localLeft = 0);
localRight = size.x;
localBottom = size.y;
} else {
localTop = (localLeft = 0);
localRight = (localBottom = 100);
}
} else {
if (size) {
radius = size;
}
localTop = (localLeft = -((localRight = (localBottom = radius))));
}
if (onCollision) {
onColMethod = onCollision;
}
owner = ownerObject;
args = arguments.slice(4);
}
function onCollision(obj) {
return(onColMethod.call(owner, obj));
}
static var SPHERE = 0;
static var RECT = 1;
var assetID = null;
var boundType = SPHERE;
var classID = SSGlobal.CLSID_ZONE;
var editor_canChangeAsset = false;
var editor_canChangeLayer = false;
var editor_canChangeFrame = false;
}
Symbol 942 MovieClip [__Packages.GameSpring] Frame 0
class GameSpring extends SSObject
{
var addEvent, setAngle, angle, zone, radius, world, direction, x, y, z;
function GameSpring (angle, strength) {
super();
addEvent("rotate", onRotate);
if (strength != null) {
this.strength = Number(strength);
}
setAngle((angle ? (angle) : (this.angle)));
}
function onAddToWorld() {
zone = new SSZone(SSZone.SPHERE, radius, zone_onCollide, this);
world.addObject(zone);
onMove();
}
function onMove() {
zone.moveTo(x + (20 * direction.x), y + (20 * direction.y), z);
}
function onRotate(angle) {
var _local2 = (angle * Math.PI) / 180;
direction = new Vector(Math.sin(_local2), -Math.cos(_local2), 0);
onMove();
}
function zone_onCollide(obj) {
if ((time + 0.1) > world.time) {
return(undefined);
}
time = world.time;
GameSound.playSound("Spring");
obj.jumpTime = 0;
obj.velocity.x = direction.x * (strength + (obj.velocity.x * momentumTransfer));
obj.velocity.y = direction.y * (strength + (obj.velocity.y * momentumTransfer));
return(GDK.Node.COLLISION_CANCEL);
}
function editor_onDisplay(target, external) {
target._rotation = angle;
target.clear();
target.lineStyle(0, 52479);
var _local3 = strength - (((1 - (Math.log(strength) / 8)) * strength) * 3);
target.lineTo(0, -_local3);
}
var assetID = "spring";
var strength = 1200;
var momentumTransfer = 0;
var time = 0;
var editor_isItem = true;
var editor_name = "Spring";
var editor_canRotate = true;
var editor_args_names = ["angle", "strength"];
var editor_args_values = [0, GameSpring.prototype.strength];
var editor_args_types = ["number", "number"];
var editor_args_options = [[-360, 360, 1], [0, 5000, 20]];
var editor_args_descriptions = ["", ""];
var editor_args_mode = [0, 0];
var editor_args_component = ["NumericStepper", "NumericStepper"];
}
Symbol 943 MovieClip [__Packages.GameSound] Frame 0
class GameSound
{
static var soundBase, self, mainSound;
var target, soundObj;
function GameSound (sndClipID) {
if (sndClipID != null) {
var _local2 = (target = soundBase.attachMovie(sndClipID, "sound" + created, ++created));
} else {
var _local2 = (target = soundBase.createEmptyMovieClip("sound" + created, ++created));
}
_local2._visible = false;
_local2.stop();
soundObj = new Sound(_local2);
soundObj.mc = _local2;
}
function startSound(linkageID, repeat) {
soundObj.stop();
soundObj.attachSound(linkageID);
soundObj.start(0, (repeat ? 1048575 : 0));
}
static function playMusic(id, fadeTime, repeat) {
if ((id == null) || (id == "")) {
music.soundObj.stop();
return(undefined);
}
music.soundObj.setVolume(musicVolume);
var _local3;
var _local1 = music.soundObj;
_local1.stop();
_local1.attachSound(id);
_local1.start(0, ((repeat != false) ? 16777215 : 0));
}
static function fadeSound(snd, targetVol, time, onComplete) {
var _local4 = function (snd, st, t, sVol, oVol) {
var _local2 = Math.min(((getTimer() * 0.001) - st) / t, 1);
snd.setVolume(Math.round(sVol + (_local2 * oVol)));
if (_local2 == 1) {
onComplete(snd);
clearInterval(arguments.callee.id);
}
};
_local4.id = setInterval(_local4, 0, snd, getTimer() * 0.001, time, snd.getVolume(), targetVol - snd.getVolume());
}
static function stopMusic(fadeTime) {
snd.stop();
return(undefined);
}
static function playSound(name) {
self.target.gotoAndStop(name);
self.target.gotoAndStop(2);
}
static function pause() {
mainSound.setVolume(0);
}
static function resume() {
mainSound.setVolume(100);
}
static function initSound() {
mainSound = new Sound((soundBase = (_global.root ? (_global.root) : _root).createEmptyMovieClip("_GlobalSounds", 978944)));
self = new GameSound("GlobalSounds");
music = new GameSound();
return(true);
}
static var created = 0;
static var baseDepth = 978944;
static var musicVolume = 35;
static var music = new GameSound();
static var initialized = initSound();
}
Symbol 944 MovieClip [__Packages.GameCollectable] Frame 0
class GameCollectable extends SSObject
{
var x, y, checkCollisions, moveBy, motionTime, velocity, inMotion, cancelUpdates, motionDir, setCollected;
function GameCollectable () {
super();
}
function updatePosition(elapsed) {
var _local3 = x;
var _local2 = y;
checkCollisions(elapsed);
moveBy(velocity.x * motionTime, velocity.y * motionTime, 0);
if ((Math.abs(_local3 - x) < 0.5) && (Math.abs(_local2 - y) < 0.5)) {
x = _local3;
y = _local2;
if (((inMotion = inMotion - elapsed)) <= 0) {
cancelUpdates();
velocity.loc(0, 0, 0);
}
}
}
function checkCollision(obj) {
var _local2;
switch (obj.classID & 4294901760) {
case SSGlobal.CLSID_SHAPE :
_local2 = SSCollision.sweepSphereToStaticShape(this, obj);
if (_local2) {
var _local3 = velocity.__get__length() * bounciness;
var _local5 = motionDir.dot(_local2.normal);
velocity.x = (motionDir.x - ((_local2.normal.x * _local5) * 2)) * _local3;
velocity.y = (motionDir.y - ((_local2.normal.y * _local5) * 2)) * _local3;
x = _local2.point.x;
y = _local2.point.y;
}
break;
case SSGlobal.CLSID_MAINCHAR :
if (!SSCollision.sweepSphereToSphere(this, obj, true)) {
break;
}
setCollected(obj);
}
}
var classID = SSGlobal.CLSID_COLLECTABLE;
var collisionMask = SSGlobal.CLSID_SHAPE | SSGlobal.CLSID_MAINCHAR;
var collected = false;
var radius = 15;
var bounciness = 0.5;
}
Symbol 945 MovieClip [__Packages.SSCollision] Frame 0
class SSCollision
{
var point, normal, edge, time;
function SSCollision (point, normal, time, edge) {
this.point = point;
this.normal = normal;
this.edge = edge;
this.time = time;
}
static function sweepSphereToStaticShape(sphere, shape, noData) {
if ((((sphere.motionLeft > shape.right) || (sphere.motionRight < shape.left)) || (sphere.motionTop > shape.bottom)) || (sphere.motionBottom < shape.top)) {
return(undefined);
}
var _local16 = sphere.motionVec;
var _local9 = sphere.motionDir;
var _local5 = sphere.motionDist;
var _local15 = sphere.motionTime;
var _local4 = sphere.radius;
var _local25;
var _local8;
var _local23;
var _local7 = 255;
var _local14 = new Vector(sphere.x - shape.x, sphere.y - shape.y, 0);
var _local28 = shape.colEdges;
var _local26 = _local28.length;
var _local24 = 0;
var _local1;
var _local10;
var _local21;
while (_local26-- , _local26 > -1) {
_local1 = _local28[_local26];
if (!(_local1.props & 1)) {
continue;
}
var _local20 = _local1.normal;
if (((_local9.x * _local20.x) + (_local9.y * _local20.y)) >= 0) {
continue;
}
var _local17 = _local1.a;
_local10 = new Vector(_local1.center.x - _local14.x, _local1.center.y - _local14.y, 0);
if (((_local10.length - _local4) - _local5) > _local1.radius) {
continue;
}
var _local2 = new Vector(_local14.x - _local17.x, _local14.y - _local17.y);
var _local18 = new Vector(_local2.x - (_local1.normal.x * _local4), _local2.y - (_local1.normal.y * _local4));
var _local11 = _local1.span;
var _local6 = ((_local16.x * (-_local18.y)) - (_local16.y * (-_local18.x))) / ((_local16.y * _local11.x) - (_local16.x * _local11.y));
var _local3;
if ((_local6 >= 0) && (_local6 <= 1)) {
var _local12 = new Vector((_local11.x * _local6) + (_local1.normal.x * _local4), (_local11.y * _local6) + (_local1.normal.y * _local4), 0);
var _local22 = new Vector(_local12.x - _local2.x, _local12.y - _local2.y);
_local3 = _local22.length;
if (_local3 <= _local5) {
if (_local7 < ((_local3 / _local5) * _local15)) {
continue;
}
_local8 = _local12;
_local7 = (_local3 / _local5) * _local15;
_local25 = _local1.normal;
_local23 = _local1;
if (_local7 < 0.0001) {
_local7 = 0;
_local12.x = _local2.x;
_local12.y = _local2.y;
break;
}
_local24++;
if (_local24 >= 2) {
break;
}
var _local19 = _local1.length * _local6;
if ((_local19 > (_local4 * 2)) && (_local19 < (_local1.length - (_local4 * 2)))) {
break;
}
}
} else {
var _local12 = ((_local6 > 1) ? (_local1.span) : (Vector.ZERO));
_local21 = new Vector(_local12.x - _local2.x, _local12.y - _local2.y);
_local10 = _local21.length;
var _local13 = (_local21.x * _local9.x) + (_local21.y * _local9.y);
_local3 = (_local4 * _local4) - ((_local10 * _local10) - (_local13 * _local13));
if ((_local3 > 0) && ((_local3 = _local13 - Math.sqrt(_local3)) < _local5)) {
if ((_local7 < ((_local3 / _local5) * _local15)) || ((_local3 / _local5) < 0)) {
continue;
}
_local7 = (_local3 / _local5) * _local15;
_local23 = _local1;
_local8 = new Vector(_local2.x + (_local3 * _local9.x), _local2.y + (_local3 * _local9.y), 0);
_local25 = new Vector(_local8.x - _local12.x, _local8.y - _local12.y, 0);
_local25.normalize();
if (_local7 < 0.0001) {
_local8.x = _local2.x;
_local8.y = _local2.y;
break;
}
_local24++;
if (_local24 >= 2) {
break;
}
}
}
}
if (_local23) {
_local8.x = _local8.x + (shape.x + _local23.a.x);
_local8.y = _local8.y + (shape.y + _local23.a.y);
return(new SSCollision(_local8, _local25, _local7, _local23));
}
return(null);
}
static function sweepSphereToSphere(obj, sphObj, noData) {
var _local3 = obj.radius + sphObj.radius;
var _local6;
var _local2;
var _local4;
var _local5;
_local6 = new Vector(sphObj.x - obj.x, sphObj.y - obj.y, 0);
_local2 = _local6.length;
var _local9;
if (_local2 < _local3) {
return(true);
}
if (obj.motionDist < (_local2 - _local3)) {
return(false);
}
_local4 = (_local6.x * obj.motionDir.x) + (_local6.y * obj.motionDir.y);
if (_local4 < 0) {
return(false);
}
_local5 = (_local3 * _local3) - ((_local2 * _local2) - (_local4 * _local4));
if (((_local5 <= 0) || ((_local5 = _local4 - Math.sqrt(_local5)) > obj.motionDist)) || (_local5 < 0)) {
return(undefined);
}
if (noData) {
return(true);
}
return(false);
}
static function sweepBoundsToBounds(mObj, sObj, noData) {
if ((((mObj.right >= sObj.left) && (mObj.left <= sObj.right)) && (mObj.top <= sObj.bottom)) && (mObj.bottom >= sObj.top)) {
return(undefined);
}
if ((((mObj.motionRight >= sObj.left) && (mObj.motionLeft <= sObj.right)) && (mObj.motionTop <= sObj.bottom)) && (mObj.motionBottom >= sObj.top)) {
return(true);
}
}
}
Symbol 946 MovieClip [__Packages.GamePoint] Frame 0
class GamePoint extends GameCollectable
{
var world;
function GamePoint (value) {
super();
}
function onAddToWorld() {
(world[assetID] ? (world[assetID]++) : ((world[assetID] = 1)));
}
function setCollected(obj) {
if (!obj.shiftScore(value)) {
return(undefined);
}
GameSound.playSound(soundID);
world.removeObject(this);
}
var assetID = "point";
var soundID = "point";
var value = 10;
var editor_isItem = true;
var editor_name = "GamePoint";
}
Symbol 947 MovieClip [__Packages.GameHealth] Frame 0
class GameHealth extends GameCollectable
{
var collected, world;
function GameHealth (value) {
super();
if ((typeof(value) != "string") && (value != null)) {
this.value = value;
}
}
function setCollected(obj) {
collected = true;
obj.shiftHealth(value, this);
GameSound.playSound(soundID);
world.removeObject(this);
}
var assetID = "health";
var soundID = "health";
var value = 0.5;
var classID = SSGlobal.CLSID_HEALTH;
var editor_isItem = true;
var editor_name = "GameHealth";
var editor_args_names = ["value"];
var editor_args_values = [GameHealth.prototype.value];
var editor_args_types = ["number"];
var editor_args_options = [[0, 1, 0.01]];
var editor_args_descriptions = [""];
var editor_args_mode = [0];
var editor_args_component = ["NumericStepper"];
}
Symbol 948 MovieClip [__Packages.GameCharacter] Frame 0
class GameCharacter extends SSObject
{
var acceleration, contactNormal, colorObj, target, world, keepInScene, controller, moveTo, animationFrames, climbing, lastClimbingObject, x, y, contactSurface, onUpdate, carrying, velocity, eOptions, lastContainer, swingDist, checkCollisions, moveBy, motionTime, top, force, collisionData, contactPoint, removeDisplay, stopCol, restorePoint;
function GameCharacter () {
super();
acceleration = new Vector();
contactNormal = new Vector();
}
function initColor() {
if (colorObj) {
var _local2 = colorObj.getTransform();
}
colorObj = new Color(target);
if (_local2) {
colorObj.setTransform(_local2);
}
}
function onAddDisplay() {
initColor();
buildAnimationData();
}
function activate() {
world.viewport.setWatch(this);
lockDisplayState = false;
immune = immuneAtStart;
target._visible = true;
keepInScene = true;
controller.fuel = 0;
health = controller.health;
}
function deactivate() {
toss();
moveTo(-300, 0, 0);
}
function buildAnimationData() {
animationFrames = [];
var _local2 = animationLabels.length;
while (_local2-- , _local2 > -1) {
target.gotoAndStop(animationLabels[_local2]);
if (target._currentframe == 1) {
continue;
}
if (target.a) {
animationFrames[_local2] = Math.floor(target.a._totalframes * 0.5);
}
}
setAnimationState(0, true);
}
function update(elapsed) {
if (!keysLocked) {
var _local4 = controller.right - controller.left;
var _local3 = controller.down - controller.up;
var _local5 = (sp != ((sp = controller.jump))) && (sp);
if (((((canClimb && (!climbing)) && (!swinging)) && (_local3)) && (lastClimbingObject)) && ((lastClimbTime + 0.5) < world.time)) {
if ((((x <= lastClimbingObject.right) && (x >= lastClimbingObject.left)) && (y <= lastClimbingObject.bottom)) && (y >= lastClimbingObject.top)) {
climbing = lastClimbingObject;
contactSurface = null;
}
}
} else {
var _local4 = 0;
var _local3 = 0;
var _local5 = (sp = 0);
}
if (eTime) {
eTime = Math.max(eTime - elapsed, 0);
dropParticle();
}
if (shield) {
if (((shield = shield - elapsed)) < 0) {
onShieldEnd();
} else {
onShield();
}
} else if (immune) {
if (!((immune = Math.max(immune - elapsed, 0)))) {
target._visible = true;
} else {
target._visible = Boolean(Math.floor(immune / immuneBlink) % 3);
}
}
updatePosition(elapsed, _local4, _local3, _local5);
if (!lockDisplayState) {
updateDisplay(elapsed, _local4, _local3, _local5);
}
onUpdate(elapsed);
}
function onShieldEnd() {
immune = (shield = 0);
colorObj.setTransform({rb:0, gb:0, bb:0});
}
function onShield() {
var _local2 = {};
var _local3 = Math.abs(Math.sin(Math.log(shield + 1) * 10));
_local2.rb = _local3 * shieldCMax.rb;
_local2.gb = _local3 * shieldCMax.gb;
_local2.bb = _local3 * shieldCMax.bb;
colorObj.setTransform(_local2);
}
function setAnimationState(state, force) {
if ((state == dispState) && (!force)) {
return(undefined);
}
dispState = state;
dispTurnFrames = animationFrames[state];
target.gotoAndStop(animationLabels[state]);
target.a.gotoAndStop(((directionX < 0) ? 1 : (target.a._totalframes)));
dispStateChanged = true;
}
function updateDisplay(elapsed, vX, vY, kJump) {
if (swinging) {
target._rotation = (Math.atan2(-swinging.vx, swinging.vy) / Math.PI) * 180;
setAnimationState(8);
} else if (carrying) {
if (jumpTime && (vX)) {
setAnimationState(12);
} else {
setAnimationState(11);
}
} else if (climbing) {
if ((!climbLimit) && (vY < 0)) {
setAnimationState(9);
} else if ((!climbLimit) && (vY > 0)) {
setAnimationState(10);
} else {
setAnimationState(8);
}
} else if (contactSurface) {
if (vX) {
setAnimationState(1);
runTick = runTick + Math.max(0.005, elapsed * (speed / 400));
var _local2 = target.a.mcAnim;
if (runTick > 0.02) {
runTick = 0;
if (_local2._currentframe == _local2._totalframes) {
_local2.gotoAndStop(1);
} else {
_local2.nextFrame();
}
} else {
_local2.stop();
}
} else {
setAnimationState(0);
}
} else if (!jumpTime) {
if (velocity.y < 0) {
setAnimationState(2);
} else {
setAnimationState(3);
}
}
if ((dispCanTurn && (vX)) && (vX != dispAxis)) {
directionX = (dispTurn = vX);
}
if (dispStateChanged || (dispTurn)) {
if (dispTurn) {
if (dispTurn > 0) {
if (((dispAxis = Math.min(1, (dispAxis = dispAxis + ((elapsed * 2) / dispTurnTime))))) == 1) {
dispTurn = 0;
}
} else if (((dispAxis = Math.max(-1, (dispAxis = dispAxis - ((elapsed * 2) / dispTurnTime))))) == -1) {
dispTurn = 0;
}
}
dispFrame = (dispTurnFrames + Math.round(dispAxis * dispTurnFrames)) + 1;
target.a.gotoAndStop(dispFrame);
}
dispStateChanged = false;
}
function emitParticle(linkageID, time, options) {
if (linkageID == null) {
eTime = 0;
eLID = null;
return(undefined);
}
eTime = (eTimeTotal = time);
eLID = linkageID;
if (options) {
eOptions = options;
} else {
delete eOptions;
}
}
function dropParticle() {
if (eLast == ((eLast = Math.floor(eTime / eInterval)))) {
return(undefined);
}
var _local2 = new SSParticle(eLID, (eOptions.life ? (eOptions.life) : 1), new Vector(velocity.x * 0.1, (velocity.y * 0.1) - 150, -20), eOptions.spin, eOptions.gravity);
_local2.x = x;
_local2.y = y;
_local2.scale = 150;
world.addObject(_local2);
}
function updatePosition(elapsed, vX, vY, kJump) {
corrected = false;
var _local6 = x;
var _local5 = y;
jumpTime = Math.max(jumpTime - elapsed, 0);
if (controller.action) {
if (carrying) {
toss();
} else if (lastContainer) {
pickup(lastContainer);
}
}
if (swinging) {
if (kJump) {
releaseSwing();
} else {
swingDist = swingDist + (((swinging.length - 50) - swingDist) * elapsed);
velocity.x = ((swinging.x + (swinging.vx * swingDist)) - x) / elapsed;
velocity.y = ((swinging.y + (swinging.vy * swingDist)) - y) / elapsed;
}
} else if (climbing) {
if (kJump) {
releaseClimb();
jump(elapsed, vX, vY);
velocity.x = dispAxis * 200;
velocity.y = -300;
} else {
climb(elapsed, vX, vY);
}
} else if ((!inMotion) || (contactSurface)) {
if (kJump) {
jump(elapsed, vX, vY);
} else {
walk(elapsed, vX, vY);
}
} else if (jumpTime && (kJump)) {
jump(elapsed, vX, vY);
} else {
updateInSpace(elapsed, vX, vY);
}
contactSurface = null;
checkCollisions(elapsed);
moveBy(velocity.x * motionTime, velocity.y * motionTime, 0);
if (carrying) {
carrying.moveTo(x, top - carrying.radius, 0);
}
if (((jumpTime && (!vX)) && (Math.abs(_local6 - x) < 1)) && (Math.abs(_local5 - y) < 1)) {
if (!((inMotion = Math.max((inMotion = inMotion - elapsed), 0)))) {
velocity.x = 0;
velocity.y = 20;
moveTo(_local6, _local5, 0);
}
} else {
inMotion = inMotionTime;
}
}
function onSurfaceContact() {
if (climbing) {
releaseClimb();
} else if (swinging) {
releaseSwing();
}
if (!jumpTime) {
GameSound.playSound(contactSurface.attributes.impactSound);
}
jumpTime = ((contactNormal.y <= 0) ? (allowJumpTime) : 0);
}
function toss() {
if ((carryingTime + 0.2) < world.time) {
carrying.setVelocity(new Vector(velocity.x + (dispAxis * 200), velocity.y - 100, 0));
carryingTime = world.time;
carrying = null;
}
}
function pickup() {
if ((canCarry && (!lastContainer)) || (lastContainer.inMotion)) {
return(undefined);
}
var _local3 = lastContainer.x - x;
var _local2 = lastContainer.y - y;
if (Math.sqrt((_local3 * _local3) + (_local2 * _local2)) < (lastContainer.radius + radius)) {
carrying = lastContainer;
carrying.beingCarried = true;
carryingTime = world.time;
}
}
function climb(elapsed, vX, vY) {
velocity.x = 0.1;
velocity.y = vY * climbSpeed;
x = climbing.x + (climbing.localRight * 0.5);
lockDisplayState = false;
if (vY) {
if (vY < 0) {
var _local2 = climbing.top - (top + (velocity.y * elapsed));
if (_local2 > 0) {
velocity.y = velocity.y * (_local2 / velocity.y);
}
} else if ((climbing.bottom - (top + (velocity.y * elapsed))) < 0) {
releaseClimb();
}
}
}
function startSwing(obj, dist) {
if ((((!canSwing) || (swinging)) || (climbing)) || ((obj.swingRelease + 0.5) > world.time)) {
return(undefined);
}
if (carrying) {
toss();
}
obj.holding = this;
swingDist = dist;
swinging = obj;
}
function releaseSwing() {
velocity.x = swinging.vx * 300;
velocity.y = (swinging.vy - 1) * 400;
target._rotation = 0;
swinging.holding = null;
swinging.swingRelease = world.time;
swinging = null;
}
function releaseClimb() {
lastClimbTime = world.time;
climbing = null;
}
function jump(elapsed, vX, vY) {
var _local2 = new Vector(contactNormal.x, contactNormal.y - 2, 0);
_local2.normalize();
velocity.x = velocity.x + (_local2.x * jumpStrength);
velocity.y = velocity.y + (_local2.y * jumpStrength);
jumpTime = 0;
}
function walk(elapsed, vx, vy) {
if (!contactSurface) {
return(undefined);
}
var _local5 = contactSurface.attributes;
if (contactSurface.props & 2) {
var _local6 = _local5.friction;
var _local9 = _local5.traction;
force = new Vector((((-contactNormal.y) * vx) * maxWalkForce) * _local9, (((contactNormal.x * vx) * maxWalkForce) * _local9) + (gravity * (vx ? 0.25 : 1)), 0);
} else {
force = new Vector();
var _local6 = 0;
var _local9 = 0;
}
var _local8 = ((0.004 * velocity.x) * velocity.x) * ((velocity.x >= 0) ? -1 : 1);
var _local7 = ((0.004 * velocity.y) * velocity.y) * ((velocity.y >= 0) ? -1 : 1);
var _local3 = contactNormal.dot(force);
var _local2 = velocity.getNormalized();
_local2.x = _local2.x * (_local3 * _local6);
_local2.y = _local2.y * (_local3 * _local6);
force.x = force.x + (_local2.x + _local8);
force.y = force.y + (_local2.y + _local7);
if ((!inMotion) && (vx)) {
}
velocity.x = velocity.x + ((force.x * (1 / mass)) * elapsed);
velocity.y = velocity.y + ((force.y * (1 / mass)) * elapsed);
}
function updateInSpace(elapsed, vX, vY) {
acceleration.x = ((-velocity.x) * drag) + (vX * maxAirForce);
acceleration.y = ((-velocity.y) * drag) + gravity;
velocity.x = velocity.x + (acceleration.x * elapsed);
velocity.y = velocity.y + (acceleration.y * elapsed);
}
function checkCollision(obj, flag, options) {
var _local4;
switch (obj.classID & 4294901760) {
case SSGlobal.CLSID_MOBILEOBJECT :
case SSGlobal.CLSID_MAINCHAR :
if (SSCollision.sweepBoundsToBounds(this, obj)) {
var _local5 = obj.onCollision(this);
collisionData = null;
return(((_local5 != null) ? (_local5) : true));
}
break;
case SSGlobal.CLSID_CONTAINER :
case SSGlobal.CLSID_OBJECT :
if (((!swinging) && (controller.up)) && (obj.classID == SSGlobal.CLSID_SWING)) {
var _local3 = Math.min(obj.length, Math.max(0, (obj.vx * (x - obj.x)) + (obj.vy * (y - obj.y))));
var _local9 = obj.x + (obj.vx * _local3);
var _local8 = obj.y + (obj.vy * _local3);
var _local7 = x - _local9;
var _local6 = y - _local8;
var _local10 = Math.sqrt((_local7 * _local7) + (_local6 * _local6));
if (_local10 < radius) {
startSwing(obj, _local3);
}
break;
}
case SSGlobal.CLSID_ZONE :
if (obj.boundType) {
if (SSCollision.sweepBoundsToBounds(this, obj)) {
var _local5 = obj.onCollision(this);
collisionData = null;
return(((_local5 != null) ? (_local5) : true));
}
} else if (SSCollision.sweepSphereToSphere(this, obj, true)) {
var _local5 = obj.onCollision(this);
collisionData = null;
return(((_local5 != null) ? (_local5) : true));
}
break;
case SSGlobal.CLSID_SHAPE :
if ((!obj.disabled) && (_local4 = SSCollision.sweepSphereToStaticShape(this, obj))) {
if (collisionData) {
if (_local4.time < collisionData.time) {
collisionData = _local4;
}
return(true);
}
collisionData = _local4;
return(true);
}
break;
case SSGlobal.CLSID_COLLECTABLE :
if (!(health && (SSCollision.sweepSphereToSphere(this, obj, true)))) {
break;
}
obj.setCollected(this);
}
}
function shapeCollision(o) {
speed = velocity.length;
var _local4;
_local4 = o.edge.attributes.bounciness;
if (_local4 == null) {
_local4 = 0;
}
if (o.edge.attributes.water != null) {
setDead("splash", new Vector(o.point.x - (o.normal.x * radius), o.point.y - (o.normal.y * radius)), true);
GameSound.playSound("splash");
return(undefined);
}
if (velocity.y > 600) {
shiftHealth(-0.1);
}
var _local6 = velocity.dot(o.normal);
var _local3 = new Vector(_local6 * o.normal.x, _local6 * o.normal.y, 0);
var _local5 = new Vector(velocity.x - _local3.x, velocity.y - _local3.y, 0);
velocity.x = _local5.x - (_local4 * _local3.x);
velocity.y = _local5.y - (_local4 * _local3.y);
motionTime = motionTime - o.time;
moveTo(o.point.x + (o.edge.normal.x * 0.05), o.point.y + (o.edge.normal.y * 0.05), 0);
corrected = true;
contactSurface = o.edge;
contactNormal = o.normal;
contactPoint = o.point;
onSurfaceContact();
checkCollisions(motionTime);
return(true);
}
function doCommand(obj, command) {
switch (command.toLowerCase()) {
case "loselife" :
setDead(obj);
break;
case "end" :
endLevel(obj);
break;
case "climb" :
lastClimbingObject = obj;
break;
case "machine" :
target._visibile = false;
removeDisplay();
world.references.EvilMachine.target.play();
update = function (elapsed) {
};
}
}
function shiftShield(value) {
target._visible = true;
shield = Math.min(shield + value, maxShield);
}
function shiftScore(value, obj) {
if (!health) {
return(false);
}
controller.shiftScore(value);
return(true);
}
function shiftHealth(value, obj) {
if ((value < 0) && (!shield)) {
if (carrying) {
toss();
} else if (climbing) {
releaseClimb();
} else if (swinging) {
releaseSwing();
}
lastClimbTime = world.time;
if (obj) {
jumpTime = 0;
var _local4;
var _local2;
_local4 = new Vector(((obj.x > x) ? -1 : 1), -1, 0);
_local2 = obj.strength;
if (!_local2) {
_local2 = 200;
}
velocity.x = _local4.x * _local2;
velocity.y = _local4.y * _local2;
stopCol = true;
}
}
if (((immune || (shield)) && (value < 0)) || (health <= 0)) {
return(false);
}
controller.health = (health = Math.max(Math.min(health + value, 1), 0));
if (health <= 0) {
setDead(obj);
} else if (value < 0) {
GameSound.playSound("hurt");
lockDisplayState = canLockDisplayState;
immune = immuneAllowed;
hurt();
onSurfaceContact = function () {
if ((this.contactSurface.props & 2) == 0) {
return(undefined);
}
this.lockDisplayState = false;
delete this.onSurfaceContact;
this.onSurfaceContact();
};
}
return(true);
}
function hurt() {
setAnimationState(4, true);
}
function setDead(asset, point, hide) {
if (dead) {
return(undefined);
}
if (carrying) {
toss();
}
dead = true;
if (asset != null) {
if (hide) {
moveTo(-1000, 0, 0);
stopCol = true;
}
var _local4 = new SSParticle(asset, 2, new Vector(0, 0, 0));
_local4.x = point.x;
_local4.y = point.y;
world.addObject(_local4);
}
if (health) {
health = 0;
}
world.viewport.lock();
GameSound.playSound("LoseLife");
lockDisplayState = true;
keysLocked = true;
onSurfaceContact = function () {
if ((this.contactSurface.props & 2) == 0) {
return(undefined);
}
this.velocity.x = 0;
this.velocity.y = 1;
this.setAnimationState(5);
delete this.onSurfaceContact;
this.onSurfaceContact();
};
var _local6 = (world.engine.onPause = function () {
arguments.callee.cs.pause();
arguments.callee.obj.target.a.stop();
});
var _local5 = (world.engine.onResume = function () {
arguments.callee.cs.resume();
arguments.callee.obj.target.a.play();
});
_local6.obj = (_local5.obj = this);
var _local3 = (_local6.cs = (_local5.cs = new CallStack()));
if (contactSurface) {
setAnimationState(5);
} else {
setAnimationState(6);
}
_local3.wait(3);
if ((controller.lives = controller.lives - 1)) {
_local3.call(this, restore);
} else {
_local3.call(this, endGame);
}
_local3.call(this, function () {
delete this.world.engine.onResume;
delete this.world.engine.onPause;
delete this.onSurfaceContact;
});
_local3.start();
}
function endGame() {
SSInterface.showScreen("GameOver");
}
function endLevel(obj, animated) {
immune = 0;
target._visible = true;
GameSound.stopMusic(0.4);
finished = true;
lockDisplayState = true;
keysLocked = true;
var _local2 = new CallStack();
if (!contactSurface) {
_local2.call(this, function () {
return(this.contactSurface != null);
});
}
_local2.call(this, function () {
this.velocity.x = this.velocity.x * 0.5;
this.velocity.y = this.velocity.y * 0.5;
this.setAnimationState(7, true);
});
_local2.call(this, function () {
SSInterface.showScreen("WinLevel", true);
});
_local2.start();
}
function setRestorePoint(obj, index) {
restorePoint = obj;
}
function restore() {
dead = false;
if (restorePoint) {
moveTo(restorePoint.x, restorePoint.y - radius, 0);
}
setAnimationState(2);
onShieldEnd();
velocity.loc(0, 1, 0);
controller.health = (health = 1);
emitParticle(null);
world.viewport.unlock();
world.viewport.setWatch(this);
lockDisplayState = false;
keysLocked = false;
}
var radius = 22.5;
var jumpStrength = 400;
var gravity = SSGlobal.GRAVITY;
var maxWalkForce = 900;
var maxAirForce = 200;
var mass = 1;
var drag = 0.5;
var classID = SSGlobal.CLSID_MAINCHAR;
var collisionMask = 4294967295;
var assetID = "Character";
var animationLabels = ["idle", "walk", "airUp", "airDown", "hurt", "death", "deathInAir", "end", "climbHold", "climbUp", "climbDown", "carry", "carryWalk"];
var animationLabel = 0;
var active = false;
var keysLocked = false;
var sp = false;
var shieldCMax = {rb:255, gb:192, bb:0};
var depthLayer = 4;
var dispState = 0;
var dispCanTurn = true;
var dispAxis = 1;
var dispTurn = 0;
var dispTurnTime = 0.25;
var dispTurnFrames = 4;
var dispFrame = GameCharacter.prototype.dispTurnFrames;
var dispStateChanged = false;
var runTick = 0;
var eLast = 0;
var eInterval = 0.1;
var eTime = 0;
var eTimeTotal = 0;
var eLID = 0;
var canClimb = true;
var canSwing = true;
var climbLimit = false;
var corrected = false;
var inMotion = 1;
var inMotionTime = 0.25;
var canCarry = true;
var carryingTime = 0;
var jumpTime = 0;
var allowJumpTime = 0.2;
var directionX = 1;
var climbSpeed = 100;
var swinging = null;
var speed = 0;
var lastClimbTime = 0;
var multiplier = 1;
var health = 1;
var shield = 0;
var maxShield = 30;
var immune = 0;
var immuneAllowed = 3;
var immuneAtStart = 3;
var immuneBlink = 0.1;
var lockDisplayState = false;
var canLockDisplayState = true;
var finished = false;
var dead = false;
}
Symbol 949 MovieClip [__Packages.GamePlayer] Frame 0
class GamePlayer
{
var control, lastKey;
function GamePlayer () {
initialize();
lives = (_global.VR_ON_LIVES ? 5 : 3);
}
function initialize() {
Key.addListener(this);
}
function destroy() {
Key.removeListener(this);
}
function setControl(obj) {
control.deactivate();
control.active = false;
control = obj;
obj.controller = this;
obj.active = true;
obj.activate();
}
function shiftScore(value) {
score = score + value;
}
function update(elapsed) {
control.update(elapsed);
clearKeys();
}
function onKeyDown() {
if (lastKey == ((lastKey = Key.getCode()))) {
return(undefined);
}
switch (lastKey) {
case 37 :
left = true;
break;
case 38 :
up = true;
break;
case 39 :
right = true;
break;
case 40 :
down = true;
break;
case 32 :
jump = true;
break;
case 68 :
action = true;
}
}
function onKeyUp() {
switch (Key.getCode()) {
case 37 :
left = false;
break;
case 38 :
up = false;
break;
case 39 :
right = false;
break;
case 40 :
down = false;
}
lastKey = 0;
}
function clearKeys() {
jump = false;
action = false;
}
var score = 0;
var health = 1;
var lives = 3;
var shield = 0;
var fuel = 0;
var left = false;
var right = false;
var up = false;
var down = false;
var jump = false;
var action = false;
}
Symbol 950 MovieClip [__Packages.SSParticle] Frame 0
class SSParticle extends SSObject
{
var assetID, lifeSpan, life, velocity, world, addToScene, target, getUpdates, z, moveBy;
function SSParticle (asset, life, velocity, rot, grav) {
super();
assetID = asset;
lifeSpan = (this.life = life);
this.velocity = (velocity ? (velocity) : (new Vector()));
if (rot != null) {
spin = rot;
}
if (grav != null) {
gravity = grav;
}
}
function onRemoveFromScene() {
world.removeObject(this);
}
function onAddToWorld() {
addToScene();
}
function onAddToScene() {
if (!target) {
world.removeObject(this);
return(undefined);
}
getUpdates();
}
function onAddTarget() {
if (alpha) {
target._alpha = startAlpha;
}
}
function update(elapsed) {
if ((((life = life - elapsed)) < 0) || (z < (world.viewport.z + 50))) {
target.swapDepths(0);
target.removeMovieClip();
world.removeObject(this);
return(undefined);
}
velocity.y = velocity.y + (gravity * elapsed);
moveBy(velocity.x * elapsed, velocity.y * elapsed, velocity.z * elapsed);
}
function onDisplay(viewport, elapsed) {
var _local2 = life / lifeSpan;
if (alpha) {
target._alpha = _local2 * 100;
}
if (spin) {
target._rotation = target._rotation + (spin * elapsed);
}
if (scale) {
target._xscale = (target._yscale = target._xscale + (((1 - _local2) * scale) * (target._xscale / 100)));
}
}
var trackInSectorGrid = false;
var rogueNode = true;
var gravity = 0;
var spin = 0;
var alpha = true;
var scale = 0;
var startAlpha = 100;
}
Symbol 951 MovieClip [__Packages.Explosive] Frame 0
class Explosive extends SSObject
{
var inScene, x, y, world, removeFromScene;
function Explosive (damage, strength, regenerate, camDelay, particle) {
super();
if (damage) {
value = damage;
}
if (strength) {
this.strength = strength;
}
if (regenerate) {
reappear = regenerate;
}
if (camDelay) {
camStallTime = camDelay;
}
if (particle.length) {
this.particle = particle;
}
}
function onCollision(obj) {
if (!inScene) {
return(undefined);
}
var _local3;
_local3 = new Vector(obj.x - x, obj.y - y, 0);
_local3.normalize();
obj.shiftHealth(value, this);
GameSound.playSound(soundID);
obj.velocity.x = _local3.x * strength;
obj.velocity.y = (_local3.y * strength) + 100;
obj.motionTime = 0.0001;
obj.emitParticle(particle, 4);
world.viewport.stall(camStallTime);
world.viewport.shakeCamera(0.1, 8);
if (reappear) {
removeFromScene();
} else {
world.removeObject(this);
}
return(GDK.Node.COLLISION_CANCEL);
}
var classID = SSGlobal.CLSID_OBJECT;
var collisionMask = SSGlobal.CLSID_SHAPE;
var camStallTime = 0.5;
var value = -0.5;
var strength = 1500;
var reappear = false;
var particle = "Smoke";
var assetID = "Explosive";
var soundID = "Bomb";
var editor_isItem = true;
var editor_name = "Explosive";
var editor_args_names = ["damage", "strength", "reappear", "camDelay", "particle"];
var editor_args_values = [Explosive.prototype.value, Explosive.prototype.strength, Explosive.prototype.reappear, Explosive.prototype.camStallTime, Explosive.prototype.particle];
var editor_args_types = ["number", "number", "boolean", "number", "string"];
var editor_args_options = [[-1, 1, 0.01], [20, 10000, 20], null, [0, 1, 0.01], "A-Za-z0-9"];
var editor_args_descriptions = ["", "", "", "", ""];
var editor_args_mode = [0, 0, 0, 0, 0];
var editor_args_component = ["NumericStepper", "NumericStepper", "CheckBox", "NumericStepper", "TextInput"];
}
Symbol 952 MovieClip [__Packages.Checkpoint] Frame 0
class Checkpoint extends SSObject
{
var world, zone, x, y, z, target;
function Checkpoint (id, visible) {
super();
if (id) {
checkpointID = id;
}
}
function onAddToWorld() {
world.addObject((zone = new SSZone(SSZone.SPHERE, 20, zone_onCollide, this)));
zone.moveBy(x, y, z);
}
function zone_onCollide(obj) {
setCollected(obj);
}
function onAddDisplay() {
if (collected) {
target.gotoAndStop(target._totalframes);
} else {
target.gotoAndStop(1);
}
}
function setCollected(obj) {
if (collected) {
return(undefined);
}
obj.setRestorePoint(this);
collected = true;
GameSound.playSound(soundID);
target.play();
}
var classID = SSGlobal.CLSID_CHECKPOINT;
var assetID = "Checkpoint";
var soundID = "Checkpoint";
var checkpointID = 0;
var depthLayer = 1;
var collected = false;
var editor_isItem = true;
var editor_name = "Checkpoint";
var editor_args_names = ["id"];
var editor_args_values = [Checkpoint.prototype.checkpointID];
var editor_args_types = ["number"];
var editor_args_options = [[0, 1000, 1]];
var editor_args_descriptions = [""];
var editor_args_mode = [0];
var editor_args_component = ["NumericStepper"];
var editor_canChangeFrame = false;
}
Symbol 953 MovieClip [__Packages.CommandBox] Frame 0
class CommandBox extends SSZone
{
var init, width, height;
function CommandBox (w, h, command) {
super();
if (w) {
localRight = w;
}
if (h) {
localBottom = h;
}
if (command != null) {
this.command = command;
}
init(SSZone.RECT, new Vector(localRight, localBottom, 0));
}
function onCollision(obj) {
return(obj.doCommand(this, command));
}
function onAddDisplay() {
}
function editor_onCreateDisplay(target, external) {
}
function editor_onDisplay(target, external) {
target.createTextField("t", 20, 0, 0, 100, 48);
var _local3 = target.t;
var _local4 = _local3.getNewTextFormat();
_local4.size = 20;
_local4.color = 16777215 /* 0xFFFFFF */;
_local4.font = "_sans";
_local3.setNewTextFormat(_local4);
_local3.selectable = false;
_local3.text = "Command:\n" + command;
target.clear();
target.lineStyle(0, 16742348);
target.beginFill(16742348, 80);
target.lineTo(width, 0);
target.lineTo(width, height);
target.lineTo(0, height);
target.lineTo(0, 0);
target.endFill();
}
var classID = SSGlobal.CLSID_ZONE;
var value = -1;
var localRight = 100;
var localBottom = 100;
var command = "LoseLife";
var editor_isItem = true;
var editor_name = "CommandBox";
var editor_args_names = ["width", "height", "command"];
var editor_args_values = [CommandBox.prototype.localRight, CommandBox.prototype.localBottom, CommandBox.prototype.command];
var editor_args_types = ["number", "number", "string"];
var editor_args_options = [[10, 4000, 10], [10, 4000, 10], "A-Za-z"];
var editor_args_descriptions = ["", "", ""];
var editor_args_mode = [0, 0, 0];
var editor_args_component = ["NumericStepper", "NumericStepper", "TextInput"];
var editor_canChangeFrame = false;
}
Symbol 954 MovieClip [__Packages.DirectionArrow] Frame 0
class DirectionArrow extends SSObject
{
var target;
function DirectionArrow (angle, pointAngle) {
super();
if (angle) {
this.angle = angle;
}
if (pointAngle) {
this.pointAngle = pointAngle;
}
}
function onAddDisplay() {
target.a._rotation = (-((target._rotation = angle))) + pointAngle;
}
var assetID = "Arrow";
var angle = 0;
var pointAngle = 0;
var depthLayer = 1;
var editor_isItem = true;
var editor_name = "Arrow";
var editor_args_names = ["angle", "pointAngle"];
var editor_args_values = [DirectionArrow.prototype.angle, DirectionArrow.prototype.pointAngle];
var editor_args_types = ["number", "number"];
var editor_args_options = [[-360, 360, 1], [-360, 360, 1]];
var editor_args_descriptions = ["", ""];
var editor_args_mode = [0, 0];
var editor_args_component = ["NumericStepper", "NumericStepper"];
var editor_canChangeFrame = false;
function editor_onDisplay(target) {
target.a._rotation = (-((target._rotation = angle))) + pointAngle;
}
}
Symbol 955 MovieClip [__Packages.GameElement] Frame 0
class GameElement extends SSObject
{
var target, assetID;
function GameElement (angle, scale) {
super();
if (angle && (angle != "")) {
this.angle = angle;
}
if (scale && (scale != "")) {
this.scale = scale;
}
}
function onAddDisplay() {
target._rotation = angle;
}
function editor_onDisplay(target, external) {
if ((assetID == null) || (assetID == "")) {
target.clear();
target.lineStyle(0, 4482764);
target.beginFill(4482764, 40);
target.lineTo(-25, -25);
target.lineTo(25, -25);
target.lineTo(25, 25);
target.lineTo(-25, 25);
target.endFill();
target.lineTo(25, 25);
target.moveTo(-25, 25);
target.lineTo(25, -25);
} else {
target._rotation = angle;
}
}
var depthLayer = 1;
var radius = 200;
var angle = 0;
var scale = 100;
var editor_isItem = true;
var editor_name = "Element";
var editor_args_names = ["angle"];
var editor_args_values = [0, 1200];
var editor_args_types = ["number"];
var editor_args_options = [[-360, 360, 1]];
var editor_args_descriptions = [""];
var editor_args_mode = [0];
var editor_args_component = ["NumericStepper"];
}
Symbol 956 MovieClip [__Packages.Spikes] Frame 0
class Spikes extends SSObject
{
var x;
function Spikes (value) {
super();
if (value != null) {
this.value = value;
}
}
function onCollision(obj) {
var _local2;
_local2 = new Vector(((obj.x < x) ? -1 : 1), -2, 0);
_local2.normalize();
obj.velocity.x = _local2.x * strength;
obj.velocity.y = _local2.y * strength;
GameSound.playSound(soundID);
obj.shiftHealth(value, this);
return(GDK.Node.COLLISION_CANCEL);
}
var assetID = "spikes";
var soundID = "spikes";
var value = -0.2;
var classID = SSGlobal.CLSID_OBJECT;
var collisionMask = SSGlobal.CLSID_SHAPE;
var strength = 250;
var editor_isItem = true;
var editor_name = "Spikes";
var editor_canRotate = true;
var editor_args_names = ["value"];
var editor_args_values = [0];
var editor_args_types = ["number"];
var editor_args_options = [[-1, 1, 0.01]];
var editor_args_descriptions = [""];
var editor_args_mode = [0];
var editor_args_component = ["NumericStepper"];
}
Symbol 957 MovieClip [__Packages.GameLife] Frame 0
class GameLife extends GameCollectable
{
var world;
function GameLife (value) {
super();
if (value != null) {
this.value = value;
}
}
function setCollected(obj) {
obj.lives = obj.lives + value;
GameSound.playSound(soundID);
world.removeObject(this);
}
var value = 1;
var assetID = "ExtraLife";
var soundID = "ExtraLife";
var editor_isItem = true;
var editor_name = "Life";
var editor_args_names = ["value"];
var editor_args_values = [GameLife.prototype.value];
var editor_args_types = ["number"];
var editor_args_options = [[0, 100, 1]];
var editor_args_descriptions = [""];
var editor_args_mode = [0];
var editor_args_component = ["NumericStepper"];
}
Symbol 958 MovieClip [__Packages.GameVehicle] Frame 0
class GameVehicle extends GameCharacter
{
var owner, velocity, controller, originX, x, originY, y, world, snd, target, keepInScene, shield, immune, immuneAtStart, setAnimationState, health, onShieldEnd, moveTo, dispCanTurn, dispAxis, directionX, dispTurn, jumpTime, contactSurface, dispStateChanged, dispTurnTime, dispFrame, dispTurnFrames, initColor, buildAnimationData;
function GameVehicle () {
super();
}
function onCollision(obj) {
if (canTake && (obj.classID == SSGlobal.CLSID_MAINCHAR)) {
if (obj.jumpTime) {
return(undefined);
}
owner = obj;
obj.controller.setControl(this);
velocity.x = obj.velocity.x * 0.5;
velocity.y = obj.velocity.y * 0.5;
}
}
function shiftFuel(v) {
controller.fuel = (fuel = Math.min(1, fuel + v));
}
function onAddToWorld() {
originX = x;
originY = y;
}
function activate() {
canTake = false;
GameSound.playSound("happy");
x = originX;
y = originY;
fuel = 1;
velocity.y = -1;
velocity.x = 0;
var _local3;
_local3 = world.collections.fuel;
var _local2 = _local3.length;
while (_local2-- , _local2 > -1) {
_local3[_local2].setActive(true);
}
snd = new Sound(target);
snd.attachSound("ATVIdle");
snd.start(0, 1048575);
keepInScene = true;
shield = owner.shield;
owner.onShieldEnd();
immune = immuneAtStart;
setAnimationState(1);
world.viewport.setWatch(this);
controller.fuel = fuel;
health = controller.health;
}
function deactivate() {
setAnimationState(0);
owner.moveTo(x, y, 0);
target._visible = true;
target._rotation = 0;
owner.shield = shield;
onShieldEnd();
snd.stop();
snd = null;
owner.velocity.x = velocity.x * 0.5;
owner.velocity.y = (velocity.y * 0.5) - 300;
keepInScene = false;
var _local3;
_local3 = world.collections.fuel;
var _local2 = _local3.length;
while (_local2-- , _local2 > -1) {
_local3[_local2].setActive(false);
}
var _local4 = new SSParticle(assetID, 4, new Vector(velocity.x * 0.75, velocity.y * 0.75, -160), ((velocity.x < 0) ? -45 : 45), 600);
_local4.alpha = false;
_local4.x = x;
_local4.y = y;
world.addObject(_local4);
_local4.target.a._xscale = _local4.target.a._xscale * ((velocity.x < 0) ? -1 : 1);
moveTo(originX, originY, 0);
canTake = true;
}
function onUpdate(elapsed) {
fuel = (controller.fuel = Math.max(Math.min(fuel - (elapsed * fuelBurnRate), 1), 0));
if ((!fuel) || (controller.action)) {
controller.setControl(owner);
}
}
function hurt() {
}
function updateDisplay(elapsed, vX, vY, kJump) {
if (vX != oldDX) {
oldDX = vX;
snd.stop();
snd.attachSound((vX ? "ATVRevved" : "ATVIdle"));
snd.start(0, 1048575);
}
if ((dispCanTurn && (vX)) && (vX != dispAxis)) {
directionX = (dispTurn = vX);
if (jumpTime && ((skidTime + 0.5) < world.time)) {
skidTime = world.time;
GameSound.playSound("skid");
}
}
if (contactSurface && ((contactSurface.props & 3) == 3)) {
target._rotation = (Math.atan2(contactSurface.normal.x, -contactSurface.normal.y) / Math.PI) * 180;
} else {
target._rotation = target._rotation + ((((((Math.atan2(velocity.y, velocity.x * dispAxis) / Math.PI) * 45) * dispAxis) - target._rotation) * elapsed) * 2);
}
var _local4 = (velocity.__get__length() * elapsed) * 2;
target.a.mc.frontRim._rotation = (target.a.mc.rearRim._rotation = target.a.mc.rearRim._rotation + _local4);
if (dispStateChanged || (dispTurn)) {
if (dispTurn) {
if (dispTurn > 0) {
if (((dispAxis = Math.min(1, (dispAxis = dispAxis + ((elapsed * 2) / dispTurnTime))))) == 1) {
dispTurn = 0;
}
} else if (((dispAxis = Math.max(-1, (dispAxis = dispAxis - ((elapsed * 2) / dispTurnTime))))) == -1) {
dispTurn = 0;
}
}
dispFrame = (dispTurnFrames + Math.round(dispAxis * dispTurnFrames)) + 1;
target.a.gotoAndStop(dispFrame);
}
dispStateChanged = false;
}
function onAddDisplay() {
initColor();
target.gotoAndStop(1);
buildAnimationData();
}
function setDead(obj) {
owner.health = (controller.health = 0.01);
controller.setControl(owner);
owner.velocity.x = velocity.x;
owner.velocity.y = velocity.y - 800;
}
function endLevel(obj) {
controller.setControl(owner);
owner.velocity.x = velocity.x * 0.5;
owner.velocity.y = velocity.y * 0.5;
owner.endLevel(obj);
}
var classID = SSGlobal.CLSID_VEHICLE;
var assetID = "ATV";
var canTake = true;
var maxWalkForce = 2400;
var animationLabels = ["static", "idle"];
var canCarry = false;
var canClimb = false;
var canSwing = false;
var canLockDisplayState = false;
var fuel = 1;
var fuelBurnRate = 0.06666;
var skidTime = 0;
var oldDX = 0;
var editor_isItem = true;
var editor_name = "ATV";
}
Symbol 959 MovieClip [__Packages.WalkingObject] Frame 0
class WalkingObject extends SSObject
{
var getUpdates, exitedSceneAt, world, target, currentAnimation, cancelUpdates, velocity, contact, y, x, radius, moveBy, angle, checkCollisions, motionDir;
function WalkingObject () {
super();
}
function onAddToScene() {
getUpdates();
if (immobilized) {
immobilized = Math.max(immobilized - (world.time - exitedSceneAt), 0);
}
if (immobilized) {
target.gotoAndStop(currentAnimation);
} else {
resetAnimation();
}
}
function onRemoveFromScene() {
cancelUpdates();
exitedSceneAt = world.time;
}
function immobilize() {
velocity.y = -300;
velocity.x = 0;
contact = null;
GameSound.playSound("enemyhit");
setAnimation("Immobile" + (walkLeft ? "Left" : "Right"));
immobilized = immobilizeTime;
}
function setAnimation(anim) {
target.gotoAndStop((currentAnimation = anim));
}
function resetAnimation() {
setAnimation("Walk" + (walkLeft ? "Left" : "Right"));
}
function onCollision(obj) {
if ((obj.classID & 4294901760) == SSGlobal.CLSID_MAINCHAR) {
if (immobilized) {
return(undefined);
}
if ((obj.classID == SSGlobal.CLSID_VEHICLE) || (obj.shield)) {
if (obj.active) {
immobilize();
}
return(undefined);
}
if (!obj.active) {
return(undefined);
}
if ((!obj.jumpTime) && (obj.y < y)) {
immobilize();
obj.velocity.x = obj.velocity.x * 1.1;
obj.velocity.y = obj.velocity.y * -0.5;
} else if (!obj.immune) {
var _local3;
obj.shiftHealth(healthValue, this);
if ((walkLeft && (obj.x < x)) || ((!walkLeft) && (obj.x > x))) {
flip();
}
}
return(true);
}
}
function checkIfOnEdge(e) {
var _local8 = e.a;
var _local2 = e.normal;
var _local3 = contact.direction;
var _local5 = this;
var _local6 = (((_local2.x * (_local5.x - (_local2.x * radius))) + (_local2.y * (_local5.y - (_local2.y * radius)))) - ((_local2.x * (_local8.x + contact.shape.x)) + (_local2.y * (_local8.y + contact.shape.y)))) / (-((_local2.x * _local3.x) + (_local2.y * _local3.y)));
if ((_local6 * (walkLeft ? -1 : 1)) < (((e.props & 3) == 3) ? 0 : (radius * 2))) {
if ((e.props & 3) == 3) {
var _local7 = Math.abs(_local6);
moveBy(_local7 * _local3.x, _local7 * _local3.y, 0);
contact = e;
} else {
flip();
}
target._rotation = (angle = (Math.atan2(contact.normal.x, -contact.normal.y) / Math.PI) * 180);
}
}
function flip() {
walkLeft = !walkLeft;
resetAnimation();
}
function update(elapsed) {
if (immobilized) {
if (!((immobilized = Math.max(0, immobilized - elapsed)))) {
contact = null;
velocity.y = -200;
setAnimation("restore" + (walkLeft ? "Left" : "Right"));
}
}
if (contact) {
if (immobilized) {
velocity.x = (velocity.y = 0);
} else {
velocity.x = (contact.direction.x * speed) * (walkLeft ? -1 : 1);
velocity.y = (contact.direction.y * speed) * (walkLeft ? -1 : 1);
}
checkIfOnEdge((walkLeft ? (contact.previous) : (contact.next)));
} else {
velocity.y = velocity.y + (gravity * elapsed);
}
collision = false;
checkCollisions(elapsed);
if (!collision) {
moveBy(velocity.x * elapsed, velocity.y * elapsed, 0);
}
}
function setContact(edge) {
contact = edge;
}
function checkCollision(obj) {
var _local2;
switch (obj.classID & 4294901760) {
case SSGlobal.CLSID_SHAPE :
if ((!contact) && (_local2 = SSCollision.sweepSphereToStaticShape(this, obj))) {
var _local4 = velocity.__get__length();
var _local5 = motionDir.dot(_local2.normal);
setContact(_local2.edge);
x = _local2.point.x;
y = _local2.point.y;
collision = true;
}
break;
case SSGlobal.CLSID_MAINCHAR :
if (!SSCollision.sweepSphereToSphere(this, obj, true)) {
break;
}
return(onCollision(obj));
}
}
var classID = SSGlobal.CLSID_MOBILEOBJECT;
var collisionMask = SSGlobal.CLSID_SHAPE | SSGlobal.CLSID_MAINCHAR;
var assetID = "WalkingObject";
var gravity = SSGlobal.GRAVITY;
var walkLeft = true;
var healthValue = -0.2;
var speed = 50;
var immobilized = 0;
var immobilizeTime = 5;
var strength = 250;
var maxWalkableAngle = 0.4;
var collision = false;
var editor_isItem = true;
var editor_name = "WalkingObject";
var editor_args_names = ["walkLeft"];
var editor_args_values = [WalkingObject.prototype.walkLeft];
var editor_args_types = ["boolean"];
var editor_args_options = [null];
var editor_args_descriptions = [""];
var editor_args_mode = [0];
var editor_args_component = ["CheckBox"];
}
Symbol 960 MovieClip [__Packages.FlyingObject] Frame 0
class FlyingObject extends SSObject
{
var originX, x, originY, y, getUpdates, snd, target, cancelUpdates, moveTo, world, z, destX, destY, velocity, moveBy, removeFromScene, inScene, radius;
function FlyingObject (offsetX, offsetY) {
super();
if (offsetX != null) {
this.offsetX = offsetX;
}
if (offsetY != null) {
this.offsetY = offsetY;
}
}
function onAddToWorld() {
originX = x;
originY = y;
nextDest(originX + offsetX, originY + offsetY);
}
function onAddToScene() {
getUpdates();
if (offsetX || (offsetY)) {
update = update_motion;
} else {
delete update;
}
if (waitTime) {
syncTime();
}
soundOn = false;
snd = new Sound(target);
snd.attachSound("jet");
}
function onRemoveDisplay() {
soundOn = false;
snd.stop();
snd = null;
}
function onRemoveFromScene() {
cancelUpdates();
if (immobilized) {
immobilized = 0;
moveTo(originX, originY, 0);
stage = 0;
}
}
function update(elapsed) {
if (world.time > (pLast + 0.1)) {
dropParticle("Smoke", x + 30, y, z, 0, 100, -10);
}
adjustSound();
}
function adjustSound() {
var _local2 = world.viewport;
var _local4 = (target._x - _local2.x) - _local2.halfWidth;
var _local5 = (target._y - _local2.y) - _local2.halfHeight;
var _local3 = 1 - (((_local4 * _local4) + (_local5 * _local5)) / 250000);
if (_local3 > 0) {
if (!soundOn) {
snd.start(0, 1048575);
soundOn = true;
}
snd.setVolume(Math.floor(_local3 * 100));
snd.setPan(Math.round((_local4 / 500) * 100));
} else if (soundOn) {
snd.stop();
soundOn = false;
}
}
function syncTime() {
waitTime = waitSyncTime - ((world.time + waitOffset) % waitSyncTime);
}
function nextDest() {
if ((stage = !stage)) {
destX = originX + offsetX;
destY = originY + offsetY;
} else {
destX = originX;
destY = originY;
}
var _local4 = destX - x;
var _local3 = destY - y;
var _local2 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local2 > 0.0001) {
dirX = _local4 / _local2;
dirY = _local3 / _local2;
} else {
dirX = 0;
dirY = 0;
}
}
function update_motion(elapsed) {
if (waitTime) {
if (((waitTime = waitTime - elapsed)) <= 0) {
waitTime = 0;
nextDest();
}
} else {
var _local5 = destX - x;
var _local4 = destY - y;
var _local3 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
var _local2 = Math.sqrt((velocity.x * velocity.x) + (velocity.y * velocity.y));
if (_local2 < _local3) {
if (_local2 < maxSpeed) {
_local2 = _local2 + (maxSpeed * elapsed);
if (_local2 < maxSpeed) {
velocity.x = _local2 * dirX;
velocity.y = _local2 * dirY;
} else {
velocity.x = maxSpeed * dirX;
velocity.y = maxSpeed * dirY;
}
}
} else if (_local3 > 10) {
velocity.x = dirX * _local3;
velocity.y = dirY * _local3;
} else {
syncTime();
}
moveBy(velocity.x * elapsed, velocity.y * elapsed, 0);
}
adjustSound();
if (world.time > (pLast + 0.1)) {
dropParticle("Smoke", x + 30, y, z, 0, 100, -10);
}
}
function dropParticle(asset, x, y, z, vx, vy, vz) {
var _local2 = new SSParticle(asset, 1, new Vector(vx, vy, vz), 180);
_local2.x = x;
_local2.y = y;
_local2.z = z;
world.addObject(_local2);
pLast = world.time;
}
function immobilize() {
update = update_immobile;
velocity.y = 0;
GameSound.playSound("enemyhit");
zDir = (random(2) ? -150 : 150);
immobilized = 10;
}
function update_immobile(elapsed) {
var _local5 = (target._rotation = target._rotation - (480 * elapsed));
var _local2 = _local5 * 0.0174532925199433 /* Math.PI/180 */;
var _local6 = Math.cos(_local2);
var _local4 = Math.sin(_local2);
velocity.y = velocity.y + ((SSGlobal.GRAVITY * elapsed) * 0.25);
moveBy(0, velocity.y * elapsed, zDir * elapsed);
snd.setVolume(Math.max((1 - Math.abs(z / 300)) * 100, 0));
if (z < -300) {
removeFromScene();
}
if (world.time > (pLast + 0.1)) {
dropParticle("Smoke", x + (30 * _local6), y + (30 * _local4), z, 0, 100, -10);
}
}
function onCollision(obj) {
if (immobilized || (!inScene)) {
return(undefined);
}
if ((obj.classID & 4294901760) == SSGlobal.CLSID_MAINCHAR) {
if ((obj.classID == SSGlobal.CLSID_VEHICLE) || (obj.y < (y - (radius * 0.25)))) {
immobilize();
obj.velocity.x = obj.velocity.x * 1.1;
obj.velocity.y = obj.velocity.y * -0.5;
} else {
obj.shiftHealth(healthValue, this);
}
}
}
function editor_onDisplay(target, external) {
target.clear();
target.lineStyle(0, 16776960);
target.lineTo(offsetX, offsetY);
}
var classID = SSGlobal.CLSID_MOBILEOBJECT;
var collisionMask = SSGlobal.CLSID_MAINCHAR;
var healthValue = -0.2;
var assetID = "FlyingObject";
var immobilized = 0;
var travelSpeed = 400;
var stage = 0;
var dirX = 0;
var dirY = 0;
var soundOn = false;
var maxSpeed = 100;
var pLast = 0;
var zDir = 0;
var waitTime = 1;
var waitSyncTime = 8;
var waitOffset = 0;
var offsetX = 0;
var offsetY = 0;
var editor_isItem = true;
var editor_name = "FlyingObject";
var editor_args_names = ["offsetX", "offsetY", "waitSyncTime"];
var editor_args_values = [FlyingObject.prototype.offsetX, FlyingObject.prototype.offsetY, FlyingObject.prototype.waitSyncTime];
var editor_args_types = ["number", "number", "number"];
var editor_args_options = [[-1000, 1000, 25], [-1000, 1000, 25], [1, 10, 0.5]];
var editor_args_descriptions = ["", "", ""];
var editor_args_mode = [0, 0, 0];
var editor_args_component = ["NumericStepper", "NumericStepper", "NumericStepper"];
}
Symbol 961 MovieClip [__Packages.RopeObject] Frame 0
class RopeObject extends CommandBox
{
var localBottom, init, target, width, height;
function RopeObject (h) {
super();
if (h) {
localBottom = h;
}
init(SSZone.RECT, new Vector(localRight, localBottom, 0));
}
function onAddDisplay() {
target.beginFill(13333275);
target.moveTo(8, 0);
target.lineTo(8, localBottom);
target.lineTo(12, localBottom);
target.lineTo(12, 0);
target.endFill();
}
function editor_onDisplay(target, external) {
target.createTextField("t", 20, 0, 0, 100, 48);
var _local3 = target.t;
var _local4 = _local3.getNewTextFormat();
_local4.size = 20;
_local4.color = 16777215 /* 0xFFFFFF */;
_local4.font = "_sans";
_local3.setNewTextFormat(_local4);
_local3.selectable = false;
_local3.text = "Command:\n" + command;
target.clear();
target.lineStyle(0, 16742348);
target.beginFill(16742348, 80);
target.lineTo(width, 0);
target.lineTo(width, height);
target.lineTo(0, height);
target.lineTo(0, 0);
target.endFill();
}
var exitTime = 0;
var assetID = null;
var localRight = 20;
var command = "climb";
var editor_isItem = true;
var editor_name = "Rope";
var editor_args_names = ["height"];
var editor_args_values = [CommandBox.prototype.localBottom];
var editor_args_types = ["number"];
var editor_args_options = [[100, 4000, 10]];
var editor_args_descriptions = [""];
var editor_args_mode = [0];
var editor_args_component = ["NumericStepper"];
var editor_canChangeFrame = false;
var editor_canChangeAsset = false;
var editor_canChangeLayer = true;
}
Symbol 962 MovieClip [__Packages.GameContainer] Frame 0
class GameContainer extends SSObject
{
var contents, x, y, velocity, checkCollisions, moveBy, motionTime, inMotion, cancelUpdates, world, z;
function GameContainer (contents) {
super();
this.contents = contents;
}
function onCollision(obj) {
if (obj.classID == SSGlobal.CLSID_VEHICLE) {
shatter();
return(undefined);
}
if (beingCarried) {
return(undefined);
}
obj.lastContainer = this;
}
function updatePosition(elapsed) {
var _local3 = x;
var _local2 = y;
velocity.y = velocity.y + (SSGlobal.GRAVITY * elapsed);
checkCollisions(elapsed);
moveBy(velocity.x * motionTime, velocity.y * motionTime, 0);
if ((Math.abs(_local3 - x) < 0.5) && (Math.abs(_local2 - y) < 0.5)) {
x = _local3;
y = _local2;
if (((inMotion = inMotion - elapsed)) <= 0) {
cancelUpdates();
velocity.loc(0, 0, 0);
}
}
}
function checkCollision(obj) {
if (!obj.inScene) {
return(undefined);
}
var _local3;
switch (obj.classID & 4294901760) {
case SSGlobal.CLSID_SHAPE :
_local3 = SSCollision.sweepSphereToStaticShape(this, obj);
if (_local3) {
shatter();
}
break;
default :
if (!SSCollision.sweepSphereToSphere(this, obj, true)) {
break;
}
shatter(obj);
obj.immobilize();
}
}
function shatter() {
GameSound.playSound("shatter");
if (contents) {
var _local2 = new this.contents();
_local2.x = x;
_local2.y = y;
world.addObject(_local2);
_local2.addToScene();
}
dropParticle("vase0", x, y, z, velocity.x - 100, -200, -350, -180, 4);
dropParticle("vase1", x, y, z, velocity.x + 100, -200, -350, 180, 4);
dropParticle("vase2", x, y, z, velocity.x - 100, -100, -200, -180, 4);
dropParticle("vase3", x, y, z, velocity.x + 100, -100, -200, 180, 4);
world.removeObject(this);
}
function dropParticle(asset, x, y, z, vx, vy, vz, r, t) {
var _local2 = new SSParticle(asset, t, new Vector(vx, vy, vz), r, SSGlobal.GRAVITY);
_local2.x = x;
_local2.y = y;
_local2.z = z;
world.addObject(_local2);
}
var classID = SSGlobal.CLSID_CONTAINER;
var collisionMask = (SSGlobal.CLSID_SHAPE | SSGlobal.CLSID_MOBILEOBJECT) | SSGlobal.CLSID_OBJECT;
var assetID = "Vase";
var beingCarried = false;
var editor_isItem = true;
var editor_name = "Vase";
var editor_args_names = ["contents"];
var editor_args_values = [((GameContainer.prototype.contents != null) ? (GameContainer.prototype.contents) : "")];
var editor_args_types = ["string"];
var editor_args_options = ["A-Za-z"];
var editor_args_descriptions = [""];
var editor_args_mode = [0];
var editor_args_component = ["TextInput"];
}
Symbol 963 MovieClip [__Packages.GameBigPoint] Frame 0
class GameBigPoint extends GamePoint
{
function GameBigPoint () {
super();
}
var value = 100;
var assetID = "BigPoint";
var editor_isItem = true;
var editor_name = "BigPoint";
}
Symbol 964 MovieClip [__Packages.GameHealthBig] Frame 0
class GameHealthBig extends GameHealth
{
function GameHealthBig () {
super();
}
var assetID = "BigHealth";
var value = 1;
var editor_name = "GameHealthBig";
}
Symbol 965 MovieClip [__Packages.RollingObject] Frame 0
class RollingObject extends SSObject
{
var originX, x, originY, y, velocity, getUpdates, cancelUpdates, moveTo, checkCollisions, moveBy, motionTime, inScene, world, removeFromScene;
function RollingObject () {
super();
}
function onAddToWorld() {
originX = x;
originY = y;
}
function onAddToScene() {
velocity.x = (velocity.y = 0);
getUpdates();
}
function onRemoveFromScene() {
cancelUpdates();
moveTo(originX, originY, 0);
contact = null;
}
function update(elapsed) {
if (!contact) {
}
velocity.y = velocity.y + (gravity * elapsed);
collision = false;
checkCollisions(elapsed);
moveBy(velocity.x * elapsed, velocity.y * elapsed, 0);
}
function setContact(edge) {
contact = edge;
}
function checkCollision(obj) {
var _local2;
switch (obj.classID & 4294901760) {
case SSGlobal.CLSID_SHAPE :
if ((!contact) && (_local2 = SSCollision.sweepSphereToStaticShape(this, obj))) {
var _local11 = velocity.__get__length();
var _local8 = (_local2.normal.x * velocity.x) + (_local2.normal.y * velocity.y);
var _local6 = _local8 * _local2.normal.x;
var _local5 = _local8 * _local2.normal.y;
var _local10 = velocity.x - _local6;
var _local9 = velocity.y - _local5;
var _local3;
_local3 = _local2.edge.attributes.bounciness;
if (!_local3) {
_local3 = 0;
}
velocity.x = _local10 - (_local3 * _local6);
velocity.y = _local9 - (_local3 * _local5);
var _local7 = motionTime - _local2.time;
moveTo((_local2.point.x + (_local2.edge.normal.x * 1)) + (velocity.x * _local7), (_local2.point.y + (_local2.edge.normal.y * 1)) + (velocity.y * _local7), 0);
collision = true;
}
break;
case SSGlobal.CLSID_MAINCHAR :
if (!SSCollision.sweepSphereToSphere(this, obj, true)) {
break;
}
return(onCollision(obj));
}
}
function onCollision(obj) {
if (!inScene) {
return(undefined);
}
if (obj.active && ((obj.classID & 4294901760) == SSGlobal.CLSID_MAINCHAR)) {
obj.shiftHealth(healthValue, this);
var _local2 = new SSParticle(assetID, 4, new Vector(obj.velocity.x * 0.5, velocity.y * 0.5, -300), 45, SSGlobal.GRAVITY);
_local2.alpha = false;
_local2.x = x;
_local2.y = y;
world.addObject(_local2);
removeFromScene();
}
}
var classID = SSGlobal.CLSID_MOBILEOBJECT;
var collisionMask = SSGlobal.CLSID_SHAPE | SSGlobal.CLSID_MAINCHAR;
var assetID = "Log";
var healthValue = -0.1;
var minVelocity = 0;
var gravity = SSGlobal.GRAVITY;
var contact = false;
var collision = false;
var editor_isItem = true;
var editor_name = "RollingObject";
var editor_args_names = ["healthValue"];
var editor_args_values = [RollingObject.prototype.healthValue];
var editor_args_types = ["number"];
var editor_args_options = [[-1, 1, 0.01]];
var editor_args_descriptions = [""];
var editor_args_mode = [0];
var editor_args_component = ["NumericStepper"];
}
Symbol 966 MovieClip [__Packages.BouncingObject] Frame 0
class BouncingObject extends SSObject
{
var originX, x, originY, y, target, velocity, getUpdates, cancelUpdates, moveTo, contact, checkCollisions, moveBy, inScene;
function BouncingObject () {
super();
}
function onAddToWorld() {
originX = x;
originY = y;
}
function onAddToScene() {
target.gotoAndStop(currentAnimation);
velocity.x = (velocity.y = 0);
getUpdates();
}
function onRemoveFromScene() {
cancelUpdates();
moveTo(originX, originY, 0);
contact = null;
}
function update(elapsed) {
if (immobilized) {
if (!((immobilized = Math.max(immobilized - elapsed, 0)))) {
setAnimation("restore");
}
}
if (!contact) {
velocity.y = velocity.y + (gravity * elapsed);
collision = false;
checkCollisions(elapsed);
moveBy(velocity.x * elapsed, velocity.y * elapsed, 0);
} else if ((!immobilized) && (((contactTime = Math.max(contactTime - elapsed, 0))) == 0)) {
velocity.y = -jumpStrength;
setAnimation("jump");
GameSound.playSound("spring");
contact = null;
}
}
function setContact(edge) {
contact = edge;
contactTime = contactTimeAllow;
}
function checkCollision(obj) {
var _local3;
switch (obj.classID & 4294901760) {
case SSGlobal.CLSID_SHAPE :
if ((!contact) && (_local3 = SSCollision.sweepSphereToStaticShape(this, obj))) {
var _local4 = velocity.__get__length();
if (!immobilized) {
setAnimation("still");
}
setContact(_local3.edge);
velocity.x = 0;
velocity.y = 0;
collision = true;
}
break;
case SSGlobal.CLSID_MAINCHAR :
if (!SSCollision.sweepSphereToSphere(this, obj, true)) {
break;
}
return(onCollision(obj));
}
}
function immobilize() {
velocity.y = -100;
velocity.x = 0;
contact = null;
GameSound.playSound("enemyhit");
setAnimation("Immobile");
immobilized = immobilizeTime;
}
function setAnimation(anim) {
target.gotoAndStop((currentAnimation = anim));
}
function onCollision(obj) {
if ((!inScene) || (immobilized)) {
return(undefined);
}
if (obj.active && ((obj.classID & 4294901760) == SSGlobal.CLSID_MAINCHAR)) {
if (((obj.classID == SSGlobal.CLSID_VEHICLE) || (obj.shield)) || ((obj.y < y) && (obj.velocity.y >= 0))) {
immobilize();
obj.velocity.y = obj.velocity.y * -0.5;
obj.velocity.x = obj.velocity.x * 1.1;
} else if (!immobilized) {
obj.shiftHealth(healthValue, this);
}
}
}
var assetID = "Spider";
var healthValue = -0.2;
var classID = SSGlobal.CLSID_MOBILEOBJECT;
var collisionMask = SSGlobal.CLSID_SHAPE | SSGlobal.CLSID_MAINCHAR;
var jumpStrength = 300;
var gravity = SSGlobal.GRAVITY * 0.5;
var vulnerable = false;
var contactTimeAllow = 1;
var contactTime = 0;
var collision = false;
var immobilized = 0;
var immobilizeTime = 5;
var currentAnimation = 1;
var editor_isItem = true;
var editor_name = "BouncingObject";
var editor_args_names = ["healthValue", "jumpStrength"];
var editor_args_values = [BouncingObject.prototype.healthValue, BouncingObject.prototype.jumpStrength];
var editor_args_types = ["number", "number"];
var editor_args_options = [[-1, 1, 0.01], [0, 600, 50]];
var editor_args_descriptions = ["", ""];
var editor_args_mode = [0, 0];
var editor_args_component = ["NumericStepper", "NumericStepper"];
}
Symbol 967 MovieClip [__Packages.JumpingFish] Frame 0
class JumpingFish extends SSObject
{
var getUpdates, launchY, y, target, world, cancelUpdates, velocity, moveBy, checkCollisions, x, radius;
function JumpingFish (jumpStrength, waitSyncTime, waitOffset) {
super();
if (jumpStrength != null) {
this.jumpStrength = jumpStrength;
}
if (waitSyncTime != null) {
this.waitSyncTime = waitSyncTime;
}
if (waitOffset != null) {
this.waitOffset = waitOffset;
}
}
function onAddToWorld() {
}
function onAddToScene() {
getUpdates();
if (launchY) {
y = launchY;
syncTime();
target._visible = false;
}
if (immobilized) {
immobilized = Math.max(immobilized - (world.time - exitedSceneAt), 0);
}
}
function syncTime() {
waitTime = waitSyncTime - ((world.time + waitOffset) % waitSyncTime);
}
function onRemoveFromScene() {
cancelUpdates();
exitedSceneAt = world.time;
}
function update(elapsed) {
if (waitTime) {
if (immobilized) {
if (!((immobilized = Math.max(immobilized - elapsed, 0)))) {
syncTime();
} else {
return(undefined);
}
}
var _local3 = waitTime;
if (((waitTime = waitTime - elapsed)) <= 0) {
waitTime = 0;
y = launchY;
velocity.y = -jumpStrength;
target._rotation = 90;
splash();
target._visible = true;
}
} else {
velocity.y = velocity.y + (gravity * elapsed);
moveBy(0, velocity.y * elapsed, 0);
checkCollisions(elapsed);
if (((velocity.y > 0) && (launchY)) && (y > launchY)) {
velocity.y = 0;
syncTime();
target._visible = false;
splash();
} else {
target._rotation = target._rotation + ((((velocity.y > 0) ? -180 : 90) - target._rotation) * elapsed);
}
}
}
function splash() {
var _local2 = new SSParticle("splash", 2, new Vector(0, 0, 0));
GameSound.playSound("splash");
_local2.x = x;
_local2.y = launchY + radius;
world.addObject(_local2);
}
function checkCollision(obj) {
var _local3;
switch (obj.classID & 4294901760) {
case SSGlobal.CLSID_SHAPE :
if (((launchY == null) && (_local3 = SSCollision.sweepSphereToStaticShape(this, obj))) && (_local3.edge.attributes.water)) {
collisionMask = SSGlobal.CLSID_MAINCHAR;
launchY = _local3.point.y;
}
break;
case SSGlobal.CLSID_MAINCHAR :
if (!SSCollision.sweepSphereToSphere(this, obj, true)) {
break;
}
return(onCollision(obj));
}
}
function onCollision(obj) {
if (waitTime || (immobilized)) {
return(undefined);
}
if ((obj.classID & 4294901760) == SSGlobal.CLSID_MAINCHAR) {
if (obj.shield || (obj.classID == SSGlobal.CLSID_VEHICLE)) {
immobilize();
} else {
obj.shiftHealth(healthValue, this);
}
}
}
function immobilize(obj) {
velocity.y = -200;
immobilized = immobilizeTime;
}
var classID = SSGlobal.CLSID_MOBILEOBJECT;
var collisionMask = SSGlobal.CLSID_SHAPE | SSGlobal.CLSID_MAINCHAR;
var assetID = "JumpingFish";
var waitOffset = 0;
var jumpStrength = 500;
var waitSyncTime = 4;
var exitedSceneAt = 0;
var immobilizeTime = 5;
var gravity = SSGlobal.GRAVITY;
var waitTime = 0;
var healthValue = -0.2;
var collision = false;
var immobilized = 0;
var editor_isItem = true;
var editor_name = "JumpingFish";
var editor_args_names = ["jumpStrength", "waitSyncTime", "waitOffset"];
var editor_args_values = [JumpingFish.prototype.jumpStrength, JumpingFish.prototype.waitSyncTime, JumpingFish.prototype.waitOffset];
var editor_args_types = ["number", "number", "number"];
var editor_args_options = [[100, 1000, 50], [0, 15, 0.1], [-5, 5, 0.1]];
var editor_args_descriptions = ["", "", ""];
var editor_args_mode = [0, 0, 0];
var editor_args_component = ["NumericStepper", "NumericStepper", "NumericStepper"];
}
Symbol 968 MovieClip [__Packages.GameFuel] Frame 0
class GameFuel extends GameCollectable
{
var world, target;
function GameFuel () {
super();
}
function onAddToWorld() {
world.addToCollection("fuel", this);
}
function onAddToScene() {
if ((!active) || (collected)) {
target._visible = false;
}
}
function setActive(b) {
if ((active = b)) {
collected = false;
target._visible = true;
} else {
collected = true;
target._visible = false;
}
}
function setCollected(obj) {
if ((active && (!collected)) && (obj.classID == SSGlobal.CLSID_VEHICLE)) {
obj.shiftFuel(value);
active = false;
collected = true;
target._visible = false;
}
}
var assetID = "Fuel";
var value = 1;
var active = false;
var collected = false;
var editor_isItem = true;
var editor_name = "Fuel";
}
Symbol 969 MovieClip [__Packages.GameSwing] Frame 0
class GameSwing extends SSObject
{
var localLeft, localBottom, localRight, zone, getUpdates, cancelUpdates, world, oax, oay, queueForDisplay, target, holding, x, y;
function GameSwing (totalTime, timeOffset, length, maxAngle) {
super();
if (totalTime) {
this.totalTime = totalTime;
}
if (timeOffset) {
this.timeOffset = timeOffset;
}
if (length) {
this.length = length;
}
if (maxAngle) {
this.maxAngle = maxAngle;
}
localLeft = -this.length;
localBottom = (localRight = this.length);
maxRad = (maxAngle / 180) * Math.PI;
}
function onAddToWorld() {
zone = new SSZone();
}
function onAddToScene() {
getUpdates();
update(0.0001);
}
function onRemoveFromScene() {
cancelUpdates();
}
function update() {
var _local3 = (world.time + timeOffset) % totalTime;
var _local4 = ((Math.PI * _local3) / totalTime) * 2;
var _local2 = (Math.sin(_local4) * Math.PI) * (maxAngle / 180);
ltr = _local2 > ang;
ang = _local2;
oax = ax;
oay = ay;
ax = ((vx = Math.sin(_local2))) * length;
ay = ((vy = Math.cos(_local2))) * length;
queueForDisplay();
}
function onCollision(obj) {
}
function onDisplay(vp, elapsed) {
target.clear();
target.lineStyle(4, 13333275);
target.moveTo(0, 0);
if (holding) {
var _local4 = holding.swingDist * 0.5;
target.curveTo(vx * _local4, vy * _local4, holding.x - x, holding.y - y);
var _local3 = oax - ax;
var _local2 = oay - ay;
var _local6 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
target.lineTo(ax + ((_local3 / elapsed) * 0.1), ay + ((_local2 / elapsed) * 0.1));
} else {
target.curveTo(ax * 0.4, ay * 0.6, ax, ay);
}
}
function editor_onDisplay(target, external) {
var _local2 = ((90 - maxAngle) / 180) * Math.PI;
var _local7 = Math.cos(_local2);
var _local6 = Math.sin(_local2);
target.clear();
target.lineStyle(0, 16742348);
target.beginFill(16742348, 30);
target.lineTo(_local7 * length, _local6 * length);
var _local4 = ((Math.PI/2) - _local2) * 0.2;
var _local5 = 10;
while (_local5-- , _local5 > -1) {
_local2 = _local2 + _local4;
target.lineTo(Math.cos(_local2) * length, Math.sin(_local2) * length);
}
target.lineTo(0, 0);
target.endFill();
}
var classID = SSGlobal.CLSID_SWING;
var length = 300;
var totalTime = 4;
var timeOffset = 0;
var maxAngle = 60;
var maxRad = 0;
var ax = 0;
var ay = 0;
var vx = 0;
var vy = 0;
var ltr = false;
var ang = 0;
var editor_isItem = true;
var editor_name = "Swing";
var editor_args_names = ["totalTime", "timeOffset", "length", "maxAngle"];
var editor_args_values = [GameSwing.prototype.totalTime, GameSwing.prototype.timeOffset, GameSwing.prototype.length, GameSwing.prototype.maxAngle];
var editor_args_types = ["number", "number", "number", "number"];
var editor_args_options = [[1, 30, 1], [0, 10, 0.1], [100, 800, 50], [10, 90, 5]];
var editor_args_descriptions = ["", "", "", ""];
var editor_args_mode = [0, 0, 0];
var editor_args_component = ["NumericStepper", "NumericStepper", "NumericStepper", "NumericStepper"];
var editor_canChangeFrame = false;
}
Symbol 970 MovieClip [__Packages.VR_HiddenPlatform] Frame 0
class VR_HiddenPlatform extends GameCollectable
{
static var activeObj, activeTime;
var world, target, inScene, getUpdates, keepInScene, cancelUpdates;
function VR_HiddenPlatform (time) {
super();
if (time != null) {
totalTime = time;
}
}
function onAddToWorld() {
if (!_global.VR_ON_PLATFORMS) {
world.removeObject(this);
return(undefined);
}
world.addToCollection("platforms", this);
}
function onAddDisplay() {
if (collected) {
target._visible = false;
}
}
function reset() {
collected = false;
if (inScene) {
target._visible = true;
}
}
function setCollected(obj) {
if (collected) {
return(undefined);
}
if (!activeObj) {
activeObj = this;
getUpdates();
var _local3;
_local3 = world.collections.VR;
var _local2 = _local3.length;
while (_local2-- , _local2 > -1) {
_local3[_local2].disabled = false;
_local3[_local2].target._visible = true;
}
}
target._visible = false;
collected = true;
activeTime = totalTime;
GameSound.playSound("vr");
keepInScene = true;
getUpdates();
}
function update(elapsed) {
activeTime = Math.max(activeTime - elapsed, 0);
if (!activeTime) {
cancelUpdates();
activeObj = null;
keepInScene = false;
var _local3;
_local3 = world.collections.VR;
var _local2 = _local3.length;
while (_local2-- , _local2 > -1) {
_local3[_local2].disabled = true;
_local3[_local2].target._visible = false;
}
_local3 = world.collections.platforms;
_local2 = _local3.length;
while (_local2-- , _local2 > -1) {
_local3[_local2].reset();
}
}
}
var assetID = "PlatformToken";
var collected = false;
var totalTime = 20;
var editor_isItem = true;
var editor_name = "VRHiddenPlatform";
var editor_args_names = ["totalTime"];
var editor_args_values = [VR_HiddenPlatform.prototype.totalTime];
var editor_args_types = ["number"];
var editor_args_options = [[10, 60, 5]];
var editor_args_descriptions = [""];
var editor_args_mode = [0];
var editor_args_component = ["NumericStepper"];
}
Symbol 971 MovieClip [__Packages.VR_EMP] Frame 0
class VR_EMP extends GameCollectable
{
var world, collected;
function VR_EMP () {
super();
}
function onAddToWorld() {
if (!_global.VR_ON_EMP) {
world.removeObject(this);
return(undefined);
}
}
function setCollected(obj) {
if (collected) {
return(undefined);
}
collected = true;
obj.emp = true;
var _local3;
_local3 = world.activeObjects;
var _local2 = _local3.length;
while (_local2-- , _local2 > -1) {
_local3[_local2].immobilize();
_local3[_local2].immobilized = 2;
}
GameSound.playSound("vr");
world.removeObject(this);
}
var assetID = "EMP";
var editor_isItem = true;
var editor_name = "VR_EMP";
}
Symbol 972 MovieClip [__Packages.VR_Shield] Frame 0
class VR_Shield extends GameCollectable
{
var world, collected;
function VR_Shield () {
super();
}
function onAddToWorld() {
if (!_global.VR_ON_SHIELD) {
world.removeObject(this);
return(undefined);
}
}
function setCollected(obj) {
if (collected) {
return(undefined);
}
GameSound.playSound("vr");
obj.shiftShield(value);
world.removeObject(this);
}
var assetID = "Shield";
var value = 30;
var editor_isItem = true;
var editor_name = "VRShield";
}
Symbol 973 MovieClip [__Packages.MessageBox] Frame 0
class MessageBox extends SSObject
{
var world;
function MessageBox (message) {
super();
if (message != null) {
this.message = message;
}
}
function onCollision(obj) {
show();
}
function show() {
if (showTime && ((showTime + 2) > world.time)) {
return(undefined);
}
showTime = world.time;
SSInterface.showScreen("Message");
SSInterface.target.message = message;
Key.addListener(this);
}
function hide() {
SSInterface.hide();
Key.removeListener(this);
}
function onKeyUp() {
if (Key.getCode() == 32) {
hide();
}
}
var classID = SSGlobal.CLSID_OBJECT;
var assetID = "MessageBox";
var message = "No Message!";
var messageTime = 10;
var showOnce = true;
var pauseOnDisplay = false;
var showTime = 0;
var editor_isItem = true;
var editor_name = "MessageBox";
var editor_args_names = ["message"];
var editor_args_values = [MessageBox.prototype.message];
var editor_args_types = ["string"];
var editor_args_options = [null];
var editor_args_descriptions = [""];
var editor_args_mode = [0];
var editor_args_component = ["TextInput"];
}
Symbol 974 MovieClip [__Packages.SSBackground] Frame 0
class SSBackground extends SSObject
{
var tileID, z, pattern, target, oz, depth, calculateDepth, world, leftGrid, rightGrid, topGrid, bottomGrid, tiles;
function SSBackground (tileID, depth, tileWidth, tileHeight, scrollMultiplier) {
super();
if (tileID != null) {
this.tileID = tileID;
}
z = (depth ? (depth) : 20);
if (tileWidth) {
this.tileWidth = tileWidth;
}
if (tileHeight) {
this.tileHeight = tileHeight;
}
this.scrollMultiplier = (scrollMultiplier ? (scrollMultiplier) : 1);
}
function queueForDisplay() {
}
function setPattern(g) {
pattern = g;
}
function onAddDisplay() {
if (stationary) {
target.attachMovie(tileID, "bg0", 0);
}
}
function setDisplay(viewport) {
if (oz != ((oz = Math.floor(z - viewport.z)))) {
target.swapDepths((depth = calculateDepth()));
}
if (stationary) {
target._x = -world.target._x;
target._y = -world.target._y;
return(undefined);
}
var _local11 = Math.floor((-world.target._x) - ((x = ((viewport.wTan * (viewport.x * scrollMultiplier)) / (z - viewport.z)) + offsetX)));
var _local9 = Math.floor((-world.target._y) - ((y = ((viewport.wTan * (viewport.y * scrollMultiplier)) / (z - viewport.z)) + offsetY)));
target._x = _local11;
target._y = _local9;
left = x;
right = x + viewport.screenWidth;
top = y;
bottom = y + viewport.screenHeight;
var _local7 = leftGrid != ((leftGrid = Math.floor(left / tileWidth)));
var _local10 = rightGrid != ((rightGrid = Math.ceil(right / tileWidth)));
var _local8 = topGrid != ((topGrid = Math.floor(top / tileHeight)));
var _local12 = bottomGrid != ((bottomGrid = Math.ceil(bottom / tileHeight)));
if ((((!_local7) && (!_local10)) && (!_local8)) && (!_local12)) {
return(undefined);
}
var _local2 = tiles.length;
while (_local2-- , _local2 > -1) {
tiles[_local2].removeMovieClip();
}
tiles = [];
var _local4 = rightGrid - leftGrid;
_local2 = _local4 * (bottomGrid - topGrid);
var _local3;
var x;
var y;
var _local5 = 1;
while (_local2-- , _local2 > -1) {
x = leftGrid + (_local2 % _local4);
y = (y = topGrid + Math.floor(_local2 / _local4));
if (pattern && (!(_local5 = pattern.getCell(x, y)))) {
continue;
}
_local3 = target.attachMovie(tileID, "t" + _local2, _local2);
tiles.push(_local3);
_local3._x = x * tileWidth;
_local3._y = y * tileHeight;
_local3.gotoAndStop(_local5);
}
}
var autoAddToScene = false;
var assetID = null;
var className = "BG";
var left = 0;
var right = 0;
var top = 0;
var bottom = 0;
var scrollMultiplier = 1;
var tileWidth = 300;
var tileHeight = 300;
var stationary = false;
var offsetX = 0;
var offsetY = 0;
}
Symbol 975 MovieClip [__Packages.SSLevel] Frame 0
class SSLevel
{
var worldConstructor, objects, name, preProcess, background, music, processID, onReadXMLComplete, lastTime, intervalID, onComplete;
function SSLevel (x) {
worldConstructor = GameWorld;
objects = [];
switch (typeof(x)) {
case "string" :
name = x;
break;
case "object" :
readXML(x);
}
}
function addObject() {
objects.push(arguments);
}
function readXML(xObj) {
ready = false;
var wn = xObj.firstChild;
var attr = wn.attributes;
name = attr.levelName;
preProcess = eval (attr.preProcess);
background = _global[attr.background];
startNode = attr.startNode;
music = attr.music;
var a;
var i = -1;
var c = ((a = wn.childNodes)).length;
while ((++i) < c) {
if (!(a[i].nodeName === "objects")) {
} else {
readObjects(wn.firstChild);
}
}
readXMLComplete();
}
function readObjects(node) {
var types = node.attributes.types.split(",");
var objData = node.firstChild.nodeValue;
var i = types.length;
while ((--i) > -1) {
types[i] = eval (types[i]);
}
var aObjs = objData.split(SSGlobal.ED_OBJ_DELIMETER);
var objAttrDelim = SSGlobal.ED_OBJ_ATTR_DELIM;
var i = -1;
var c = aObjs.length;
while ((++i) < c) {
var a = aObjs[i].split(objAttrDelim);
var j = a.length;
a[0] = types[a[0]];
while (--j) {
var v = a[j];
if (v == "") {
a[j] = null;
continue;
}
var char = v.charAt(0);
if ((char == "\"") || (char == "'")) {
a[j] = v.substring(1, v.length - 1);
continue;
}
v = Number(v);
if (isNaN(v)) {
var tmp = eval (a[j]);
if (tmp != null) {
a[j] = tmp;
}
} else {
a[j] = v;
}
}
addObject.apply(this, a);
}
}
function readXMLStep() {
}
function readXMLComplete() {
clearInterval(processID);
delete processID;
ready = true;
onReadXMLComplete();
}
function build(base) {
ready = false;
var _local4 = new this.worldConstructor(name);
_local4.name = name;
base.addWorld(_local4);
levelLeft = (levelTop = 268435455);
levelRight = (levelBottom = -268435455);
preProcess(base, _local4);
if (typeof(background) == "function") {
background(_local4);
} else {
var _local3 = background.layers.length;
while (_local3-- , _local3 > -1) {
var _local2 = {};
_local2.__proto__ = background.layers[_local3];
_local4.addBackground(_local2);
}
}
processObjects(base, _local4);
return(_local4);
}
function processObjects(base, ssw) {
lastTime = getTimer();
current = -1;
total = objects.length;
intervalID = setInterval(function (o, base, ssw) {
o.objectsStep(base, ssw);
}, 0, this, base, ssw);
}
function objectsStep(base, ssw) {
var _local4 = Math.abs(getTimer() - ((lastTime = getTimer())));
while ((++current) < total) {
var _local2 = objects[current];
processObject(ssw, _local2);
}
if (current == total) {
complete(base, ssw);
clearInterval(intervalID);
}
updateAfterEvent();
}
function processObject(ssw, aData) {
var _local12 = aData[1];
var _local11 = aData[2];
var _local10 = aData[3];
var _local4 = aData[0];
var _local5 = aData[4];
var _local7 = ((aData[5] == null) ? (_local4.prototype.depthLayer) : (Number(aData[5])));
var _local8 = ((aData[6] == null) ? null : (aData[6]));
var _local6 = (((aData[7] == null) || (aData[7] == "")) ? null : (aData[7]));
var _local9 = aData.slice(10);
if (_local4 == null) {
return(false);
}
var _local2 = {};
_local2.__proto__ = _local4.prototype;
if (_local4 == SSShapeInstance) {
_local4.call(_local2, ssw.shapes[_local9[0]]);
} else {
_local4.apply(_local2, _local9);
}
_local2.x = _local12;
_local2.y = _local11;
_local2.z = _local10;
if ((_local5 != "") && (_local5 != null)) {
_local2.assetID = _local5;
}
if (_local7 != _local2.depthLayer) {
_local2.depthLayer = Number(_local7);
}
if (_local8 != null) {
_local2.frame = _local8;
}
if (_local6 != null) {
_local2.name = _local6;
}
ssw.addObject(_local2);
levelLeft = Math.min(levelLeft, _local2.left);
levelTop = Math.min(levelTop, _local2.top);
levelRight = Math.max(levelRight, _local2.right);
levelBottom = Math.max(levelBottom, _local2.bottom);
}
function complete(base, ssw) {
ready = true;
ssw.levelLeft = levelLeft;
ssw.levelTop = levelTop;
ssw.levelRight = levelRight;
ssw.levelBottom = levelBottom;
onComplete(base, ssw);
}
function onStatus() {
}
function toString() {
return("SSLevel " + name);
}
var startNode = "Start";
var startX = 0;
var startY = 0;
var levelLeft = 0;
var levelRight = 0;
var levelTop = 0;
var levelBottom = 0;
var current = 0;
var total = 0;
var pauseTime = 20;
var ready = false;
var editor_docObject = true;
var editor_args_names = ["levelName", "preProcess", "background", "startNode", "music"];
var editor_args_values = ["name", "preProcess", "background", "Start", "music"];
var editor_args_types = ["string", "string", "string", "string", "string"];
var editor_args_options = ["A-Za-z0-9", "A-Za-z", "A-Za-z0-9", "A-Za-z0-9", "A-Za-z0-9"];
var editor_args_descriptions = [];
var editor_args_mode = [0, 0, 0, 0, 0];
var editor_args_component = ["TextInput", "TextInput", "TextInput", "TextInput", "TextInput"];
var editor_commands = [];
}
Symbol 976 MovieClip [__Packages.SSViewport] Frame 0
class SSViewport extends GDK.Viewport
{
var camOffset, setFieldOfView, FOV, wTan, tanFOV, hTan, changed, x, y, sectorChanged, watch, moveTo, tx, ty;
function SSViewport () {
super();
}
function onAddToWorld() {
halfWidth = screenWidth * 0.5;
halfHeight = screenHeight * 0.5;
camOffset = new Vector();
setFieldOfView(FOV);
focusDepth = -((wTan = halfWidth / tanFOV));
hTan = halfHeight / tanFOV;
}
function onMove() {
changed = true;
right = ((left = x - halfWidth)) + screenWidth;
bottom = ((top = y - halfHeight)) + screenHeight;
var _local2 = leftSector != ((leftSector = Math.floor((left / SSGlobal.GRID_SIZE) - 0.5)));
var _local3 = topSector != ((topSector = Math.floor((top / SSGlobal.GRID_SIZE) - 0.5)));
var _local4 = rightSector != ((rightSector = Math.ceil((right / SSGlobal.GRID_SIZE) + 0.5)));
var _local5 = bottomSector != ((bottomSector = Math.ceil((bottom / SSGlobal.GRID_SIZE) + 0.5)));
if (((_local2 || (_local3)) || (_local4)) || (_local5)) {
sectorChanged = true;
}
}
function setWatch(obj) {
watch = obj;
moveTo((tx = obj.x), (ty = obj.y), focusDepth);
}
function update(elapsed) {
if (!watch) {
return(undefined);
}
var _local2 = watch.velocity.getNormalized();
camOffset.x = camOffset.x + (((_local2.x * 125) - camOffset.x) * elapsed);
camOffset.y = camOffset.y + (((_local2.y * 50) - camOffset.y) * elapsed);
moveTo(watch.x, watch.y, focusDepth);
}
var leftSector = 0;
var rightSector = 0;
var topSector = 0;
var bottomSector = 0;
var left = 0;
var right = 0;
var top = 0;
var bottom = 0;
var screenWidth = 0;
var screenHeight = 0;
var halfWidth = 0;
var halfHeight = 0;
var focusDepth = -450;
var hither = 50;
var yon = 20000;
}
Symbol 977 MovieClip [__Packages.GameViewport] Frame 0
class GameViewport extends SSViewport
{
var watch, moveTo, x, y, focusDepth, tx, halfWidth, ty, halfHeight, moveBy;
function GameViewport () {
super();
}
function stall(time) {
stallTime = time;
}
function shakeCamera(time, amount) {
shake = time;
strength = amount;
lastShake = 0;
}
function lock() {
locked = true;
}
function unlock() {
locked = false;
}
function update(elapsed) {
if (!watch) {
return(undefined);
}
if (stallTime) {
stallTime = Math.max(0, stallTime - elapsed);
} else if (watch.finished) {
moveTo(Math.round(x + (((watch.x - x) * elapsed) * 4)), Math.round(y + ((((watch.y - y) - 100) * elapsed) * 4)), focusDepth);
} else if (!locked) {
if (watch.swinging) {
var _local3 = 0;
tx = watch.x + ((((watch.dispAxis * halfWidth) * xLead) + watch.velocity.x) / 4);
ty = watch.y + ((_local3 + watch.velocity.y) / 4);
} else {
var _local3 = ((watch.jumpTime || (!watch.inMotion)) ? (((watch.contactNormal.y * halfHeight) * 0.2) + (((watch.dispAxis * watch.contactNormal.x) * halfHeight) * 0.7)) : (Math.min(Math.max(watch.velocity.y * 0.5, -150), 150)));
tx = watch.x + ((((watch.dispAxis * halfWidth) * xLead) + watch.velocity.x) / response);
ty = watch.y + ((_local3 + watch.velocity.y) / response);
}
moveTo(Math.round((x + (((tx - x) * elapsed) * response)) * 4) / 4, Math.round((y + (((ty - y) * elapsed) * response)) * 4) / 4, focusDepth);
}
if (shake) {
shake = Math.max(0, shake - elapsed);
lastShake = lastShake + 1;
moveBy(0, (((lastShake % 2) == 1) ? -1 : 1) * strength, 0);
}
}
var stallTime = 0;
var lockPos = false;
var response = 1.7;
var xLead = 0.4;
var shake = 0;
var strength = 2;
var lastShake = 0;
var locked = false;
}
Symbol 978 MovieClip [__Packages.SSWorld] Frame 0
class SSWorld extends GDK.World
{
var sectors, players, name, viewport, backgrounds, collections, target, objectsAdded, tick, sendEvent, displayQueue, engine, onSSAddToScene, soundContainer, soundObject, initSound, inScene;
function SSWorld (name, viewport) {
super();
sectors = {};
players = [];
if (name) {
this.name = name;
}
this.viewport = new SSWorld.viewportClass();
backgrounds = new GDK.Collection();
collections = {};
}
function addToCollection(name, obj) {
var _local3 = collections[name];
if (!_local3) {
_local3 = (collections[name] = [obj]);
} else {
var _local2 = _local3.length;
while (_local2-- , _local2 > -1) {
if (_local3[_local2] == obj) {
return(undefined);
}
}
_local3.push(obj);
}
}
function removeFromCollection(name, obj) {
var _local3;
_local3 = collections[name];
var _local2 = _local3.length;
while (_local2-- , _local2 > -1) {
if (_local3[_local2] == obj) {
_local3.splice(_local2, 1);
}
}
}
function addBackground(bg) {
bg.world = (bg.parent = this);
bg.displayNode = target;
bg.uniqueID = ++objectsAdded;
backgrounds.addMember(bg);
}
function update(elapsed) {
tick = Math.floor(time) != Math.floor((time = time + elapsed));
var _local2 = players.length;
while (_local2-- , _local2 > -1) {
players[_local2].update(elapsed);
}
sendEvent("update", elapsed);
updateViewport(elapsed);
if (viewport.sectorChanged) {
cleanScene();
}
render(elapsed);
}
function cleanScene() {
var _local6 = [];
viewport.sectorChanged = false;
var _local7 = sectorsWide;
var _local3;
var _local10 = sectorsTotal;
while (_local10-- , _local10 > -1) {
_local3 = sectors[leftSector + (_local10 % _local7)][topSector + Math.floor(_local10 / _local7)];
if (_local3) {
_local3._s = -1;
_local6.push(_local3);
}
}
_local7 = (sectorsWide = ((rightSector = viewport.rightSector)) - ((leftSector = viewport.leftSector)));
_local10 = (sectorsTotal = _local7 * (((bottomSector = viewport.bottomSector)) - ((topSector = viewport.topSector))));
while (_local10-- , _local10 > -1) {
_local3 = sectors[leftSector + (_local10 % _local7)][topSector + Math.floor(_local10 / _local7)];
if (_local3) {
if (!_local3._s) {
_local3._s = 1;
_local6.push(_local3);
} else {
_local3._s = 0;
}
}
}
_local10 = _local6.length;
var _local9 = [];
var _local4;
var _local2;
var _local8;
var _local5;
while (_local10-- , _local10 > -1) {
_local8 = _local6[_local10];
_local5 = _local8.length;
_local4 = _local8._s;
while (_local5-- , _local5 > -1) {
_local2 = _local8[_local5];
if (_local2._s == null) {
_local2._s = _local4;
_local9.push(_local2);
} else if (_local4 > _local2._s) {
_local2._s = _local4;
}
}
delete _local6[_local10]._s;
}
_local10 = _local9.length;
while (_local10-- , _local10 > -1) {
_local2 = _local9[_local10];
if (_local2._s < 0) {
_local2.removeFromScene();
} else if (_local2._s > 0) {
_local2.addToScene();
}
delete _local2._s;
}
}
function render(elapsed) {
if (!displayQueue.length) {
return(undefined);
}
if (viewport.changed) {
target._x = Math.floor(-viewport.x);
target._y = Math.floor(-viewport.y);
var _local2 = backgrounds.length;
while (_local2-- , _local2 > -1) {
backgrounds[_local2].setDisplay(viewport);
}
}
var _local3 = (viewport.wTan * 1) / viewport.focusDepth;
var _local2 = displayQueue.length;
while (_local2-- , _local2 > -1) {
displayQueue[_local2].setDisplay(viewport, elapsed, _local3);
delete displayQueue[_local2].queueForDisplay;
}
displayQueue = [];
viewport.changed = false;
updateAfterEvent();
}
function getSectors(l, t, r, b) {
var _local6 = sectors;
var _local3;
_local3 = (r - l) + 1;
var _local2 = _local3 * ((b - t) + 1);
var _local4;
r = [];
while (_local2-- , _local2 > -1) {
_local4 = _local6[l + (_local2 % _local3)][t + Math.floor(_local2 / _local3)];
if (_local4) {
r.push(_local4);
}
}
return(r);
}
function getObjectsInSectors(l, t, r, b) {
var _local6 = sectors;
var _local4;
_local4 = (r - l) + 1;
var _local2 = _local4 * ((b - t) + 1);
var _local5;
var _local3 = [];
while (_local2-- , _local2 > -1) {
_local5 = _local6[l + (_local2 % _local4)][t + Math.floor(_local2 / _local4)];
if (_local5) {
_local3 = _local3.concat(_local5);
}
}
return(_local3);
}
function updateViewport(elapsed) {
viewport.update(elapsed);
}
function onAddToScene() {
target._visible = true;
viewport.screenWidth = engine.width;
viewport.screenHeight = engine.height;
viewport.world = this;
viewport.onAddToWorld();
var _local2 = backgrounds.length;
while (_local2-- , _local2 > -1) {
backgrounds[_local2].addDisplay();
backgrounds[_local2].setDisplay(viewport);
}
onSSAddToScene();
}
function onAddDisplay() {
soundContainer = target.createEmptyMovieClip("SoundContainer", -1200);
soundObject = new Sound(soundContainer);
initSound();
}
function removeFromScene() {
target._visible = false;
inScene = false;
for (var _local2 in soundContainer) {
soundContainer[_local2].sound.stop();
}
}
function createSound(id, linkageID) {
if (linkageID != null) {
var _local2 = soundContainer.attachMovie(linkageID, id, ++soundsCreated);
} else {
var _local2 = soundContainer.createEmptyMovieClip(id, ++soundsCreated);
}
var _local3 = new Sound(_local2);
_local2.sound = _local3;
return(_local2);
}
function muteSounds() {
soundObject.setVolume(muteVolume);
}
function unmuteSounds() {
soundObject.setVolume(normalVolume);
}
function deleteSound(id) {
soundContainer[id].sound.stop();
soundContainer[id].removeMovieClip();
}
function playEventSound(id, name) {
if (id.sound) {
var _local2 = id;
} else {
var _local2 = soundContainer[id];
}
_local2.gotoAndStop(name);
_local2.nextFrame();
}
function addPlayer(player) {
players.push(player);
}
function removePlayer(player) {
var _local3;
_local3 = players;
var _local2 = _local3.length;
while (_local2-- , _local2 > -1) {
if (_local3[_local2] == player) {
_local3.splice(_local2, 1);
break;
}
}
}
static var viewportClass = GameViewport;
var useDefaultCamera = false;
var updateID = 0;
var time = 0;
var levelLeft = 0;
var levelTop = 0;
var levelRight = 0;
var levelBottom = 0;
var leftSector = 0;
var rightSector = 0;
var topSector = 0;
var bottomSector = 0;
var sectorsWide = 0;
var sectorsTotal = 0;
var soundsCreated = 0;
var normalVolume = 100;
var muteVolume = 0;
}
Symbol 979 MovieClip [__Packages.GameWorld] Frame 0
class GameWorld extends SSWorld
{
var collections;
function GameWorld () {
super();
}
function onSSAddToScene() {
if (collections.VR) {
var _local3;
_local3 = collections.VR;
var _local2 = _local3.length;
while (_local2-- , _local2 > -1) {
_local3[_local2].disabled = true;
}
}
}
}
Symbol 980 MovieClip [__Packages.SSShapeInstance] Frame 0
class SSShapeInstance extends SSObject
{
var world, parent, target, inScene, __proto__;
function SSShapeInstance (obj) {
super();
world = null;
parent = null;
target = null;
isInstance = true;
inScene = false;
__proto__ = {__proto__:obj};
__proto__.queueForDisplay = SSShape.prototype.queueForDisplay;
}
function editor_onAddToDocument(doc, cn, args) {
var _local5 = args[0];
var _local3 = doc.objects;
var _local2 = _local3.length;
var _local4;
while (_local2-- , _local2 > -1) {
if (_local3[_local2].name == _local5) {
_local4 = _local3[_local2];
break;
}
}
points = _local4.points;
if (!_local4.instances) {
_local4.instances = [];
}
_local4.instances.push(this);
}
function editor_display() {
target.clear();
target.beginFill(13408767, 20);
target.moveTo(points[0].x, points[0].y);
var _local2 = points.length;
while (_local2-- , _local2 > -1) {
target.lineStyle(0, (points[_local2].props ? 16711680 : 8947848));
target.lineTo(points[_local2].x, points[_local2].y);
}
target.endFill();
}
var isInstance = true;
var assetID = null;
}
Symbol 981 MovieClip [__Packages.PerformanceTest] Frame 0
class PerformanceTest
{
var remainingLoops, onComplete, flashMajorVersion, flashMinorVersion, intervalID, log, processor;
function PerformanceTest (itterations, onComplete) {
if (itterations) {
loops = itterations;
}
remainingLoops = loops;
if (onComplete) {
this.onComplete = onComplete;
}
var _local2 = System.capabilities.version.substr(4).split(",");
flashMajorVersion = Number(_local2[0]);
flashMinorVersion = Number(_local2[2]);
complete = false;
intervalID = setInterval(function (o) {
o.test();
}, 0, this);
}
function test() {
if (remainingLoops <= 0) {
finalize();
clearInterval(intervalID);
return(undefined);
}
remainingLoops--;
var _local4 = getTimer();
var _local3;
var _local2 = 0;
while (_local2 < 6400) {
_local3 = {};
_local2++;
}
time = time + (getTimer() - _local4);
}
function finalize() {
score = Math.floor((loops / time) * 10000);
if (flashMajorVersion >= 7) {
log = Math.log(score * 0.015);
} else {
log = Math.log(score * 0.023);
}
processor = log * 1000;
complete = true;
onComplete(this);
}
function toString() {
if (score) {
return((((((((("Loops:\t" + loops) + "\nFlash Version: \t") + System.capabilities.version) + "\nTotal Time:\t") + time) + "\nScore: \t") + score) + "\nProcessor: \t") + processor);
}
return("Test In Process.");
}
var score = 0;
var time = 0;
var loops = 20;
var complete = false;
}
Symbol 982 MovieClip [__Packages.DSGeneric] Frame 0
class DSGeneric extends SSDrawStyle
{
var surfaceEdge;
function DSGeneric () {
super();
}
function define() {
surfaceEdge.layerShift = 15;
surfaceEdge.capSurface = true;
surfaceEdge.sideExtrude = 0;
surfaceEdge.endAlign = 1;
surfaceEdge.ambientColor = 4473958 /* 0x444466 */;
surfaceEdge.diffuseColor = 8947865 /* 0x888899 */;
surfaceEdge.specularColor = 15658717 /* 0xEEEEDD */;
surfaceEdge.impactSound = "ground";
}
var className = "DSGeneric";
var fillColor = 52224;
var fillTexture = null;
}
Symbol 983 MovieClip [__Packages.SimpleStatusBar] Frame 0
class SimpleStatusBar extends MovieClip
{
var valueBar;
function SimpleStatusBar () {
super();
}
function setRange(min, max) {
if (min < max) {
minimum = min;
maximum = max;
} else {
minimum = max;
maximum = min;
}
range = maximum - minimum;
}
function setValue(v) {
v = Math.min(maximum, Math.max(minimum, v));
if (v == __value) {
return(undefined);
}
__value = v;
valueBar._xscale = Math.max(1, __value * 100);
}
function set value(v) {
setValue(v);
//return(value);
}
function get value() {
return(__value);
}
var __value = 1;
var minimum = 0;
var maximum = 1;
var range = SimpleStatusBar.prototype.maximum - SimpleStatusBar.prototype.minimum;
}
Symbol 220 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 7
stop();
Symbol 364 MovieClip Frame 60
gotoAndPlay(30 + random(10));
Symbol 386 MovieClip [GlobalSounds] Frame 51
Symbol 406 MovieClip [Checkpoint] Frame 1
stop();
Symbol 406 MovieClip [Checkpoint] Frame 14
stop();
Symbol 422 MovieClip Frame 1
stop();
Symbol 428 MovieClip Frame 1
stop();
Symbol 435 MovieClip Frame 1
stop();
Symbol 461 MovieClip [ATV] Frame 1
stop();
Symbol 489 MovieClip Frame 12
gotoAndPlay (5);
Symbol 497 MovieClip Frame 5
stop();
Symbol 498 MovieClip [WalkingObject] Frame 1
stop();
Symbol 517 MovieClip [Splash] Frame 8
stop();
Symbol 533 MovieClip Frame 3
stop();
Symbol 536 MovieClip Frame 7
gotoAndPlay (5);
Symbol 537 MovieClip Frame 5
stop();
Symbol 538 MovieClip [Spider] Frame 1
stop();
Symbol 683 MovieClip [EvilMachine] Frame 1
stop();
Symbol 683 MovieClip [EvilMachine] Frame 86
SSInterface.showScreen("fadeOut");
Symbol 683 MovieClip [EvilMachine] Frame 90
SSInterface.currentGame.stop();
SSGame.nextLevel();
stop();
Symbol 684 Button
on (release) {
gotoAndStop ("GameInit");
}
Symbol 687 MovieClip [SSGame] Frame 1
#initclip 69
Object.registerClass("SSGame", SSGame);
#endinitclip
Symbol 691 MovieClip [SimpleStatusBar] Frame 1
#initclip 67
Object.registerClass("SimpleStatusBar", SimpleStatusBar);
#endinitclip
Symbol 692 MovieClip Frame 1
function setValue(v) {
if ((value <= 0) && (v > 0)) {
gotoAndPlay ("open");
} else if ((value > 0) && (v <= 0)) {
gotoAndPlay ("close");
}
meter.value = 1 - v;
value = v;
}
var value = 0;
stop();
Symbol 692 MovieClip Frame 6
stop();
Symbol 695 Button
on (release) {
show("Menu");
}
Symbol 714 Button
on (release) {
resume();
}
Symbol 719 MovieClip Frame 1
stop();
Symbol 721 Button
on (release) {
show("Help");
}
Symbol 725 Button
on (release) {
_global.root.quitGame(score);
}
Symbol 736 Button
on (release) {
_global.root.quitGame(_parent.score);
}
Symbol 744 Button
on (release) {
_global.root.gotoAndStop("GameInit");
}
Symbol 745 MovieClip Frame 49
stop();
Symbol 748 MovieClip Frame 1
btnCover.useHandCursor = false;
Symbol 758 MovieClip Frame 1
stop();
Symbol 764 MovieClip Frame 1
stop();
Symbol 772 MovieClip Frame 1
stop();
Symbol 794 MovieClip Frame 1
GameSound.playMusic("WinLevel", 0, false);
Symbol 794 MovieClip Frame 21
Symbol 794 MovieClip Frame 66
SSInterface.currentGame.stop();
SSGame.nextLevel();
Symbol 835 MovieClip Frame 170
stop();
_parent.gotoAndStop("EndScreen");
Symbol 854 MovieClip Frame 1
stop();
Symbol 858 MovieClip Frame 1
stop();
Symbol 860 Button
on (release) {
_global.root.sendScore(score);
_global.root.gotoAndStop("GameInit");
}
Symbol 868 MovieClip [GameInterface] Frame 1
#initclip 68
Object.registerClass("GameInterface", SSInterface);
#endinitclip
Symbol 868 MovieClip [GameInterface] Frame 31
play();
Symbol 868 MovieClip [GameInterface] Frame 34
stop();
Symbol 868 MovieClip [GameInterface] Frame 36
stopAllSounds();
Symbol 868 MovieClip [GameInterface] Frame 43
stopAllSounds();
SSInterface.currentGame.stop();
Symbol 872 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 873 MovieClip Frame 1
function show(num) {
level.gotoAndStop((this.num = num + 1));
gotoAndStop (2);
}
function hide() {
gotoAndPlay (2);
}
stop();
Symbol 873 MovieClip Frame 2
level.gotoAndStop(num);
Symbol 873 MovieClip Frame 23
stop();
Symbol 880 Button
on (release) {
_parent.play();
stopAllSounds();
gotoAndStop (1);
}
Symbol 917 MovieClip Frame 317
_parent.play();