Section 1
//Base64 (FOG.AS3.Base64)
package FOG.AS3 {
import flash.utils.*;
public class Base64 {
public static const version:String = "1.1.0";
private static const BASE64_CHARS:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
public function Base64(){
throw (new Error("Base64 class is static container only"));
}
public static function encode(_arg1:String):String{
var _local2:ByteArray = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (encodeByteArray(_local2));
}
public static function encodeByteArray(_arg1:ByteArray):String{
var _local3:Array;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local2 = "";
var _local4:Array = new Array(4);
_arg1.position = 0;
while (_arg1.bytesAvailable > 0) {
_local3 = new Array();
_local5 = 0;
while ((((_local5 < 3)) && ((_arg1.bytesAvailable > 0)))) {
_local3[_local5] = _arg1.readUnsignedByte();
_local5++;
};
_local4[0] = ((_local3[0] & 252) >> 2);
_local4[1] = (((_local3[0] & 3) << 4) | (_local3[1] >> 4));
_local4[2] = (((_local3[1] & 15) << 2) | (_local3[2] >> 6));
_local4[3] = (_local3[2] & 63);
_local6 = _local3.length;
while (_local6 < 3) {
_local4[(_local6 + 1)] = 64;
_local6++;
};
_local7 = 0;
while (_local7 < _local4.length) {
_local2 = (_local2 + BASE64_CHARS.charAt(_local4[_local7]));
_local7++;
};
};
return (_local2);
}
public static function decode(_arg1:String):String{
var _local2:ByteArray = decodeToByteArray(_arg1);
return (_local2.readUTFBytes(_local2.length));
}
public static function decodeToByteArray(_arg1:String):ByteArray{
var _local6:uint;
var _local7:uint;
var _local2:ByteArray = new ByteArray();
var _local3:Array = new Array(4);
var _local4:Array = new Array(3);
var _local5:uint;
while (_local5 < _arg1.length) {
_local6 = 0;
while ((((_local6 < 4)) && (((_local5 + _local6) < _arg1.length)))) {
_local3[_local6] = BASE64_CHARS.indexOf(_arg1.charAt((_local5 + _local6)));
_local6++;
};
_local4[0] = ((_local3[0] << 2) + ((_local3[1] & 48) >> 4));
_local4[1] = (((_local3[1] & 15) << 4) + ((_local3[2] & 60) >> 2));
_local4[2] = (((_local3[2] & 3) << 6) + _local3[3]);
_local7 = 0;
while (_local7 < _local4.length) {
if (_local3[(_local7 + 1)] == 64){
break;
};
_local2.writeByte(_local4[_local7]);
_local7++;
};
_local5 = (_local5 + 4);
};
_local2.position = 0;
return (_local2);
}
}
}//package FOG.AS3
Section 2
//Connect (FOG.AS3.Connect)
package FOG.AS3 {
import flash.utils.*;
import flash.external.*;
public class Connect {
public var LinkAttempts:Number;// = 0
public var User:Object;
public var Linked:Boolean;// = false
public var Core:Object;
public function Connect(_arg1:CoreAPI):void{
User = {ID:0, Name:"Guest", HighScore:0, Thumb:"", Image:""};
super();
this.Core = _arg1;
CreateLink();
}
public function GetUser():Object{
if (Linked){
User = Call("getUserData");
};
if (typeof(User) != "object"){
User = {ID:0, Name:"Guest", HighScore:0, Thumb:"", Image:""};
};
return (User);
}
public function CallDirect(_arg1:String, _arg2=false, _arg3=false){
var _local4:* = ExternalInterface.call(("fog.api." + _arg1), _arg2, _arg3);
return (_local4);
}
public function CreateLink():void{
if (Core.isFogDomain()){
LinkAttempts++;
Core.debug((" Link Attempt " + LinkAttempts));
if (ExternalInterface.available){
Linked = (CallDirect("connect", Core.config)) ? true : false;
if (Linked){
} else {
setTimeout(CreateLink, 1000);
return;
};
} else {
setTimeout(CreateLink, 500);
return;
};
};
GetUser();
}
public function Call(_arg1:String, _arg2=false, _arg3=false){
if (!Linked){
return (false);
};
return (CallDirect(_arg1, _arg2, _arg3));
}
}
}//package FOG.AS3
Section 3
//CoreAPI (FOG.AS3.CoreAPI)
package FOG.AS3 {
import flash.display.*;
import flash.net.*;
import flash.utils.*;
import flash.external.*;
import flash.system.*;
public class CoreAPI extends MovieClip {
public var Scores:Object;
public var config:Object;
private var Classes:Array;
private var Plugins:Array;
public var Root:DisplayObject;
public var Connect:Object;
public var Preloader:Object;
public var Tracking:Object;
public var enterFrameFunc:Function;
public var Storage:Object;
public var options:Object;
public var res:Array;
public var Remote:Object;
private var Token:String;
public var StageDims:Object;
public var localMode:Boolean;
public var urlInfo:Object;
public function CoreAPI(_arg1:Object):void{
var _local3:*;
var _local4:*;
var _local5:int;
var _local6:int;
var _local7:Class;
config = new Object();
options = new Object();
Classes = [Preloader, Tracking, Remote, Connect, Scores, Storage];
Plugins = ["Tracking", "Preloader", "Remote", "Connect", "Scores", "Storage"];
super();
Security.allowDomain("*");
var _local2:Object = {version:"1.2", asversion:3, debug:true, trace:true, sandbox:false, remote:false};
Root = _arg1.root;
StageDims = {w:Root.stage.stageWidth, h:Root.stage.stageHeight};
options = parseOptions(_arg1, _local2);
for (_local3 in options) {
if (((!((_local3 == "root"))) && (!((_local3 == "clip"))))){
config[_local3] = options[_local3];
};
};
urlInfo = getUrlInfo(Root.loaderInfo.url);
debug(("Initalized FOG API Version " + options.version));
for (_local4 in options.game) {
debug(((("> " + _local4) + ": ") + options.game[_local4]));
};
debug(("> sandbox: " + options.sandbox));
debug(((("> stage: " + StageDims.w) + "x") + StageDims.h));
debug(("> domain: " + urlInfo.domain));
debug(("> isfog: " + isFogDomain()));
debug(("> remote: " + options.remote));
debug("Plugins");
_local5 = 0;
_local6 = Plugins.length;
while (_local5 < _local6) {
debug(("> FOG." + Plugins[_local5]));
_local7 = (getDefinitionByName(("FOG.AS3." + Plugins[_local5])) as Class);
this[Plugins[_local5]] = new _local7(this);
if (((options[Plugins[_local5]]) && (this[Plugins[_local5]].Options))){
this[Plugins[_local5]].Options = parseOptions(options[Plugins[_local5]], this[Plugins[_local5]].Options);
};
_local5++;
};
if (this.Connect){
Token = Base64.encode(((((((options.game.id + ":") + options.game.title) + ":") + options.game.fogid) + ":") + options.game.key));
debug("FOG Connect (Javascript)");
debug(("> token: " + Token));
debug(("> linked: " + Connect.Linked));
debug((((("> user: " + Connect.User.Name) + " [") + Connect.User.ID) + "]"));
debug(("> highscore: " + Connect.User.HighScore));
};
}
public function Read(_arg1:String){
return (this[_arg1]);
}
public function getUrlInfo(_arg1:String):Object{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
localMode = new RegExp("file://").test(_arg1);
var _local2 = "";
var _local3 = "";
if (localMode){
_local2 = "local";
_local3 = "";
} else {
_local4 = (_arg1.indexOf("://") + 3);
_local5 = _arg1.indexOf("/", _local4);
_local2 = _arg1.substring(_local4, _local5);
_local6 = (_local2.lastIndexOf(".") - 1);
_local7 = (_local2.lastIndexOf(".", _local6) + 1);
_local3 = _arg1.substr(_local5);
};
return ({domain:_local2, uri:_local3});
}
public function isFogDomain():Boolean{
return (((urlInfo.domain.indexOf("freeonlinegames.com") > -1)) ? true : false);
}
public function debug(_arg1, _arg2:String=""):void{
if (isFogDomain()){
if (ExternalInterface.available){
ExternalInterface.call("fog.api.debug", _arg1, _arg2);
};
};
if (((!(_arg2)) && (options.debug))){
if (_arg1.indexOf(">") === 0){
trace(_arg1);
} else {
trace(" ");
trace(_arg1);
};
};
}
private function getDims(_arg1:Object):Array{
var _local2:int;
var _local3:int;
_local2 = Root.stage.stageWidth;
_local3 = Root.stage.stageHeight;
_arg1.game.dims = {w:_local2, h:_local3};
return ([_local2, _local3]);
}
private function parseOptions(_arg1:Object, _arg2:Object):Object{
var _local4:String;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
return (_local3);
}
}
}//package FOG.AS3
Section 4
//JSON (FOG.AS3.JSON)
package FOG.AS3 {
public class JSON {
public static function encode(_arg1):String{
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local6:*;
var _local7:String;
var _local8:Number;
var _local5 = "";
switch (typeof(_arg1)){
case "object":
if (_arg1){
if ((_arg1 is Array)){
_local4 = _arg1.length;
_local3 = 0;
while (_local3 < _local4) {
_local6 = encode(_arg1[_local3]);
if (_local5){
_local5 = (_local5 + ",");
};
_local5 = (_local5 + _local6);
_local3++;
};
return ((("[" + _local5) + "]"));
} else {
if (typeof(_arg1.toString) != "undefined"){
for (_local7 in _arg1) {
_local6 = _arg1[_local7];
if (((!((typeof(_local6) == "undefined"))) && (!((typeof(_local6) == "function"))))){
_local6 = encode(_local6);
if (_local5){
_local5 = (_local5 + ",");
};
_local5 = (_local5 + ((encode(_local7) + ":") + _local6));
};
};
return ((("{" + _local5) + "}"));
};
};
};
return ("null");
case "number":
return ((isFinite(_arg1)) ? String(_arg1) : "null");
case "string":
_local4 = _arg1.length;
_local5 = "\"";
_local3 = 0;
while (_local3 < _local4) {
_local2 = _arg1.charAt(_local3);
if (_local2 >= " "){
if ((((_local2 == "\\")) || ((_local2 == "\"")))){
_local5 = (_local5 + "\\");
};
_local5 = (_local5 + _local2);
} else {
switch (_local2){
case "\b":
_local5 = (_local5 + "\\b");
break;
case "\f":
_local5 = (_local5 + "\\f");
break;
case "\n":
_local5 = (_local5 + "\\n");
break;
case "\r":
_local5 = (_local5 + "\\r");
break;
case "\t":
_local5 = (_local5 + "\\t");
break;
default:
_local8 = _local2.charCodeAt();
_local5 = (_local5 + (("\\u00" + Math.floor((_local8 / 16)).toString(16)) + (_local8 % 16).toString(16)));
};
};
_local3 = (_local3 + 1);
};
return ((_local5 + "\""));
case "boolean":
return (String(_arg1));
default:
return ("null");
};
}
public static function decode(_arg1:String){
var at:Number;
var ch:String;
var _isDigit:Function;
var _isHexDigit:Function;
var _white:Function;
var _string:Function;
var _next:Function;
var _array:Function;
var _object:Function;
var _number:Function;
var _word:Function;
var _value:Function;
var _error:Function;
var source = _arg1;
source = new String(source);
at = 0;
ch = " ";
_isDigit = function (_arg1:String){
return (((("0" <= _arg1)) && ((_arg1 <= "9"))));
};
_isHexDigit = function (_arg1:String){
return (((((_isDigit(_arg1)) || (((("A" <= _arg1)) && ((_arg1 <= "F")))))) || (((("a" <= _arg1)) && ((_arg1 <= "f"))))));
};
_error = function (_arg1:String):void{
throw (new Error(_arg1, (at - 1)));
};
_next = function (){
ch = source.charAt(at);
at = (at + 1);
return (ch);
};
_white = function ():void{
while (ch) {
if (ch <= " "){
_next();
} else {
if (ch == "/"){
switch (_next()){
case "/":
do {
} while (((((_next()) && (!((ch == "\n"))))) && (!((ch == "\r")))));
break;
case "*":
_next();
while (true) {
if (ch){
if (ch == "*"){
if (_next() == "/"){
_next();
break;
};
} else {
_next();
};
} else {
_error("Unterminated Comment");
};
};
break;
default:
_error("Syntax Error");
};
} else {
break;
};
};
};
};
_string = function (){
var _local3:*;
var _local4:*;
var _local1:* = "";
var _local2:* = "";
var _local5:Boolean;
if (ch == "\""){
while (_next()) {
if (ch == "\""){
_next();
return (_local2);
};
if (ch == "\\"){
switch (_next()){
case "b":
_local2 = (_local2 + "\b");
break;
case "f":
_local2 = (_local2 + "\f");
break;
case "n":
_local2 = (_local2 + "\n");
break;
case "r":
_local2 = (_local2 + "\r");
break;
case "t":
_local2 = (_local2 + "\t");
break;
case "u":
_local4 = 0;
_local1 = 0;
while (_local1 < 4) {
_local3 = parseInt(_next(), 16);
if (!isFinite(_local3)){
_local5 = true;
break;
};
_local4 = ((_local4 * 16) + _local3);
_local1 = (_local1 + 1);
};
if (_local5){
_local5 = false;
break;
};
_local2 = (_local2 + String.fromCharCode(_local4));
break;
default:
_local2 = (_local2 + ch);
};
} else {
_local2 = (_local2 + ch);
};
};
};
_error("Bad String");
return (null);
};
_array = function (){
var _local1:Array = [];
if (ch == "["){
_next();
_white();
if (ch == "]"){
_next();
return (_local1);
};
while (ch) {
_local1.push(_value());
_white();
if (ch == "]"){
_next();
return (_local1);
};
if (ch != ","){
break;
};
_next();
_white();
};
};
_error("Bad Array");
return (null);
};
_object = function (){
var _local1:* = {};
var _local2:* = {};
if (ch == "{"){
_next();
_white();
if (ch == "}"){
_next();
return (_local2);
};
while (ch) {
_local1 = _string();
_white();
if (ch != ":"){
break;
};
_next();
_local2[_local1] = _value();
_white();
if (ch == "}"){
_next();
return (_local2);
};
if (ch != ","){
break;
};
_next();
_white();
};
};
_error("Bad Object");
};
_number = function (){
var _local2:*;
var _local1:* = "";
var _local3 = "";
var _local4 = "";
if (ch == "-"){
_local1 = "-";
_local4 = _local1;
_next();
};
if (ch == "0"){
_next();
if ((((ch == "x")) || ((ch == "X")))){
_next();
while (_isHexDigit(ch)) {
_local3 = (_local3 + ch);
_next();
};
if (_local3 == ""){
_error("mal formed Hexadecimal");
} else {
return (Number(((_local4 + "0x") + _local3)));
};
} else {
_local1 = (_local1 + "0");
};
};
while (_isDigit(ch)) {
_local1 = (_local1 + ch);
_next();
};
if (ch == "."){
_local1 = (_local1 + ".");
while (((((_next()) && ((ch >= "0")))) && ((ch <= "9")))) {
_local1 = (_local1 + ch);
};
};
_local2 = (1 * _local1);
if (!isFinite(_local2)){
_error("Bad Number");
} else {
return (_local2);
};
return (NaN);
};
_word = function (){
switch (ch){
case "t":
if ((((((_next() == "r")) && ((_next() == "u")))) && ((_next() == "e")))){
_next();
return (true);
};
break;
case "f":
if ((((((((_next() == "a")) && ((_next() == "l")))) && ((_next() == "s")))) && ((_next() == "e")))){
_next();
return (false);
};
break;
case "n":
if ((((((_next() == "u")) && ((_next() == "l")))) && ((_next() == "l")))){
_next();
return (null);
};
break;
};
_error("Syntax Error");
return (null);
};
_value = function (){
_white();
switch (ch){
case "{":
return (_object());
case "[":
return (_array());
case "\"":
return (_string());
case "-":
return (_number());
default:
return (((((ch >= "0")) && ((ch <= "9")))) ? _number() : _word());
};
};
return (_value());
}
}
}//package FOG.AS3
Section 5
//Preloader (FOG.AS3.Preloader)
package FOG.AS3 {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.system.*;
public class Preloader {
public var Root:MovieClip;
public var BG:Sprite;
public var onComplete:Function;
public var Prel:PreloaderClip;
public var Logo:LogoSpin;
public var GraphicBG:MovieClip;
public var Foggy:MovieClip;
public var GotoGameOnClick:Boolean;// = false
public var FoggyBG:Sprite;
public var FrameInc:Number;// = 0
public var Percent:Number;// = 0
public var TimerEnd:Number;
public var Notice:MovieClip;
public var TimerStart:Number;
public var Options:Object;
public var Core:CoreAPI;
public function Preloader(_arg1):void{
Options = {duration:3000, density:10, clickable:true, locked:false, domains:["freeonlinegames.com"]};
GraphicBG = new MovieClip();
onComplete = function (_arg1:CoreAPI):void{
MovieClip(_arg1.Root).play();
};
super();
Core = _arg1;
Root = _arg1.Root;
}
private function loadingBar(_arg1:Event):void{
var _local2:LogoFly;
if ((FrameInc++ % Math.round((Root.stage.frameRate / Options.density))) === 0){
_local2 = new LogoFly();
_local2.cacheAsBitmap = true;
_local2.x = (Core.StageDims.w / 2);
_local2.y = (Core.StageDims.h / 2);
_local2.scaleX = (_local2.scaleY = 0);
_local2.gotoAndStop(((Math.random() * 10) + 1));
_local2.speed = 100;
_local2.alpha = 0;
_local2.grow = (Math.random() / 100);
_local2.fade = false;
_local2.targetX = (Math.random() * 10);
if (_local2.targetX < 5){
_local2.targetX = (Math.random() * 10);
if (_local2.targetX < 5){
_local2.targetX = -100;
} else {
_local2.targetX = (Core.StageDims.w + 100);
};
_local2.targetY = (Math.random() * Core.StageDims.h);
} else {
_local2.targetY = (Math.random() * 10);
if (_local2.targetY < 5){
_local2.targetY = -100;
} else {
_local2.targetY = (Core.StageDims.h + 100);
};
_local2.targetX = (Math.random() * Core.StageDims.w);
};
BG.addChild(_local2);
_local2.addEventListener(Event.ENTER_FRAME, FOGFly);
};
}
private function showProgress(_arg1:Event):void{
Prel.percentGame = Math.floor(((Root.loaderInfo.bytesLoaded / Root.loaderInfo.bytesTotal) * 100));
Prel.percentDura = Math.floor((((getTimer() - TimerStart) / Prel.dura) * 100));
Percent = Math.min(Math.min(Prel.percentGame, Prel.percentDura), 100);
Prel.procent.text = Math.round(Percent).toString();
Prel.ProgBar.width = (Math.round(Percent) * 0.98);
if (Percent > 99){
PlayBranding();
};
loadingBar(_arg1);
}
public function DomainHasAccess():Boolean{
var _local1:Array = Options.domains;
var _local2:Boolean;
Core.debug("Allowed on domains");
var _local3:int;
var _local4:int = _local1.length;
while (_local3 < _local4) {
Core.debug(("> " + _local1[_local3]));
if (Core.urlInfo.domain.indexOf(_local1[_local3]) > -1){
_local2 = true;
};
_local3++;
};
if (((!(_local2)) && (Options.locked))){
if (Core.options.sandbox){
Core.debug("> Sandbox Overide");
return (true);
};
return (false);
//unresolved jump
};
return (true);
}
public function Start():void{
var tf:TextField;
var ctxMenu:ContextMenu = new ContextMenu();
ctxMenu.hideBuiltInItems();
var ctx3:ContextMenuItem = new ContextMenuItem("Play More Games");
ctx3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function (_arg1:ContextMenuEvent):void{
Core.Tracking.Click();
});
var ctx4:ContextMenuItem = new ContextMenuItem("Free Games For Your Website");
ctx4.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function (_arg1:ContextMenuEvent):void{
Core.Tracking.Click("http://www.freegamesforyourwebsite.com/");
});
var ctx1:ContextMenuItem = new ContextMenuItem("Copyright © Free Online Games");
ctx1.enabled = false;
ctx1.separatorBefore = true;
var ctx2:ContextMenuItem = new ContextMenuItem(("FOG API Version " + Core.options.version));
ctx2.enabled = false;
var ctx5:ContextMenuItem = new ContextMenuItem("Clear Local Flash API Storage");
ctx5.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function (_arg1:ContextMenuEvent):void{
Core.Storage.Clear();
});
ctx5.separatorBefore = true;
ctxMenu.customItems.push(ctx3, ctx4, ctx1, ctx2, ctx5);
Root.contextMenu = ctxMenu;
BG = new Sprite();
BG.graphics.beginFill(0);
BG.graphics.drawRect(0, 0, Core.StageDims.w, Core.StageDims.h);
BG.graphics.endFill();
BG.addChild(new BackgroundGraphic());
BG.addChild(GraphicBG);
Root.addChild(BG);
Logo = new LogoSpin();
Logo.stop();
Logo.x = (Core.StageDims.w / 2);
Logo.y = ((Core.StageDims.h / 2) - 30);
Root.addChild(Logo);
Prel = new PreloaderClip();
Prel.dura = Options.duration;
Prel.x = (Core.StageDims.w / 2);
Prel.y = ((Core.StageDims.h / 2) + 50);
Root.addChild(Prel);
Foggy = new MovieClip();
FoggyBG = new Sprite();
FoggyBG.graphics.beginFill(0);
FoggyBG.graphics.drawRect(0, 0, Core.StageDims.w, Core.StageDims.h);
FoggyBG.graphics.endFill();
Foggy.addChild(FoggyBG);
Foggy.width = Core.StageDims.w;
Foggy.height = Core.StageDims.h;
Foggy.alpha = 0;
Foggy.addEventListener(MouseEvent.CLICK, LoaderClicked);
Foggy.buttonMode = true;
Root.addChild(Foggy);
Root.stop();
TimerStart = getTimer();
Foggy.addEventListener(Event.ENTER_FRAME, showProgress);
if (Core.options.sandbox){
tf = new TextField();
tf.textColor = 0xFFFFFF;
tf.text = ("Sandbox Type: " + Security.sandboxType);
tf.x = 10;
tf.y = 10;
tf.width = 300;
Root.addChild(tf);
};
}
private function PlayBranding():void{
var _local1:Sound;
Foggy.removeEventListener(Event.ENTER_FRAME, showProgress);
TimerEnd = getTimer();
Core.debug((("Game loaded in " + (Math.round(((TimerEnd - TimerStart) / 10)) / 100)) + " seconds"));
Core.debug(("> Filesize: " + Core.Root.loaderInfo.bytesTotal));
Logo.play();
if (DomainHasAccess()){
_local1 = new VoiceOver();
_local1.play();
setTimeout(End, 4000);
} else {
Prel.visible = false;
Notice = new LockedNotice();
Notice.x = (Core.StageDims.w / 2);
Notice.y = Prel.y;
Root.addChild(Notice);
};
}
public function LoaderClicked(_arg1:MouseEvent):void{
if (GotoGameOnClick){
Core.Tracking.Click(Core.Tracking.GamePlayURL);
} else {
Core.Tracking.Click();
};
}
private function FOGFly(_arg1:Event):void{
var _local2:Object = _arg1.currentTarget;
_local2.x = (_local2.x + (((_local2.targetX - _local2.x) / _local2.speed) * 0.5));
_local2.y = (_local2.y + (((_local2.targetY - _local2.y) / _local2.speed) * 0.5));
_local2.speed = (_local2.speed * 0.99);
_local2.scaleX = (_local2.scaleY = (_local2.scaleY + (_local2.grow * 2)));
if ((((_local2.alpha < 1)) && (!(_local2.fade)))){
_local2.alpha = (_local2.alpha + 0.01);
};
if ((((((((((_local2.x < -50)) || ((_local2.y < -50)))) || ((_local2.x > (Core.StageDims.w + 50))))) || ((_local2.y > (Core.StageDims.h + 50))))) || ((_local2.scaleX > 2)))){
_local2.fade = true;
};
if (_local2.fade){
_local2.alpha = (_local2.alpha - 0.05);
if (_local2.alpha <= 0){
_local2.removeEventListener(Event.ENTER_FRAME, FOGFly);
_local2.parent.removeChild(_local2);
};
};
}
private function End(_arg1:Boolean=false):void{
Foggy.removeEventListener(MouseEvent.CLICK, LoaderClicked);
Root.removeChild(Foggy);
Root.removeChild(BG);
Root.removeChild(Prel);
Root.removeChild(Logo);
onComplete(Core);
if (((Core.Remote) && (Core.options.remote))){
Core.Remote.Connect();
};
}
}
}//package FOG.AS3
Section 6
//Remote (FOG.AS3.Remote)
package FOG.AS3 {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class Remote {
public var LibFile:String;// = "api/library.swf"
public var Server:String;// = "x.fogdev.com"
public var rLoader:Loader;
public var LibPath:String;// = ""
public var Library:MovieClip;
public var rRequest:URLRequest;
public var Core:Object;
public function Remote(_arg1:CoreAPI):void{
this.Core = _arg1;
}
public function Connect():void{
if (Core.Connect.Linked){
return;
};
Security.allowDomain(Server);
Security.loadPolicyFile((("http://" + Server) + "/crossdomain.xml"));
LibPath = ((((((("http://" + Server) + "/") + LibFile) + "?v=") + Core.options.version) + "&c=") + Math.random());
Core.debug("Remote Tracking");
Core.debug(("> " + LibPath));
rLoader = new Loader();
rRequest = new URLRequest(LibPath);
rLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, function (_arg1:Event):void{
Library = MovieClip(_arg1.target.content);
Library.Connect(Core);
});
rLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{
Core.debug(("> " + _arg1.text));
});
rLoader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, function (_arg1:HTTPStatusEvent):void{
Core.debug(("> " + _arg1.status));
});
rLoader.load(rRequest);
}
}
}//package FOG.AS3
Section 7
//Scores (FOG.AS3.Scores)
package FOG.AS3 {
public class Scores {
public var CryptScore:String;// = ""
public var HighScore:Number;// = 0
public var Score:Number;// = 0
public var Debug:Boolean;// = true
public var Options:Object;
public var Core:Object;
public function Scores(_arg1:CoreAPI):void{
Options = {order:"DESC", type:"INT"};
super();
this.Core = _arg1;
if (!Core.Connect){
throw (new Error("You cannot use FogAPI.Scores Plugin without loading FogAPI.Connect Plugin first"));
};
}
public function GetScoreKey(_arg1:Number):String{
return (Base64.encode(((Core.Read("Token") + ":") + _arg1)));
}
public function Update(_arg1:Number, _arg2:Boolean=true):Boolean{
if (_arg1 != Score){
HighScore = Core.Connect.User.HighScore;
Score = _arg1;
if (Debug){
Core.debug((((((((("Score Update: " + Options.order) + " - ") + Score) + " - ") + HighScore) + " (") + _arg2) + ")"));
};
if (((Options.order == "DESC")) ? (Score > HighScore) : (((Score < HighScore)) || ((HighScore === 0)))){
if (_arg2){
Save();
};
HighScore = Score;
Core.Connect.User.HighScore = HighScore;
};
if (Core.Connect.Linked){
Core.Connect.Call("scores.update", Score);
};
};
return (true);
}
public function Publish(_arg1:Boolean=false):void{
CryptScore = GetScoreKey(Score);
if (Core.Connect.Linked){
Core.Connect.Call("scores.publish", CryptScore, _arg1);
} else {
if (Debug){
Core.debug(((("Publishing Score: " + Score) + " - ") + CryptScore));
};
Core.Tracking.Click(Core.Tracking.GamePlayURL);
};
}
public function Scoreboard():void{
if (Core.Connect.Linked){
Core.Connect.Call("scores.scoreboard");
} else {
Core.Tracking.Click(Core.Tracking.ScoreboardURL);
};
}
public function Save():void{
if (Core.Connect.Linked){
Core.Connect.Call("scores.save", GetScoreKey(Score));
};
}
}
}//package FOG.AS3
Section 8
//Storage (FOG.AS3.Storage)
package FOG.AS3 {
import flash.net.*;
public class Storage {
public var CurrentData:String;// = ""
public var DataID:String;// = ""
public var Locals:Array;
public var Connected:Boolean;// = false
public var Data:SharedObject;
public var LastSave:String;// = ""
public var Core:Object;
public function Storage(_arg1:CoreAPI):void{
Locals = new Array();
super();
Core = _arg1;
if (!Core.Connect){
throw (new Error("You cannot use FogAPI.Storage Plugin without loading FogAPI.Connect Plugin first"));
};
DataID = ((Core.options.game.fogid + ".") + Core.Connect.User.ID);
Data = SharedObject.getLocal(DataID);
}
public function Set(_arg1, _arg2=true, _arg3:Boolean=true):Boolean{
var _local4:*;
if (typeof(_arg1) == "object"){
for (_local4 in _arg1) {
_arg1[_local4] = Set(_local4, _arg1[_local4]);
};
return (_arg1);
};
Data.data[_arg1] = _arg2;
if (_arg3){
Save();
};
return (true);
}
public function Decode(_arg1:String):Object{
var _local2:String = _arg1;
var _local3:String = Base64.decode(_local2);
var _local4:Object = JSON.decode(_local3);
return (_local4);
}
public function Load(_arg1=""):Boolean{
var _local2:*;
var _local4:String;
var _local5:SharedObject;
var _local6:*;
Connected = true;
Core.debug("Attempting to load Storage");
if (!Core.Connect.Linked){
_local2 = "";
} else {
_local2 = Core.Connect.Call("storage.load", Core.options.game.fogid);
};
if (!_local2){
Core.debug("> Could not load storage. Reverting to local flash storage");
Core.debug((("> Loaded " + Data.size) + " bytes from local memory"));
return (false);
};
Core.debug((("> Loaded " + _local2.length) + " bytes of data from FogAPI Server"));
Clear(false);
var _local3:Object = Decode(_local2);
for (_local4 in _local3) {
if (_local4.indexOf("_") === 0){
_local5 = GetLocal(_local4.substr(1));
for (_local6 in _local3[_local4]) {
_local5.data[_local6] = _local3[_local4][_local6];
};
} else {
Data.data[_local4] = _local3[_local4];
};
};
if (_arg1){
_arg1(_local2);
};
return (true);
}
public function Encode(_arg1):String{
var _local2:* = _arg1;
_local2 = JSON.encode(_local2);
_local2 = Base64.encode(_local2);
return (_local2);
}
public function GetLocal(_arg1:String=""):SharedObject{
var _local2:SharedObject = SharedObject.getLocal(((DataID + ".") + _arg1));
Locals.push([_arg1, _local2]);
return (_local2);
}
public function Get(_arg1:String){
return (Data.data[_arg1]);
}
public function Sync():void{
var _local1:int;
var _local2:int = Locals.length;
while (_local1 < _local2) {
Set(("_" + Locals[_local1][0]), Locals[_local1][1].data, false);
_local1++;
};
Save();
}
public function Clear(_arg1:Boolean=true):void{
var _local2:int;
var _local3:int = Locals.length;
while (_local2 < _local3) {
Locals[_local2][1].clear();
_local2++;
};
Data.clear();
if (_arg1){
Save();
};
}
public function Save():Boolean{
if (!Connected){
throw (new Error("You can't save data to the server when the game is not synced. Please use FogAPI.Storage.Load() to Initialize Sync"));
};
CurrentData = Encode(Data.data);
Core.debug((("Saving " + CurrentData.length) + " bytes of data"));
if (!Core.Connect.Linked){
Core.debug("> to Flash Local");
return (false);
};
Core.debug("> to FogAPI Server");
if (CurrentData != LastSave){
LastSave = CurrentData;
return ((Core.Connect.Call("storage.save", Core.options.game.fogid, CurrentData)) ? true : false);
//unresolved jump
};
return (true);
}
}
}//package FOG.AS3
Section 9
//Tracking (FOG.AS3.Tracking)
package FOG.AS3 {
import flash.net.*;
public class Tracking {
public var GamePlayURL:String;// = "http://www.freeonlinegames.com/{$game.category}/{$game.name}.html"
public var DefaultURL:String;// = "http://www.freeonlinegames.com/"
public var FreeGamesURL:String;// = "http://www.freegamesforyourwebsite.com/"
public var ScoreboardURL:String;// = "http://www.freeonlinegames.com/scores/{$game.name}.html"
public var Core:Object;
public function Tracking(_arg1:CoreAPI):void{
this.Core = _arg1;
}
public function Click(_arg1:String=""):Boolean{
var _local2:String = (_arg1) ? _arg1 : DefaultURL;
_local2 = _local2.replace("{$game.name}", Core.options.game.name);
_local2 = _local2.replace("{$game.category}", Core.options.game.category);
var _local3:String = ((("?utm_source=" + Core.urlInfo.domain) + "&utm_medium=api-game&utm_campaign=") + Core.options.game.name);
var _local4:String = (_local2 + _local3);
Core.debug("Tracking..");
Core.debug(("> " + _local4));
if (Core.options.sandbox){
return (false);
};
navigateToURL(new URLRequest(_local4), "_blank");
return (true);
}
public function RegisterEvent(_arg1:String):void{
}
}
}//package FOG.AS3
Section 10
//bonus_77 (ski_fla.bonus_77)
package ski_fla {
import flash.display.*;
import flash.text.*;
public dynamic class bonus_77 extends MovieClip {
public var guibonus:TextField;
public function bonus_77(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ski_fla
Section 11
//completeanim_mc_95 (ski_fla.completeanim_mc_95)
package ski_fla {
import flash.display.*;
public dynamic class completeanim_mc_95 extends MovieClip {
public function completeanim_mc_95(){
addFrameScript(0, frame1);
}
function frame1(){
MovieClip(parent).gotoAndStop("complete3");
}
}
}//package ski_fla
Section 12
//instructionsmenu_mc_17 (ski_fla.instructionsmenu_mc_17)
package ski_fla {
import flash.display.*;
public dynamic class instructionsmenu_mc_17 extends MovieClip {
public var b_more:SimpleButton;
public var b_start:SimpleButton;
public var b_free:SimpleButton;
public function instructionsmenu_mc_17(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ski_fla
Section 13
//level2Frames_80 (ski_fla.level2Frames_80)
package ski_fla {
import flash.display.*;
public dynamic class level2Frames_80 extends MovieClip {
public var level2:SimpleButton;
public function level2Frames_80(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ski_fla
Section 14
//level3Frames_82 (ski_fla.level3Frames_82)
package ski_fla {
import flash.display.*;
public dynamic class level3Frames_82 extends MovieClip {
public var level3:SimpleButton;
public function level3Frames_82(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ski_fla
Section 15
//level4Frames_84 (ski_fla.level4Frames_84)
package ski_fla {
import flash.display.*;
public dynamic class level4Frames_84 extends MovieClip {
public var level4:SimpleButton;
public function level4Frames_84(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ski_fla
Section 16
//level5Frames_86 (ski_fla.level5Frames_86)
package ski_fla {
import flash.display.*;
public dynamic class level5Frames_86 extends MovieClip {
public var level5:SimpleButton;
public function level5Frames_86(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ski_fla
Section 17
//maps_mc_76 (ski_fla.maps_mc_76)
package ski_fla {
import flash.display.*;
public dynamic class maps_mc_76 extends MovieClip {
public function maps_mc_76(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
}
}//package ski_fla
Section 18
//menuanim_mc_1 (ski_fla.menuanim_mc_1)
package ski_fla {
import flash.display.*;
public dynamic class menuanim_mc_1 extends MovieClip {
public function menuanim_mc_1(){
addFrameScript(55, frame56);
}
function frame56(){
MovieClip(parent).gotoAndStop("mainmenu");
}
}
}//package ski_fla
Section 19
//np_airBToL_55 (ski_fla.np_airBToL_55)
package ski_fla {
import flash.display.*;
public dynamic class np_airBToL_55 extends MovieClip {
public function np_airBToL_55(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package ski_fla
Section 20
//np_airFToR_57 (ski_fla.np_airFToR_57)
package ski_fla {
import flash.display.*;
public dynamic class np_airFToR_57 extends MovieClip {
public function np_airFToR_57(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package ski_fla
Section 21
//np_airLToF_56 (ski_fla.np_airLToF_56)
package ski_fla {
import flash.display.*;
public dynamic class np_airLToF_56 extends MovieClip {
public function np_airLToF_56(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package ski_fla
Section 22
//np_airRToB_54 (ski_fla.np_airRToB_54)
package ski_fla {
import flash.display.*;
public dynamic class np_airRToB_54 extends MovieClip {
public function np_airRToB_54(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package ski_fla
Section 23
//np_backflipL_43 (ski_fla.np_backflipL_43)
package ski_fla {
import flash.display.*;
public dynamic class np_backflipL_43 extends MovieClip {
public function np_backflipL_43(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package ski_fla
Section 24
//np_backflipR_42 (ski_fla.np_backflipR_42)
package ski_fla {
import flash.display.*;
public dynamic class np_backflipR_42 extends MovieClip {
public function np_backflipR_42(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package ski_fla
Section 25
//np_BToL_59 (ski_fla.np_BToL_59)
package ski_fla {
import flash.display.*;
public dynamic class np_BToL_59 extends MovieClip {
public function np_BToL_59(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package ski_fla
Section 26
//np_fallL_53 (ski_fla.np_fallL_53)
package ski_fla {
import flash.display.*;
public dynamic class np_fallL_53 extends MovieClip {
public function np_fallL_53(){
addFrameScript(44, frame45);
}
function frame45(){
stop();
}
}
}//package ski_fla
Section 27
//np_fallR_52 (ski_fla.np_fallR_52)
package ski_fla {
import flash.display.*;
public dynamic class np_fallR_52 extends MovieClip {
public function np_fallR_52(){
addFrameScript(44, frame45);
}
function frame45(){
stop();
}
}
}//package ski_fla
Section 28
//np_frontflipL_45 (ski_fla.np_frontflipL_45)
package ski_fla {
import flash.display.*;
public dynamic class np_frontflipL_45 extends MovieClip {
public function np_frontflipL_45(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package ski_fla
Section 29
//np_frontflipR_44 (ski_fla.np_frontflipR_44)
package ski_fla {
import flash.display.*;
public dynamic class np_frontflipR_44 extends MovieClip {
public function np_frontflipR_44(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package ski_fla
Section 30
//np_FToR_61 (ski_fla.np_FToR_61)
package ski_fla {
import flash.display.*;
public dynamic class np_FToR_61 extends MovieClip {
public function np_FToR_61(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package ski_fla
Section 31
//np_gameoverL_69 (ski_fla.np_gameoverL_69)
package ski_fla {
import flash.display.*;
public dynamic class np_gameoverL_69 extends MovieClip {
public function np_gameoverL_69(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package ski_fla
Section 32
//np_gameoverR_68 (ski_fla.np_gameoverR_68)
package ski_fla {
import flash.display.*;
public dynamic class np_gameoverR_68 extends MovieClip {
public function np_gameoverR_68(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package ski_fla
Section 33
//np_jumpairB_37 (ski_fla.np_jumpairB_37)
package ski_fla {
import flash.display.*;
public dynamic class np_jumpairB_37 extends MovieClip {
public function np_jumpairB_37(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package ski_fla
Section 34
//np_jumpairF_39 (ski_fla.np_jumpairF_39)
package ski_fla {
import flash.display.*;
public dynamic class np_jumpairF_39 extends MovieClip {
public function np_jumpairF_39(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package ski_fla
Section 35
//np_jumpairL_35 (ski_fla.np_jumpairL_35)
package ski_fla {
import flash.display.*;
public dynamic class np_jumpairL_35 extends MovieClip {
public function np_jumpairL_35(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package ski_fla
Section 36
//np_jumpairR_33 (ski_fla.np_jumpairR_33)
package ski_fla {
import flash.display.*;
public dynamic class np_jumpairR_33 extends MovieClip {
public function np_jumpairR_33(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package ski_fla
Section 37
//np_jumpB_64 (ski_fla.np_jumpB_64)
package ski_fla {
import flash.display.*;
public dynamic class np_jumpB_64 extends MovieClip {
public function np_jumpB_64(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package ski_fla
Section 38
//np_jumpF_65 (ski_fla.np_jumpF_65)
package ski_fla {
import flash.display.*;
public dynamic class np_jumpF_65 extends MovieClip {
public function np_jumpF_65(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package ski_fla
Section 39
//np_jumpL_41 (ski_fla.np_jumpL_41)
package ski_fla {
import flash.display.*;
public dynamic class np_jumpL_41 extends MovieClip {
public function np_jumpL_41(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package ski_fla
Section 40
//np_jumpR_40 (ski_fla.np_jumpR_40)
package ski_fla {
import flash.display.*;
public dynamic class np_jumpR_40 extends MovieClip {
public function np_jumpR_40(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package ski_fla
Section 41
//np_landingB_46 (ski_fla.np_landingB_46)
package ski_fla {
import flash.display.*;
public dynamic class np_landingB_46 extends MovieClip {
public function np_landingB_46(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package ski_fla
Section 42
//np_landingF_47 (ski_fla.np_landingF_47)
package ski_fla {
import flash.display.*;
public dynamic class np_landingF_47 extends MovieClip {
public function np_landingF_47(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package ski_fla
Section 43
//np_landingL_49 (ski_fla.np_landingL_49)
package ski_fla {
import flash.display.*;
public dynamic class np_landingL_49 extends MovieClip {
public function np_landingL_49(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package ski_fla
Section 44
//np_landingR_48 (ski_fla.np_landingR_48)
package ski_fla {
import flash.display.*;
public dynamic class np_landingR_48 extends MovieClip {
public function np_landingR_48(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package ski_fla
Section 45
//np_LToF_60 (ski_fla.np_LToF_60)
package ski_fla {
import flash.display.*;
public dynamic class np_LToF_60 extends MovieClip {
public function np_LToF_60(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package ski_fla
Section 46
//np_RToB_58 (ski_fla.np_RToB_58)
package ski_fla {
import flash.display.*;
public dynamic class np_RToB_58 extends MovieClip {
public function np_RToB_58(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package ski_fla
Section 47
//np_win1L_67 (ski_fla.np_win1L_67)
package ski_fla {
import flash.display.*;
public dynamic class np_win1L_67 extends MovieClip {
public function np_win1L_67(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package ski_fla
Section 48
//np_win1R_66 (ski_fla.np_win1R_66)
package ski_fla {
import flash.display.*;
public dynamic class np_win1R_66 extends MovieClip {
public function np_win1R_66(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package ski_fla
Section 49
//pere_13 (ski_fla.pere_13)
package ski_fla {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import flash.external.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class pere_13 extends MovieClip {
public function pere_13(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
if (MovieClip(root).currentFrame == 3){
if (MovieClip(root).intructDone == false){
MovieClip(root).gotoAndStop("instructionsanim");
MovieClip(root).intructDone = true;
} else {
MovieClip(root).gotoAndStop(8);
};
} else {
if (MovieClip(root).currentFrame == 4){
MovieClip(root).gotoAndStop(8);
} else {
if (MovieClip(root).currentFrame == 5){
MovieClip(root).gotoAndStop(7);
} else {
if (MovieClip(root).currentFrame == 6){
MovieClip(root).gotoAndStop(6);
} else {
if (MovieClip(root).currentFrame == 7){
MovieClip(root).gotoAndStop(6);
} else {
if (MovieClip(root).currentFrame == 8){
MovieClip(root).gotoAndPlay("playgame");
} else {
if (MovieClip(root).currentFrame == 9){
MovieClip(root).gotoAndPlay(12);
};
};
};
};
};
};
};
}
function frame1(){
stop();
}
}
}//package ski_fla
Section 50
//BackgroundGraphic (BackgroundGraphic)
package {
import flash.display.*;
public dynamic class BackgroundGraphic extends MovieClip {
}
}//package
Section 51
//Key (Key)
package {
import flash.display.*;
import flash.events.*;
public class Key {
private static var initialized:Boolean = false;
private static var keysDown:Object = new Object();
public static function initialize(_arg1:Stage){
if (!initialized){
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
_arg1.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
_arg1.addEventListener(Event.DEACTIVATE, clearKeys);
initialized = true;
};
}
private static function clearKeys(_arg1:Event):void{
keysDown = new Object();
}
public static function isDown(_arg1:uint):Boolean{
if (!initialized){
throw (new Error("Key class has yet been initialized."));
};
return (Boolean((_arg1 in keysDown)));
}
private static function keyPressed(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = true;
}
private static function keyReleased(_arg1:KeyboardEvent):void{
if ((_arg1.keyCode in keysDown)){
delete keysDown[_arg1.keyCode];
};
}
}
}//package
Section 52
//KeyCheck (KeyCheck)
package {
public class KeyCheck {
var demo:Boolean;
var log:Array;
var rec:Boolean;
var keys:Array;
var logpos:Number;
public function KeyCheck(){
keys = new Array();
log = new Array();
demo = false;
rec = false;
logpos = 0;
}
function pressing(_arg1){
return (keys[_arg1].pressing);
}
function stoppRec(){
rec = false;
demo = false;
}
function startDemo(){
logpos = 0;
demo = true;
rec = false;
}
function updater(){
var _local1:*;
if (demo){
keys = log[logpos];
logpos = (logpos + 1);
if (logpos > (log.length - 1)){
keys = undefined;
};
} else {
for (_local1 in keys) {
if (Key.isDown(keys[_local1].kc)){
if (keys[_local1].release){
keys[_local1].pressing = true;
keys[_local1].release = false;
keys[_local1].releasing = false;
} else {
keys[_local1].pressing = false;
};
keys[_local1].press = true;
} else {
if (keys[_local1].press){
keys[_local1].releasing = true;
keys[_local1].press = false;
keys[_local1].pressing = false;
} else {
keys[_local1].releasing = false;
};
keys[_local1].release = true;
};
};
if (rec){
log.push(keys.clone());
};
};
}
function addKeyCheck(_arg1){
var _local2:Object = new Object();
_local2.pressing = false;
_local2.press = false;
_local2.releasing = false;
_local2.release = true;
_local2.kc = _arg1;
keys[_arg1] = _local2;
}
function releasing(_arg1){
return (keys[_arg1].releasing);
}
function startRec(){
log = new Array();
rec = true;
demo = false;
}
function stoppDemo(){
demo = false;
rec = false;
}
function press(_arg1){
return (keys[_arg1].press);
}
function reset(){
var _local1:*;
for (_local1 in keys) {
keys[_local1].release = true;
keys[_local1].releasing = false;
keys[_local1].pressing = false;
keys[_local1].press = false;
};
}
function release(_arg1){
return (keys[_arg1].release);
}
}
}//package
Section 53
//l0101 (l0101)
package {
import flash.display.*;
public dynamic class l0101 extends MovieClip {
}
}//package
Section 54
//l0101o (l0101o)
package {
import flash.display.*;
public dynamic class l0101o extends MovieClip {
}
}//package
Section 55
//l0102 (l0102)
package {
import flash.display.*;
public dynamic class l0102 extends MovieClip {
}
}//package
Section 56
//l0102o (l0102o)
package {
import flash.display.*;
public dynamic class l0102o extends MovieClip {
}
}//package
Section 57
//l0103 (l0103)
package {
import flash.display.*;
public dynamic class l0103 extends MovieClip {
}
}//package
Section 58
//l0103o (l0103o)
package {
import flash.display.*;
public dynamic class l0103o extends MovieClip {
}
}//package
Section 59
//l0104 (l0104)
package {
import flash.display.*;
public dynamic class l0104 extends MovieClip {
}
}//package
Section 60
//l0104o (l0104o)
package {
import flash.display.*;
public dynamic class l0104o extends MovieClip {
}
}//package
Section 61
//l0201 (l0201)
package {
import flash.display.*;
public dynamic class l0201 extends MovieClip {
}
}//package
Section 62
//l0201o (l0201o)
package {
import flash.display.*;
public dynamic class l0201o extends MovieClip {
}
}//package
Section 63
//l0202 (l0202)
package {
import flash.display.*;
public dynamic class l0202 extends MovieClip {
}
}//package
Section 64
//l0202o (l0202o)
package {
import flash.display.*;
public dynamic class l0202o extends MovieClip {
}
}//package
Section 65
//l0203 (l0203)
package {
import flash.display.*;
public dynamic class l0203 extends MovieClip {
}
}//package
Section 66
//l0203o (l0203o)
package {
import flash.display.*;
public dynamic class l0203o extends MovieClip {
}
}//package
Section 67
//l0204 (l0204)
package {
import flash.display.*;
public dynamic class l0204 extends MovieClip {
}
}//package
Section 68
//l0204o (l0204o)
package {
import flash.display.*;
public dynamic class l0204o extends MovieClip {
}
}//package
Section 69
//l0301 (l0301)
package {
import flash.display.*;
public dynamic class l0301 extends MovieClip {
}
}//package
Section 70
//l0301o (l0301o)
package {
import flash.display.*;
public dynamic class l0301o extends MovieClip {
}
}//package
Section 71
//l0302 (l0302)
package {
import flash.display.*;
public dynamic class l0302 extends MovieClip {
}
}//package
Section 72
//l0302o (l0302o)
package {
import flash.display.*;
public dynamic class l0302o extends MovieClip {
}
}//package
Section 73
//l0303 (l0303)
package {
import flash.display.*;
public dynamic class l0303 extends MovieClip {
}
}//package
Section 74
//l0303o (l0303o)
package {
import flash.display.*;
public dynamic class l0303o extends MovieClip {
}
}//package
Section 75
//l0304 (l0304)
package {
import flash.display.*;
public dynamic class l0304 extends MovieClip {
}
}//package
Section 76
//l0304o (l0304o)
package {
import flash.display.*;
public dynamic class l0304o extends MovieClip {
}
}//package
Section 77
//l0401 (l0401)
package {
import flash.display.*;
public dynamic class l0401 extends MovieClip {
}
}//package
Section 78
//l0401o (l0401o)
package {
import flash.display.*;
public dynamic class l0401o extends MovieClip {
}
}//package
Section 79
//l0402 (l0402)
package {
import flash.display.*;
public dynamic class l0402 extends MovieClip {
}
}//package
Section 80
//l0402o (l0402o)
package {
import flash.display.*;
public dynamic class l0402o extends MovieClip {
}
}//package
Section 81
//l0403 (l0403)
package {
import flash.display.*;
public dynamic class l0403 extends MovieClip {
}
}//package
Section 82
//l0403o (l0403o)
package {
import flash.display.*;
public dynamic class l0403o extends MovieClip {
}
}//package
Section 83
//l0404 (l0404)
package {
import flash.display.*;
public dynamic class l0404 extends MovieClip {
}
}//package
Section 84
//l0404o (l0404o)
package {
import flash.display.*;
public dynamic class l0404o extends MovieClip {
}
}//package
Section 85
//l0501 (l0501)
package {
import flash.display.*;
public dynamic class l0501 extends MovieClip {
}
}//package
Section 86
//l0501o (l0501o)
package {
import flash.display.*;
public dynamic class l0501o extends MovieClip {
}
}//package
Section 87
//l0502 (l0502)
package {
import flash.display.*;
public dynamic class l0502 extends MovieClip {
}
}//package
Section 88
//l0502o (l0502o)
package {
import flash.display.*;
public dynamic class l0502o extends MovieClip {
}
}//package
Section 89
//l0503 (l0503)
package {
import flash.display.*;
public dynamic class l0503 extends MovieClip {
}
}//package
Section 90
//l0503o (l0503o)
package {
import flash.display.*;
public dynamic class l0503o extends MovieClip {
}
}//package
Section 91
//l0504 (l0504)
package {
import flash.display.*;
public dynamic class l0504 extends MovieClip {
}
}//package
Section 92
//l0504o (l0504o)
package {
import flash.display.*;
public dynamic class l0504o extends MovieClip {
}
}//package
Section 93
//LockedNotice (LockedNotice)
package {
import flash.display.*;
public dynamic class LockedNotice extends MovieClip {
}
}//package
Section 94
//LogoFly (LogoFly)
package {
import flash.display.*;
public dynamic class LogoFly extends MovieClip {
public function LogoFly(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 95
//LogoSpin (LogoSpin)
package {
import flash.display.*;
public dynamic class LogoSpin extends MovieClip {
}
}//package
Section 96
//movingScrollObject (movingScrollObject)
package {
class movingScrollObject extends scrollObject {
public var _speed_x:Number;
var _act_x:Number;
var _act_y:Number;
public var _speed_y:Number;
var _p:Number;
public var _platformObject:platformObject;
var _speed_p:Number;
function movingScrollObject(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10){
super(_arg1, String(_arg2), _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10);
_speed_x = (_speed_y = 0);
_act_x = (_act_y = 0);
_p = 3;
_speed_p = 0;
}
override function updateSkjermPosition():void{
updateSpeedPosition();
if (_platformObject != null){
_mc.rotation = (_mc.rotation + ((((Math.atan(_platformObject._derivert) * 180) / Math.PI) - _mc.rotation) / 4));
};
_mc.x = (_scrollfactor_x * (_pos_x - _sc2d._origo_x));
_mc.y = (_scrollfactor_y * (_pos_y - _sc2d._origo_y));
}
function setSpeed():void{
_speed_x = (_speed_p * Math.cos(Math.atan(_platformObject._derivert)));
_speed_y = (_speed_p * Math.sin(Math.atan(_platformObject._derivert)));
}
function updateSpeedPosition():void{
updateSpeed();
updatePosition();
}
function updatePosition():void{
var _local1:Object;
var _local2:Object;
if (_platformObject == null){
_local1 = _sc2d.checkCollision(_pos_x, _pos_y, (_pos_x + _speed_x), (_pos_y + _speed_y));
if (!_local1.k){
_pos_x = (_pos_x + _speed_x);
_pos_y = (_pos_y + _speed_y);
} else {
_platformObject = _local1.o;
_p = _local1.p;
_pos_x = _local1.x;
_pos_y = _local1.y;
collisionSpeed();
};
} else {
_p = (_p + _speed_p);
_speed_p = (_speed_p + (0.9 * _platformObject._derivert));
_speed_p = (_speed_p * 0.99);
if (_speed_p > 90){
_speed_p = 90;
} else {
if (_speed_p < -90){
_speed_p = -90;
};
};
_local2 = _platformObject.coordinate(_p);
if (_local2.u){
if (_local2.n == undefined){
_pos_x = _local2.x;
_pos_y = _local2.y;
setSpeed();
_platformObject = undefined;
} else {
_platformObject = _local2.n;
_p = _local2.p;
_local2 = _platformObject.coordinate(_p);
_pos_x = _local2.x;
_pos_y = _local2.y;
};
} else {
_pos_x = _local2.x;
_pos_y = _local2.y;
};
};
}
function collisionSpeed():void{
var _local1:Number = Math.sqrt(((_speed_x * _speed_x) + (_speed_y * _speed_y)));
var _local2:* = (Math.atan2(_speed_y, _speed_x) - Math.atan(_platformObject._derivert));
_speed_p = (0.5 * Math.abs((_local1 * Math.cos(_local2))));
if (_speed_x < 0){
_speed_p = (_speed_p * -1);
};
}
function updateSpeed():void{
if (_platformObject == null){
_speed_x = (_speed_x + _act_x);
_speed_y = (_speed_y + _act_y);
};
}
}
}//package
Section 97
//overlay (overlay)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.text.*;
public class overlay extends MovieClip {
public var b_again:SimpleButton;
public var b_start:SimpleButton;
public var b_more:SimpleButton;
public var timetxt:TextField;
public var b_menu:SimpleButton;
var _main:Object;
public var scoretxt:TextField;
public var ml:MovieClip;
public var b_free:SimpleButton;
public var leveltxt:TextField;
public var b_cont:SimpleButton;
public function overlay(_arg1:Object){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 5, frame6, 6, frame7, 8, frame9, 9, frame10, 11, frame12, 12, frame13, 13, frame14);
_main = _arg1;
this.gotoAndStop("startlevel");
}
private function backToMenu(_arg1:MouseEvent):void{
b_again.removeEventListener(MouseEvent.CLICK, playAgain);
b_menu.removeEventListener(MouseEvent.CLICK, backToMenu);
_main.backToMenu();
}
function frame6(){
stop();
}
private function playAgain(_arg1:MouseEvent):void{
b_again.removeEventListener(MouseEvent.CLICK, playAgain);
b_menu.removeEventListener(MouseEvent.CLICK, backToMenu);
_main.playAgain();
}
function frame12(){
stop();
}
function frame13(){
stop();
}
function frame14(){
stop();
b_again.addEventListener(MouseEvent.CLICK, endGame);
b_more.addEventListener(MouseEvent.CLICK, pmg_F);
b_free.addEventListener(MouseEvent.CLICK, fgfyw_F);
ml.addEventListener(MouseEvent.CLICK, mlPressed);
}
public function pmg_F(_arg1:MouseEvent):void{
MovieClip(root).FogAPI.Tracking.Click();
}
public function mlPressed(_arg1:MouseEvent):void{
MovieClip(root).FogAPI.Tracking.Click();
}
function frame10(){
stop();
b_cont.addEventListener(MouseEvent.CLICK, continueGame);
ml.addEventListener(MouseEvent.CLICK, mlPressed);
}
private function freeGame(_arg1:MouseEvent):void{
b_again.removeEventListener(MouseEvent.CLICK, endGame);
b_more.removeEventListener(MouseEvent.CLICK, moreGame);
b_free.removeEventListener(MouseEvent.CLICK, freeGame);
navigateToURL(new URLRequest("http://www.freegamesforyourwebsite.com"), "_self");
}
private function updateTexts():void{
leveltxt.text = ("LEVEL " + String((_main._level + 1)));
timetxt.text = (("TIME LIMIT: " + String(_main._leveldatas[_main._level].timelimit)) + " SEC");
scoretxt.text = ("MINIMUM SCORE: " + String(_main._leveldatas[_main._level].scoremin));
}
private function moreGame(_arg1:MouseEvent):void{
b_again.removeEventListener(MouseEvent.CLICK, endGame);
b_more.removeEventListener(MouseEvent.CLICK, moreGame);
b_free.removeEventListener(MouseEvent.CLICK, freeGame);
navigateToURL(new URLRequest("http://fog.com"), "_self");
}
public function fgfyw_F(_arg1:MouseEvent):void{
MovieClip(root).FogAPI.Tracking.Click("http://www.freegamesforyourwebsite.com/");
}
function frame1(){
stop();
updateTexts();
b_start.addEventListener(MouseEvent.CLICK, startGame);
ml.addEventListener(MouseEvent.CLICK, mlPressed);
}
private function endGame(_arg1:MouseEvent):void{
b_again.removeEventListener(MouseEvent.CLICK, endGame);
b_more.removeEventListener(MouseEvent.CLICK, moreGame);
b_free.removeEventListener(MouseEvent.CLICK, freeGame);
_main.backToMenu();
}
function frame4(){
stop();
b_again.addEventListener(MouseEvent.CLICK, playAgain);
b_menu.addEventListener(MouseEvent.CLICK, backToMenu);
ml.addEventListener(MouseEvent.CLICK, mlPressed);
}
function frame7(){
stop();
b_again.addEventListener(MouseEvent.CLICK, playAgain);
b_menu.addEventListener(MouseEvent.CLICK, backToMenu);
ml.addEventListener(MouseEvent.CLICK, mlPressed);
}
private function startGame(_arg1:MouseEvent):void{
b_start.removeEventListener(MouseEvent.CLICK, startGame);
_main.gameStart();
}
function frame3(){
stop();
}
private function continueGame(_arg1:MouseEvent):void{
b_cont.removeEventListener(MouseEvent.CLICK, continueGame);
_main.changeLevel();
}
function frame9(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 98
//pauseanim (pauseanim)
package {
import flash.display.*;
public dynamic class pauseanim extends MovieClip {
public function pauseanim(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 99
//pausemenu (pausemenu)
package {
import flash.display.*;
public dynamic class pausemenu extends MovieClip {
public var b_more:SimpleButton;
public var b_free:SimpleButton;
public var b_resume:SimpleButton;
public function pausemenu(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 100
//platformObject (platformObject)
package {
import flash.display.*;
class platformObject extends scrollObject {
private const DRAWPLATFORM:Boolean = false;
private var _y1:Number;
public var _derivert:Number;
private var _floor:Boolean;
private var _oneWay:Boolean;
public var _pmax:Number;
private var _x1:Number;
public var _type:Number;
private var _x2:Number;
public var _rightPlatform:platformObject;
private var _y2:Number;
public var _leftPlatform:platformObject;
function platformObject(_arg1:scroll2D, _arg2:String, _arg3:MovieClip, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Number, _arg11:Number, _arg12:Number, _arg13:Number, _arg14:Number=0, _arg15:Number=0xFF0000){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, 1, 1);
_x1 = _arg10;
_y1 = _arg11;
_x2 = _arg12;
_y2 = _arg13;
_type = _arg14;
_pmax = Math.sqrt((((_arg12 - _arg10) * (_arg12 - _arg10)) + ((_arg13 - _arg11) * (_arg13 - _arg11))));
_derivert = ((_arg13 - _arg11) / (_arg12 - _arg10));
_oneWay = true;
_floor = true;
if (DRAWPLATFORM){
_arg3.graphics.lineStyle(2, _arg15, 1);
_arg3.graphics.moveTo(_arg10, _arg11);
_arg3.graphics.lineTo(_arg12, _arg13);
};
}
function coordinate(_arg1:Number):Object{
var _local2:Object = {x:0, y:0, u:false};
_local2.x = ((_pos_x + _x1) + ((_arg1 * (_x2 - _x1)) / _pmax));
_local2.y = ((_pos_y + _y1) + ((_arg1 * (_y2 - _y1)) / _pmax));
if (_arg1 < 0){
_local2.u = true;
_local2.n = _leftPlatform;
if (_leftPlatform == null){
_local2.x = (_pos_x + _x1);
_local2.y = (_pos_y + _y1);
} else {
if ((_leftPlatform._derivert - _derivert) < -0.2){
_local2.n = null;
} else {
_local2.p = (_leftPlatform._pmax + _arg1);
};
};
} else {
if (_arg1 > _pmax){
_local2.u = true;
_local2.n = _rightPlatform;
if (_rightPlatform == null){
_local2.x = ((_pos_x + _x1) + (((_pmax + 1) * (_x2 - _x1)) / _pmax));
_local2.y = ((_pos_y + _y1) + (((_pmax + 1) * (_y2 - _y1)) / _pmax));
} else {
if (((((_rightPlatform._derivert - _derivert) > 0.2)) && (!(Key.isDown(40))))){
_local2.n = null;
_local2.x = ((_pos_x + _x1) + (((_pmax + 1) * (_x2 - _x1)) / _pmax));
_local2.y = ((_pos_y + _y1) + (((_pmax + 1) * (_y2 - _y1)) / _pmax));
} else {
_local2.p = (_arg1 - _pmax);
};
};
};
};
return (_local2);
}
function addRightPlatform(_arg1:platformObject):void{
_rightPlatform = _arg1;
_rightPlatform._leftPlatform = this;
}
function collision(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Object{
var _local5:Object = intersectionPoint(_arg1, _arg2, _arg3, _arg4, (_pos_x + _x1), (_pos_y + _y1), (_pos_x + _x2), (_pos_y + _y2));
if (_local5.k){
_local5.p = ((_pmax * (_local5.x - _pos_x)) / (_x2 - _x1));
};
return (_local5);
}
function intersectionPoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):Object{
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local9:Object = {k:false, x:0, y:0};
var _local10:Number = (((_arg8 - _arg6) * (_arg3 - _arg1)) - ((_arg7 - _arg5) * (_arg4 - _arg2)));
if (_local10 != 0){
_local11 = (((_arg7 - _arg5) * (_arg2 - _arg6)) - ((_arg8 - _arg6) * (_arg1 - _arg5)));
_local12 = (((_arg3 - _arg1) * (_arg2 - _arg6)) - ((_arg4 - _arg2) * (_arg1 - _arg5)));
_local13 = (_local11 / _local10);
_local14 = (_local12 / _local10);
_local9.x = (_arg1 + (_local13 * (_arg3 - _arg1)));
_local9.y = (_arg2 + (_local14 * (_arg4 - _arg2)));
if ((((((((_local13 >= 0)) && ((_local13 <= 1)))) && ((_local14 >= 0)))) && ((_local14 <= 1)))){
if (_oneWay){
if (_floor){
if (_arg2 < _local9.y){
_local9.k = true;
} else {
if (_derivert > 0){
if (_arg1 > _local9.x){
_local9.k = true;
};
} else {
if (_arg1 < _local9.x){
_local9.k = true;
};
};
};
} else {
if (_arg2 > _local9.y){
_local9.k = true;
};
};
} else {
_local9.k = true;
};
};
};
return (_local9);
}
function addLeftPlatform(_arg1:platformObject):void{
_leftPlatform = _arg1;
_leftPlatform._rightPlatform = this;
}
}
}//package
Section 101
//player (player)
package {
import flash.display.*;
class player extends movingScrollObject {
var satsfart_x:Number;
var satsfart_y:Number;
var akser:Boolean;
var bakketeljar:Number;
public var _act_p:Number;
var railfall:Boolean;
var intro:Boolean;
var korketeljar:Number;
private var _gy:Number;
var rail:Number;
var rotmed:Boolean;
var luft:Number;
private var _main:Object;
private var _gx:Number;
var jumpforce_max:Number;
var fakie:Boolean;
var treffvinkel:Number;
var korkevinkel:Number;
var satsplatform:Number;
var satsblikk;
public var trick:tricks;
private var _skiing:Boolean;
var salto:Number;
var fallteljar:Number;
private var _keysactivated:Boolean;
var rotasjon:Number;
var rotmot:Boolean;
var bremser:Boolean;
private var _sliding:Boolean;
var roterer:Boolean;
public var badlanding:String;
var rotasjonsteljar:Number;
public var _kc:KeyCheck;
var fall:Boolean;
var jumpforce:Number;
var blikk:String;
function player(_arg1, _arg2:MovieClip, _arg3:Object){
satsblikk = player.prototype.blikk;
super(_arg1, _arg2, 5, -400, -10, -10, 10, 10, 1, 1);
_main = _arg3;
trick = new tricks(_arg3);
this.reset();
_act_y = 1.2;
_kc = new KeyCheck();
_kc.addKeyCheck(39);
_kc.addKeyCheck(37);
_kc.addKeyCheck(32);
_kc.addKeyCheck(13);
_kc.addKeyCheck(38);
jumpforce = 0;
jumpforce_max = 13;
blikk = "H";
rotasjonsteljar = 0;
roterer = false;
rotmed = false;
rotmot = false;
akser = false;
bremser = false;
fakie = false;
bakketeljar = 0;
fall = false;
fallteljar = 0;
luft = 0;
rotasjon = 0;
salto = 0;
rail = 0;
railfall = false;
satsblikk = player.prototype.blikk;
satsfart_x = 0;
satsfart_y = 0;
treffvinkel = 0;
satsplatform = 0;
korkevinkel = 0;
korketeljar = 0;
intro = false;
_gx = _main._leveldatas[_main._level].goalx;
_gy = _main._leveldatas[_main._level].goaly;
}
override function updateSkjermPosition():void{
this.updateSpeedPosition();
if (_platformObject != null){
_mc.rotation = (_mc.rotation + ((((Math.atan(_platformObject._derivert) * 180) / Math.PI) - _mc.rotation) / 4));
};
_mc.x = (_scrollfactor_x * (_pos_x - _sc2d._origo_x));
_mc.y = (_scrollfactor_y * (_pos_y - _sc2d._origo_y));
}
override function updatePosition():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if (_pos_y > _gy){
if (_pos_x > _gx){
if (trick.tilstand == "game"){
_main._sControl.stopSound("ski");
_main._sControl.stopSound("slide");
_skiing = (_sliding = false);
trick.maal();
};
};
};
if (intro){
} else {
if (_platformObject == null){
_main._sControl.stopSound("ski");
_main._sControl.stopSound("slide");
_skiing = (_sliding = false);
luft = (luft + 1);
_local1 = Math.round((salto / 360));
_local2 = _sc2d.checkCollision(_pos_x, _pos_y, (_pos_x + _speed_x), (_pos_y + _speed_y));
if (!_local2.k){
_local3 = (_pos_y + (50 * Math.sin(((Math.PI * (_mc.rider_mc.rotation - 90)) / 180))));
if (_local3 > _pos_y){
_local4 = (_pos_x + (50 * Math.cos(((Math.PI * (_mc.rider_mc.rotation - 90)) / 180))));
_local2 = _sc2d.checkCollision(_local4, _local3, (_local4 + _speed_x), (_local3 + _speed_y));
if (((_local2.k) && ((_local2.o._type == 0)))){
_platformObject = _local2.o;
_p = _local2.p;
_pos_x = _local2.x;
_pos_y = _local2.y;
fall = true;
this.landing();
this.collisionSpeed();
} else {
_pos_x = (_pos_x + _speed_x);
_pos_y = (_pos_y + _speed_y);
};
} else {
_pos_x = (_pos_x + _speed_x);
_pos_y = (_pos_y + _speed_y);
};
} else {
if ((((_local2.o._type == 0)) || ((((_local2.o._type == 1)) && ((((blikk == "I")) || ((blikk == "U")))))))){
_platformObject = _local2.o;
_p = _local2.p;
_pos_x = _local2.x;
_pos_y = _local2.y;
this.landing();
this.collisionSpeed();
} else {
_pos_x = (_pos_x + _speed_x);
_pos_y = (_pos_y + _speed_y);
};
};
} else {
if (_platformObject._type == 1){
rail = (rail + Math.abs((_speed_p / 10)));
trick.rail(Math.abs(Math.round((_speed_p / 10))));
};
_act_p = _platformObject._derivert;
if (_act_p > 3){
_act_p = 3;
} else {
if (_act_p < -3){
_act_p = -3;
};
};
_speed_p = (_speed_p + _act_p);
if (fall){
_speed_p = (_speed_p * 0.9);
} else {
_speed_p = (_speed_p * 0.99);
};
if ((((((blikk == "I")) || ((blikk == "U")))) && ((_platformObject._type == 0)))){
_speed_p = (_speed_p * 0.95);
};
if (_speed_p > 75){
_speed_p = 75;
} else {
if (_speed_p < -75){
_speed_p = -75;
};
};
if (blikk == "H"){
if (_speed_p < -2){
fakie = true;
} else {
fakie = false;
};
} else {
if (blikk == "V"){
if (_speed_p > 2){
fakie = true;
} else {
fakie = false;
};
} else {
fakie = false;
};
};
if ((((trick.tilstand == "post")) || ((trick.tilstand == "oot")))){
_speed_p = (_speed_p * 0.85);
if (Math.abs(_speed_p) < 1){
_speed_p = 0;
};
};
_local5 = _platformObject.coordinate(_p);
if (_local5.u){
if (_local5.n == null){
_pos_x = _local5.x;
_pos_y = _local5.y;
this.fartUtforKant();
_platformObject = null;
} else {
_platformObject = _local5.n;
_p = _local5.p;
_local5 = _platformObject.coordinate(_p);
_pos_x = _local5.x;
_pos_y = _local5.y;
};
} else {
_pos_x = _local5.x;
_pos_y = _local5.y;
};
if (_platformObject != null){
if (_platformObject._type == 1){
if ((((blikk == "I")) || ((blikk == "U")))){
} else {
_pos_x = _local5.x;
_pos_y = _local5.y;
this.fartUtforKant();
_platformObject = null;
};
};
};
if (((((fakie) && (bremser))) && ((Math.abs(_speed_p) < 1)))){
_speed_p = 0;
};
if (_platformObject == null){
_main._sControl.stopSound("ski");
_main._sControl.stopSound("slide");
_skiing = (_sliding = false);
} else {
if (Math.abs(_speed_p) > 0.1){
if (_platformObject._type == 0){
if (!_skiing){
_main._sControl.stopSound("slide");
_sliding = false;
_main._sControl.playSound("ski", 0, 100000);
_skiing = true;
};
};
if (_platformObject._type == 1){
if (!_sliding){
_main._sControl.stopSound("ski");
_skiing = false;
_main._sControl.playSound("slide", 0, 100000);
_sliding = true;
};
};
} else {
_main._sControl.stopSound("ski");
_main._sControl.stopSound("slide");
_skiing = (_sliding = false);
};
};
_p = (_p + _speed_p);
};
};
}
function rootreset(){
this.reset();
}
function landing(){
railfall = false;
if (!fall){
treffvinkel = (((Math.atan(_platformObject._derivert) * 180) / Math.PI) - _mc.rider_mc.rotation);
if (Math.abs(treffvinkel) > 60){
if (_platformObject._type == 1){
railfall = true;
if (_pos_x > 9000){
_main._sControl.playSound("landing");
} else {
_main._sControl.playSound("landing");
};
_platformObject = null;
_mc.rider_mc.rotation = (_mc.rider_mc.rotation + 30);
_pos_y = (_pos_y + 3);
} else {
fall = true;
};
};
if (blikk == "H"){
if (treffvinkel > 20){
badlanding = "F";
} else {
if (treffvinkel < -20){
badlanding = "B";
} else {
badlanding = "";
};
};
} else {
if (blikk == "V"){
if (treffvinkel > 20){
badlanding = "B";
} else {
if (treffvinkel < -20){
badlanding = "F";
} else {
badlanding = "";
};
};
} else {
if (Math.abs(treffvinkel) > 20){
badlanding = "S";
} else {
badlanding = "";
};
};
};
};
if (!railfall){
if (fall){
_main._sControl.playSound("fall");
fallteljar = 0;
_mc.rotation = ((Math.atan(_platformObject._derivert) * 180) / Math.PI);
} else {
if ((((_platformObject._type == 1)) && ((_pos_x > 9000)))){
_main._sControl.playSound("landing");
} else {
if (_platformObject._type == 1){
_main._sControl.playSound("landing");
} else {
_main._sControl.playSound("landing");
};
};
_mc.rotation = _mc.rider_mc.rotation;
};
this.triksdaap();
_mc.rider_mc.rotation = 0;
rotmed = false;
rotmot = false;
jumpforce = 0;
luft = 0;
rotasjon = 0;
salto = 0;
rail = 0;
bakketeljar = 0;
};
}
override function setRightFrame(){
var _local1:*;
var _local2:*;
trick.poengvisning();
if (intro){
} else {
if (_platformObject == null){
fall = false;
if (((roterer) || (Key.isDown(38)))){
if (blikk == "H"){
_local1 = "I";
} else {
if (blikk == "I"){
_local1 = "V";
} else {
if (blikk == "V"){
_local1 = "U";
} else {
if (blikk == "U"){
_local1 = "H";
};
};
};
};
this.goto(((("luft" + blikk) + "til") + _local1));
} else {
if (((((_kc.press(37)) && ((blikk == "H")))) && (rotmot))){
this.goto("backflipH");
} else {
if (((((_kc.press(39)) && ((blikk == "V")))) && (rotmed))){
this.goto("backflipV");
} else {
if (((((_kc.press(37)) && ((blikk == "V")))) && (rotmot))){
this.goto("frontflipV");
} else {
if (((((_kc.press(39)) && ((blikk == "H")))) && (rotmed))){
this.goto("frontflipH");
} else {
if (railfall){
this.goto(("landingS" + blikk));
} else {
if (((((!(rotmed)) && (!(rotmot)))) && ((rotasjon == 0)))){
this.goto(("satsluft" + blikk));
} else {
this.goto(("luft" + blikk));
};
};
};
};
};
};
};
} else {
bakketeljar = (bakketeljar + 1);
_local2 = Math.abs(_speed_p);
if (fall){
if (blikk == "I"){
blikk = "V";
} else {
if (blikk == "U"){
blikk = "H";
};
};
this.goto(("fall" + blikk));
fallteljar = (fallteljar + 1);
if (fallteljar > 44){
fall = false;
};
} else {
if (roterer){
if (blikk == "H"){
_local1 = "I";
} else {
if (blikk == "I"){
_local1 = "V";
} else {
if (blikk == "V"){
_local1 = "U";
} else {
if (blikk == "U"){
_local1 = "H";
};
};
};
};
this.goto(((blikk + "til") + _local1));
if ((((trick.tilstand == "oot")) || ((trick.tilstand == "post")))){
roterer = false;
};
} else {
if (_platformObject._type == 1){
if (jumpforce > 0){
this.goto(("sats" + blikk));
_mc.rider_mc.satser_mc.gotoAndStop((jumpforce - 4));
} else {
this.goto(("rail" + blikk));
};
} else {
if ((((jumpforce > 0)) && ((trick.tilstand == "game")))){
if (_local2 < 10){
this.goto(("sats" + blikk));
_mc.rider_mc.satser_mc.gotoAndStop((jumpforce - 4));
} else {
if (fakie){
this.goto((("satsfart" + blikk) + "F"));
_mc.rider_mc.satser_mc.gotoAndStop((jumpforce - 4));
} else {
this.goto(("satsfart" + blikk));
_mc.rider_mc.satser_mc.gotoAndStop((jumpforce - 4));
};
};
} else {
if ((((blikk == "I")) || ((blikk == "U")))){
if (bakketeljar < 15){
this.goto((("landing" + badlanding) + blikk));
} else {
if (_local2 < 10){
this.goto(("ro" + blikk));
};
};
if ((((trick.tilstand == "oot")) || ((trick.tilstand == "post")))){
if (blikk == "I"){
blikk = "V";
} else {
if (blikk == "U"){
blikk = "H";
};
};
};
} else {
if (trick.tilstand == "oot"){
this.goto(("gameover" + blikk));
} else {
if (trick.tilstand == "post"){
if (_main._score >= _main._leveldatas[_main._level].scoremin){
this.goto((("jubel" + trick.jubel()) + blikk));
} else {
this.goto(("gameover" + blikk));
};
} else {
if (bakketeljar < 15){
this.goto((("landing" + badlanding) + blikk));
} else {
if (bremser){
if (_local2 < 2){
this.goto(("bremsro" + blikk));
} else {
this.goto(("brems" + blikk));
};
} else {
if (fakie){
if (akser){
this.goto(("stakeF" + blikk));
} else {
if (_local2 < 10){
this.goto(("ro" + blikk));
} else {
this.goto((("kjore1" + blikk) + "F"));
};
};
} else {
if (akser){
if (_local2 < 60){
if (_local2 < 2){
this.goto(("bremsro" + blikk));
} else {
this.goto(("stake" + blikk));
};
} else {
if (Math.abs(_platformObject._derivert) > 1){
this.goto(("stake" + blikk));
} else {
if (_local2 < 65){
this.goto(("kjore4" + blikk));
} else {
this.goto(("kjore5" + blikk));
};
};
};
} else {
if (_local2 < 3){
this.goto(("ro" + blikk));
} else {
if (_local2 < 5){
this.goto(("kjore1" + blikk));
} else {
if (_local2 < 40){
this.goto(("kjore2" + blikk));
} else {
this.goto(("kjore3" + blikk));
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
function triksdaap(){
var _local1:* = "";
if (fall){
_local1 = "FALL";
} else {
_local1 = "TRICK";
};
var _local2:* = false;
if (_platformObject._type == 1){
_local2 = true;
};
if (!fall){
trick.triks(_local1, luft, salto, rotasjon, fakie, treffvinkel, _local2, satsblikk, satsplatform, blikk);
} else {
trick.fall();
};
}
function fartUtforKant(){
_speed_x = (_speed_p * Math.cos(Math.atan(_platformObject._derivert)));
_speed_y = (_speed_p * Math.sin(Math.atan(_platformObject._derivert)));
satsblikk = blikk;
satsplatform = _platformObject._type;
korketeljar = 0;
korkevinkel = 0;
satsfart_x = _speed_x;
satsfart_y = _speed_y;
if (_platformObject._type == 1){
trick.rail(rail);
};
_mc.rider_mc.rotation = _mc.rotation;
_mc.rotation = 0;
}
function hopp(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
_arg1 = (((_arg1 - 5) * 2) + 5);
if (_arg1 <= 0){
} else {
if (_platformObject != null){
this.fartUtforKant();
_speed_x = (_speed_x * 0.8);
_speed_y = (_speed_y * 0.8);
_local2 = (Math.atan(_platformObject._derivert) - 1.570796);
_local3 = (_arg1 * Math.cos(_local2));
_local4 = (_arg1 * Math.sin(_local2));
_speed_x = (_speed_x + _local3);
_speed_y = (_speed_y + _local4);
_pos_x = (_pos_x + _local3);
_pos_y = (_pos_y + _local4);
_platformObject = null;
};
};
}
function reset(){
_pos_x = _main._leveldatas[_main._level].px;
_pos_y = _main._leveldatas[_main._level].py;
_speed_x = 0;
_speed_y = 0;
jumpforce = 0;
fall = false;
blikk = "H";
_platformObject = null;
_mc.rider_mc.rotation = 0;
_mc.rotation = 0;
trick.reset();
intro = false;
_keysactivated = false;
_skiing = false;
_sliding = false;
}
function resumeSounds(){
if (_skiing){
_main._sControl.stopSound("slide");
_main._sControl.playSound("ski", 0, 100000);
};
if (_sliding){
_main._sControl.stopSound("ski");
_main._sControl.playSound("slide", 0, 100000);
};
}
function goto(_arg1:String):void{
if (_mc.rider_mc.currentLabel != _arg1){
_mc.rider_mc.gotoAndStop(_arg1);
};
}
function keyCheck(){
var _local1:*;
if (_keysactivated){
_kc.updater();
};
if (((!(fall)) && (!(intro)))){
if (_kc.press(38)){
roterer = true;
jumpforce = 0;
};
if (roterer){
rotasjonsteljar = (rotasjonsteljar + 1);
if (_platformObject == null){
rotasjon = (rotasjon + 15);
korkevinkel = (((korketeljar * korkevinkel) + _mc.rider_mc.rotation) / (korketeljar + 1));
korketeljar = (korketeljar + 1);
};
if (rotasjonsteljar == 6){
roterer = false;
rotasjonsteljar = 0;
if (blikk == "H"){
blikk = "I";
} else {
if (blikk == "I"){
blikk = "V";
} else {
if (blikk == "V"){
blikk = "U";
} else {
if (blikk == "U"){
blikk = "H";
};
};
};
};
};
};
_local1 = 0;
if (_kc.press(39)){
if (_platformObject == null){
if (!_kc.press(37)){
if (((_kc.pressing(39)) && (!(rotmot)))){
rotmed = true;
};
if (rotmed){
_mc.rider_mc.rotation = (_mc.rider_mc.rotation + 12);
salto = (salto + 12);
} else {
if (rotmot){
_mc.rider_mc.rotation = (_mc.rider_mc.rotation + 4);
salto = (salto + 4);
};
};
};
} else {
if (!Key.isDown(32)){
if ((((_speed_p < 0)) && ((blikk == "V")))){
bremser = true;
akser = false;
_local1 = (1 + (_act_p / -5));
} else {
bremser = false;
akser = true;
if (((fakie) && ((_platformObject._derivert < 0)))){
if (_speed_p < 0){
bremser = true;
akser = false;
} else {
_local1 = (0.3 + (_act_p / -12));
};
_local1 = (0.5 + (_act_p / -8));
} else {
if ((((blikk == "I")) || ((blikk == "U")))){
if ((((_platformObject._type == 1)) && ((_platformObject._derivert > 0)))){
_local1 = (1 + (_act_p / 8));
};
} else {
_local1 = (1 + (_act_p / 3));
};
};
};
if (_local1 < 0){
_local1 = 0;
};
_speed_p = (_speed_p + _local1);
};
};
} else {
if (((!(_kc.press(37))) && (!((_platformObject == null))))){
bremser = false;
akser = false;
};
};
if (_kc.press(37)){
if (_platformObject == null){
if (!_kc.press(39)){
if (((_kc.pressing(37)) && (!(rotmed)))){
rotmot = true;
};
if (rotmot){
_mc.rider_mc.rotation = (_mc.rider_mc.rotation - 12);
salto = (salto - 12);
} else {
if (rotmed){
_mc.rider_mc.rotation = (_mc.rider_mc.rotation - 4);
salto = (salto - 4);
};
};
};
} else {
if (!Key.isDown(32)){
if ((((_speed_p > 0)) && ((blikk == "H")))){
bremser = true;
akser = false;
_local1 = (-1 + (_act_p / -5));
} else {
bremser = false;
akser = true;
if (((fakie) && ((_platformObject._derivert > 0)))){
if (_speed_p > 0){
bremser = true;
akser = false;
_local1 = (-0.5 + (_act_p / -8));
} else {
_local1 = (-0.3 + (_act_p / -12));
};
} else {
if ((((blikk == "I")) || ((blikk == "U")))){
if ((((_platformObject._type == 1)) && ((_platformObject._derivert < 0)))){
_local1 = (-1 + (_act_p / 8));
};
} else {
_local1 = (-1 + (_act_p / 3));
};
};
};
if (_local1 > 0){
_local1 = 0;
};
_speed_p = (_speed_p + _local1);
};
};
} else {
if (((!(_kc.press(39))) && (!((_platformObject == null))))){
bremser = false;
akser = false;
};
};
if (_kc.pressing(32)){
jumpforce = 5;
} else {
if (_kc.press(32)){
jumpforce = (jumpforce + 1);
if (jumpforce > jumpforce_max){
jumpforce = jumpforce_max;
};
} else {
if (_kc.releasing(32)){
this.hopp(jumpforce);
jumpforce = 0;
};
};
};
};
if (!_keysactivated){
if (_platformObject != null){
_keysactivated = true;
};
};
}
}
}//package
Section 102
//PreloaderBar (PreloaderBar)
package {
import flash.display.*;
public dynamic class PreloaderBar extends SimpleButton {
}
}//package
Section 103
//PreloaderClip (PreloaderClip)
package {
import flash.display.*;
import flash.text.*;
public dynamic class PreloaderClip extends MovieClip {
public var procent:TextField;
public var ProgBar:PreloaderBar;
public function PreloaderClip(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 104
//scroll2D (scroll2D)
package {
import flash.display.*;
class scroll2D {
private var _height:Number;
private var _width:Number;
public var _origo_x:Number;
public var _origo_y:Number;
private var _scrollObjectList:Array;
private var _maxScrollSpeed:Number;
public var _screenHeight:Number;
private var _next_origo_x:Number;
private var _next_origo_y:Number;
private var _objectList:Array;
private var _scrollDivisor:Number;
private var _platformObjectList:Array;
public var _screenWidth:Number;
function scroll2D(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
_width = _arg1;
_height = _arg2;
_screenWidth = _arg3;
_screenHeight = _arg4;
setOrigo(_arg5, _arg6);
_objectList = new Array();
_platformObjectList = new Array();
_scrollObjectList = new Array();
_scrollDivisor = 3;
_maxScrollSpeed = 300;
}
function updateOrigo():void{
var _local4:Number;
var _local1:Number = (_next_origo_x - _origo_x);
var _local2:Number = (_next_origo_y - _origo_y);
var _local3:Number = (Math.sqrt(((_local1 * _local1) + (_local2 * _local2))) / _scrollDivisor);
if (_local3 < 0.5){
setOrigo(_next_origo_x, _next_origo_y);
} else {
if (_local3 > _maxScrollSpeed){
_local3 = _maxScrollSpeed;
};
_local4 = Math.atan2(_local2, _local1);
_origo_x = (_origo_x + (_local3 * Math.cos(_local4)));
_origo_y = (_origo_y + (_local3 * Math.sin(_local4)));
};
}
function checkCollision(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Object{
var _local5:Object;
var _local6:* = 0;
while (_local6 < _platformObjectList.length) {
_local5 = _platformObjectList[_local6].collision(_arg1, _arg2, _arg3, _arg4);
if (_local5.k){
_local5.o = _platformObjectList[_local6];
break;
};
_local6++;
};
return (_local5);
}
function reset():void{
setOrigo(0, 0);
_objectList = new Array();
_platformObjectList = new Array();
_scrollObjectList = new Array();
}
function setOrigo(_arg1:Number, _arg2:Number):void{
_origo_x = _arg1;
_origo_y = _arg2;
setNextOrigo(_arg1, _arg2);
}
function update():void{
updateOrigo();
updateScrollObject();
}
function setNextOrigo(_arg1:Number, _arg2:Number):void{
_next_origo_x = _arg1;
_next_origo_y = _arg2;
}
function setCenter(_arg1:Number, _arg2:Number):void{
setOrigo((_arg1 - (_screenWidth / 2)), (_arg2 - (_screenHeight / 2)));
}
function addMovieClip(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Object{
return (addScrollObject(new scrollObject(this, String(_arg1), _arg1, _arg2, _arg3, 0, 0, _arg1.width, _arg1.height, _arg4, _arg5)));
}
function addScrollObject(_arg1:Object):Object{
_objectList.push(_arg1);
if ((_arg1 is platformObject)){
_platformObjectList.push(_arg1);
_scrollObjectList.push(_arg1);
} else {
_scrollObjectList.push(_arg1);
};
return (_arg1);
}
function updateScrollObject():void{
var _local1:Number;
_local1 = 0;
while (_local1 < _scrollObjectList.length) {
_scrollObjectList[_local1].update();
_local1++;
};
}
function setNextCenter(_arg1:Number, _arg2:Number):void{
setNextOrigo((_arg1 - (_screenWidth / 2)), (_arg2 - (_screenHeight / 2)));
}
function move_to_top(_arg1:Object){
_arg1.parent.setChildIndex(_arg1, (_arg1.parent.numChildren - 1));
}
}
}//package
Section 105
//scrollObject (scrollObject)
package {
import flash.display.*;
class scrollObject extends MovieClip {
public var _pos_x:Number;
public var _pos_y:Number;
private var _end_x:Number;
private var _end_y:Number;
private var _start_y:Number;
public var _sc2d:scroll2D;
private var _start_x:Number;
public var _name:String;
public var _scrollfactor_x:Number;
public var _scrollfactor_y:Number;
public var _mc:MovieClip;
function scrollObject(_arg1:scroll2D, _arg2:String, _arg3:MovieClip, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Number, _arg11:Number){
_sc2d = _arg1;
_name = _arg2;
_mc = _arg3;
_pos_x = _arg4;
_pos_y = _arg5;
_start_x = _arg6;
_end_x = _arg8;
_start_y = _arg7;
_end_y = _arg9;
_scrollfactor_x = _arg10;
_scrollfactor_y = _arg11;
}
function updateSkjermPosition():void{
_mc.x = (_scrollfactor_x * (_pos_x - _sc2d._origo_x));
_mc.y = (_scrollfactor_y * (_pos_y - _sc2d._origo_y));
}
function update(){
updateSkjermPosition();
setRightFrame();
}
function setRightFrame(){
if (isVisible()){
_mc.gotoAndStop(1);
} else {
_mc.gotoAndStop(2);
};
}
function isVisible(){
return (((((((((_mc.x + _start_x) < _sc2d._screenWidth)) && (((_mc.x + _end_x) > 0)))) && (((_mc.y + _start_y) < _sc2d._screenHeight)))) && (((_mc.y + _end_y) > 0))));
}
}
}//package
Section 106
//snd_background (snd_background)
package {
import flash.media.*;
public dynamic class snd_background extends Sound {
}
}//package
Section 107
//snd_fall (snd_fall)
package {
import flash.media.*;
public dynamic class snd_fall extends Sound {
}
}//package
Section 108
//snd_landing (snd_landing)
package {
import flash.media.*;
public dynamic class snd_landing extends Sound {
}
}//package
Section 109
//snd_ski (snd_ski)
package {
import flash.media.*;
public dynamic class snd_ski extends Sound {
}
}//package
Section 110
//snd_slide (snd_slide)
package {
import flash.media.*;
public dynamic class snd_slide extends Sound {
}
}//package
Section 111
//snd_wind (snd_wind)
package {
import flash.media.*;
public dynamic class snd_wind extends Sound {
}
}//package
Section 112
//soundControl (soundControl)
package {
import flash.media.*;
public class soundControl {
var sounds:Array;
public var mute:Boolean;
public function soundControl(){
this.sounds = new Array();
this.initCustom();
mute = false;
}
public function initCustom():void{
}
public function getSoundByName(_arg1:String):soundEffect{
var _local2:uint;
while (_local2 < this.sounds.length) {
if (this.sounds[_local2].title == _arg1){
return (this.sounds[_local2]);
};
_local2 = (_local2 + 1);
};
return (null);
}
public function isPlaying(_arg1:String):Boolean{
var _local2:soundEffect = this.getSoundByName(_arg1);
return (_local2.isPlaying());
}
public function toggleMute():void{
mute = !(mute);
if (mute){
SoundMixer.stopAll();
};
}
public function addSound(_arg1:Sound, _arg2:String):void{
this.sounds.push(new soundEffect(_arg1, _arg2));
}
public function stopSound(_arg1:String):void{
var _local2:soundEffect = this.getSoundByName(_arg1);
if (_local2 != null){
_local2.stop();
};
}
public function fadeVolume(_arg1:String, _arg2:Number, _arg3:uint):void{
var _local4:soundEffect = this.getSoundByName(_arg1);
if (_local4 != null){
_local4.fadeVolume(_arg2, _arg3);
};
}
public function playSound(_arg1:String, _arg2:Number=0, _arg3:int=0, _arg4:Number=1, _arg5:Number=0):void{
var _local6:soundEffect;
if (!this.mute){
_local6 = this.getSoundByName(_arg1);
if (_local6 != null){
_local6.play(_arg2, _arg3, new SoundTransform(_arg4, _arg5));
};
};
}
public function setVolume(_arg1:String, _arg2:Number):void{
var _local3:soundEffect = this.getSoundByName(_arg1);
if (_local3 != null){
_local3.setVolume(_arg2);
};
}
public function fadeDown(_arg1:String, _arg2:uint):void{
var _local3:soundEffect = this.getSoundByName(_arg1);
if (_local3 != null){
_local3.fadeDown(_arg2);
};
}
}
}//package
Section 113
//soundEffect (soundEffect)
package {
import flash.display.*;
import flash.media.*;
import flash.events.*;
public class soundEffect {
var volumeStep:Number;// = 0
var mc:MovieClip;
public var title:String;
var actframe:uint;// = 0
var volumeFrames:uint;// = 0
var fadeVolumeStep:Number;// = 0
var ch:SoundChannel;
var snd:Sound;
var fadeframes:uint;// = 0
var volumeactframe:uint;// = 0
public function soundEffect(_arg1:Sound, _arg2:String=""){
this.mc = new MovieClip();
this.snd = _arg1;
this.ch = new SoundChannel();
if (_arg2 == ""){
this.title = _arg1.toString();
} else {
this.title = _arg2;
};
}
public function stop():void{
try {
this.ch.stop();
} catch(e) {
};
}
public function fadeEnterFrame(_arg1:Event):void{
this.actframe = (this.actframe + 1);
var _local2:SoundTransform = new SoundTransform((this.ch.soundTransform.volume - this.fadeVolumeStep));
this.ch.soundTransform = _local2;
if ((((this.actframe > this.fadeframes)) || ((this.ch.soundTransform.volume <= 0)))){
this.stop();
this.mc.removeEventListener(Event.ENTER_FRAME, this.fadeEnterFrame);
};
}
public function setVolume(_arg1:Number):void{
var _local2:SoundTransform = new SoundTransform(_arg1);
this.ch.soundTransform = _local2;
}
public function isPlaying():Boolean{
if (this.ch == null){
return (false);
};
if (this.ch.position != 0){
return (true);
};
return (false);
}
public function volumeEnterFrame(_arg1:Event):void{
this.volumeactframe = (this.volumeactframe + 1);
var _local2:SoundTransform = new SoundTransform((this.ch.soundTransform.volume - this.volumeStep));
this.ch.soundTransform = _local2;
if (this.volumeactframe > this.volumeFrames){
this.mc.removeEventListener(Event.ENTER_FRAME, this.volumeEnterFrame);
};
}
public function play(_arg1:Number=0, _arg2:int=0, _arg3:SoundTransform=null):SoundChannel{
this.ch = this.snd.play(_arg1, _arg2, _arg3);
return (this.ch);
}
public function fadeVolume(_arg1:Number, _arg2:uint):void{
this.volumeFrames = _arg2;
this.volumeactframe = 0;
this.volumeStep = ((this.ch.soundTransform.volume - _arg1) / _arg2);
this.mc.addEventListener(Event.ENTER_FRAME, this.volumeEnterFrame);
}
public function fadeDown(_arg1:uint):void{
this.fadeframes = _arg1;
this.actframe = 0;
this.fadeVolumeStep = (this.ch.soundTransform.volume / _arg1);
this.mc.addEventListener(Event.ENTER_FRAME, this.fadeEnterFrame);
}
}
}//package
Section 114
//superSki (superSki)
package {
import flash.display.*;
import flash.events.*;
import FOG.AS3.*;
import flash.text.*;
import flash.geom.*;
public class superSki extends MovieClip {
private var _player:player;
public var _collectedscore:Number;
public var choose:MovieClip;
public var b_menu:SimpleButton;
public var over_layer:MovieClip;
public var guilevel:TextField;
public var _lastlevel:Number;// = 0
public var guiscore:TextField;
public var b_soundoff:SimpleButton;
private var _levelbgs:Array;
public var imenu:MovieClip;
public var b_soundon:SimpleButton;
public var mmenu:MovieClip;
private var _levelO:Array;
public var _bonusscore:Number;
private var _od:Point;
private var p_anim:MovieClip;
public var o_layer:MovieClip;
public var intructDone;
public var guitime:TextField;
private var _levelBG:Array;
public var _score:Number;
public var _level:Number;
public var bonusTime:Number;// = 0
public var FogAPI;
public var ml:MovieClip;
public var _leveldatas:Array;
public var minimap:MovieClip;
private var _minimapscale:Number;
public var _time:Number;
public var _over:overlay;
public var player_mc:MovieClip;
public var myRoot:MovieClip;
public var guiminscore:TextField;
private var trueScore:Number;
public var p_layer:MovieClip;
public var t_layer:MovieClip;
private var _levelovs:Array;
private var p_menu:MovieClip;
public var sc2d:scroll2D;
public var bg_layer:MovieClip;
public var b_pause:SimpleButton;
private var _nextwind:int;
public var bonusAnim:MovieClip;
public var _platforms:Array;
public var _sControl:soundControl;
public var pere:MovieClip;
public var _timebonus:Number;
public var levelOpen:Number;
private var _soundon:Boolean;
public function superSki(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 6, frame7, 7, frame8);
_levelbgs = new Array(new Array(l0101, l0102, l0103, l0104), new Array(l0201, l0202, l0203, l0204), new Array(l0301, l0302, l0303, l0304), new Array(l0401, l0402, l0403, l0404), new Array(l0501, l0502, l0503, l0504));
_levelovs = new Array(new Array(l0101o, l0102o, l0103o, l0104o), new Array(l0201o, l0202o, l0203o, l0204o), new Array(l0301o, l0302o, l0303o, l0304o), new Array(l0401o, l0402o, l0403o, l0404o), new Array(l0501o, l0502o, l0503o, l0504o));
_leveldatas = new Array({timelimit:80, scoremin:100000, px:880, py:650, goalx:21200, goaly:1600}, {timelimit:120, scoremin:250000, px:600, py:400, goalx:21850, goaly:1000}, {timelimit:150, scoremin:420000, px:700, py:1500, goalx:21850, goaly:1500}, {timelimit:180, scoremin:600000, px:800, py:650, goalx:21400, goaly:1800}, {timelimit:200, scoremin:850000, px:800, py:650, goalx:21800, goaly:500});
myRoot = this;
_soundon = true;
_sControl = new soundControl();
initSounds();
Key.initialize(stage);
}
public function removeInstrEvents():void{
imenu.b_more.removeEventListener(MouseEvent.CLICK, moreIPressed);
imenu.b_free.removeEventListener(MouseEvent.CLICK, freeIPressed);
imenu.b_start.removeEventListener(MouseEvent.CLICK, startPressed);
}
public function freeIPressed(_arg1:MouseEvent):void{
FogAPI.Tracking.Click("http://www.freegamesforyourwebsite.com/");
}
public function morePressed(_arg1:MouseEvent):void{
FogAPI.Tracking.Click();
}
public function pauseEventRemove():void{
p_menu.b_resume.removeEventListener(MouseEvent.CLICK, resumeClicked);
p_menu.b_more.removeEventListener(MouseEvent.CLICK, moregamesClicked);
p_menu.b_free.removeEventListener(MouseEvent.CLICK, freegamesClicked);
}
public function freePressed(_arg1:MouseEvent):void{
FogAPI.Tracking.Click("http://www.freegamesforyourwebsite.com/");
}
private function toggleSound(_arg1:MouseEvent):void{
_soundon = !(_soundon);
b_soundon.visible = !(_soundon);
b_soundoff.visible = _soundon;
_sControl.toggleMute();
if (_soundon){
_sControl.playSound("bgsound", 0, 100000);
_player.resumeSounds();
};
}
public function level4F(_arg1:MouseEvent):void{
if (choose.level4.currentFrame == 2){
removeEventsF();
_lastlevel = 3;
pere.gotoAndPlay(2);
_collectedscore = 420000;
};
}
public function gameInit():void{
_minimapscale = (66 / 2400);
sc2d = new scroll2D(1000, 1000, 670, 550, 0, 0);
buildLevel(_lastlevel);
_player.keyCheck();
sc2d.setNextCenter(_player._pos_x, _player._pos_y);
sc2d.update();
minimap.maps.x = (90 - (_player._pos_x * _minimapscale));
minimap.maps.y = (33 - (_player._pos_y * _minimapscale));
updateText();
b_soundon.visible = !(_soundon);
b_soundoff.visible = _soundon;
_over = new overlay(this);
_over.x = (_over.y = 0);
this.addChild(_over);
_over.gotoAndStop("startlevel");
}
public function init(){
levelOpen = FogAPI.Storage.Get("levelOpen");
trace(("levelopen: " + levelOpen));
if (!levelOpen){
levelOpen = 0;
};
}
public function removeEventsF():void{
choose.level1.removeEventListener(MouseEvent.CLICK, level1F);
choose.level2.level2.removeEventListener(MouseEvent.CLICK, level2F);
choose.level3.level3.removeEventListener(MouseEvent.CLICK, level3F);
choose.level4.level4.removeEventListener(MouseEvent.CLICK, level4F);
choose.level5.level5.removeEventListener(MouseEvent.CLICK, level5F);
}
public function testDone(_arg1:Event):void{
if (p_anim.currentFrame == 1){
p_anim.removeEventListener(Event.ENTER_FRAME, testDone);
pauseAnimDone();
};
}
public function level5F(_arg1:MouseEvent):void{
if (choose.level5.currentFrame == 2){
_collectedscore = 600000;
removeEventsF();
_lastlevel = 4;
pere.gotoAndPlay(2);
};
}
private function deleteBackground():void{
var _local1:Number;
_local1 = 0;
while (_local1 < _levelBG.length) {
bg_layer.removeChild(_levelBG[_local1]);
_local1++;
};
}
function polygon(_arg1, _arg2, _arg3, _arg4:Number=0xFF0000){
var _local5:* = _arg2[0].x;
var _local6:* = _arg2[0].y;
var _local7:* = undefined;
var _local8:* = undefined;
var _local9:* = undefined;
var _local10:* = undefined;
var _local11:* = 0;
while (_local11 < (_arg2.length - 1)) {
_local7 = _arg2[(_local11 + 1)].x;
_local8 = _arg2[(_local11 + 1)].y;
_local9 = land((_arg1 + _local11), _local5, _local6, _local7, _local8, _arg3, _arg4);
if (_local10 != undefined){
_local9.addLeftPlatform(_local10);
};
_local10 = _local9;
_local5 = _local7;
_local6 = _local8;
_local11++;
};
}
public function backPressed(_arg1:MouseEvent):void{
removeInstrEvents();
gotoAndStop("menuanim");
}
public function pauseAnimDone():void{
o_layer.removeChild(p_anim);
p_menu = new pausemenu();
p_menu.x = 335;
p_menu.y = 275;
o_layer.addChild(p_menu);
p_menu.b_resume.addEventListener(MouseEvent.CLICK, resumeClicked);
p_menu.b_more.addEventListener(MouseEvent.CLICK, moregamesClicked);
p_menu.b_free.addEventListener(MouseEvent.CLICK, freegamesClicked);
}
private function deleteForeground():void{
var _local1:Number;
_local1 = 0;
while (_local1 < _levelO.length) {
t_layer.removeChild(_levelO[_local1]);
_local1++;
};
}
public function backToMenu():void{
_sControl.stopSound("ski");
_sControl.stopSound("slide");
_sControl.fadeDown("bgsound", 20);
destructLevel();
this.removeChild(_over);
this.gotoAndStop("menuanim");
}
private function createForeground(_arg1:Number):void{
var _local2:MovieClip;
var _local3:Number;
_levelO = new Array();
_local3 = 0;
while (_local3 < _levelovs[_arg1].length) {
_local2 = new (_levelovs[_arg1][_local3]);
_local2.x = 0;
_local2.y = 0;
t_layer.addChild(_local2);
_levelO.push(_local2);
sc2d.addMovieClip(_local2, (_local3 * 5760), 0, 1, 1);
_local3++;
};
}
public function startPressed(_arg1:MouseEvent):void{
removeInstrEvents();
pere.gotoAndPlay(2);
}
private function createBackground(_arg1:Number):void{
var _local2:MovieClip;
var _local3:Number;
_levelBG = new Array();
_local3 = 0;
while (_local3 < _levelbgs[_arg1].length) {
_local2 = new (_levelbgs[_arg1][_local3]);
_local2.x = 0;
_local2.y = 0;
bg_layer.addChild(_local2);
_levelBG.push(_local2);
sc2d.addMovieClip(_local2, (_local3 * 5760), 0, 1, 1);
_local3++;
};
}
function frame1(){
FogAPI = new CoreAPI({game:{id:86, fogid:20589, name:"ski-sim", title:"Ski Sim", category:"adventure-games"}, remote:true, Preloader:{locked:false, domains:["local", "freeonlinegames.com"]}, root:root});
FogAPI.Preloader.Start();
FogAPI.Storage.Load();
FogAPI.Preloader.onComplete = function (_arg1){
play();
init();
};
intructDone = false;
}
function frame2(){
stop();
}
public function resumeClicked(_arg1:MouseEvent):void{
pauseEventRemove();
o_layer.removeChild(p_menu);
addEventListener(Event.ENTER_FRAME, gameLoop);
b_menu.addEventListener(MouseEvent.CLICK, menuClicked);
b_pause.addEventListener(MouseEvent.CLICK, pauseClicked);
b_soundon.addEventListener(MouseEvent.CLICK, toggleSound);
b_soundoff.addEventListener(MouseEvent.CLICK, toggleSound);
}
private function pauseClicked(_arg1:MouseEvent):void{
removeEventListener(Event.ENTER_FRAME, gameLoop);
b_menu.removeEventListener(MouseEvent.CLICK, menuClicked);
b_pause.removeEventListener(MouseEvent.CLICK, pauseClicked);
b_soundon.removeEventListener(MouseEvent.CLICK, toggleSound);
b_soundoff.removeEventListener(MouseEvent.CLICK, toggleSound);
p_anim = new pauseanim();
p_anim.x = 335;
p_anim.y = 275;
o_layer.addChild(p_anim);
p_anim.addEventListener(Event.ENTER_FRAME, testDone);
}
function frame8(){
stop();
choose.level1.addEventListener(MouseEvent.CLICK, level1F);
choose.level2.level2.addEventListener(MouseEvent.CLICK, level2F);
choose.level3.level3.addEventListener(MouseEvent.CLICK, level3F);
choose.level4.level4.addEventListener(MouseEvent.CLICK, level4F);
choose.level5.level5.addEventListener(MouseEvent.CLICK, level5F);
if (levelOpen >= 1){
choose.level2.gotoAndStop(2);
};
if (levelOpen >= 2){
choose.level3.gotoAndStop(2);
};
if (levelOpen >= 3){
choose.level4.gotoAndStop(2);
};
if (levelOpen >= 4){
choose.level5.gotoAndStop(2);
};
}
function frame3(){
stop();
mmenu.b_start.addEventListener(MouseEvent.CLICK, startPressed2);
mmenu.b_instr.addEventListener(MouseEvent.CLICK, instructionsPressed);
mmenu.b_more.addEventListener(MouseEvent.CLICK, morePressed);
mmenu.b_free.addEventListener(MouseEvent.CLICK, freePressed);
ml.addEventListener(MouseEvent.CLICK, mlPressed);
}
function frame7(){
stop();
gameInit();
ml.addEventListener(MouseEvent.CLICK, mlPressed);
}
private function initSounds():void{
_sControl.addSound(new snd_background(), "bgsound");
_sControl.addSound(new snd_wind(), "wind");
_sControl.addSound(new snd_ski(), "ski");
_sControl.addSound(new snd_slide(), "slide");
_sControl.addSound(new snd_landing(), "landing");
_sControl.addSound(new snd_fall(), "fall");
}
function frame4(){
stop();
imenu.b_more.addEventListener(MouseEvent.CLICK, moreIPressed);
imenu.b_free.addEventListener(MouseEvent.CLICK, freeIPressed);
imenu.b_start.addEventListener(MouseEvent.CLICK, startPressed);
}
public function mlPressed(_arg1:MouseEvent):void{
FogAPI.Tracking.Click();
}
public function gameEnd():void{
FogAPI.Scores.Update(_score);
_sControl.stopSound("ski");
_sControl.stopSound("slide");
_sControl.fadeDown("bgsound", 20);
removeEventListener(Event.ENTER_FRAME, gameLoop);
b_menu.removeEventListener(MouseEvent.CLICK, menuClicked);
b_pause.removeEventListener(MouseEvent.CLICK, pauseClicked);
b_soundon.removeEventListener(MouseEvent.CLICK, toggleSound);
b_soundoff.removeEventListener(MouseEvent.CLICK, toggleSound);
}
private function destructLevel():void{
deleteBackground();
clearPlatforms();
deleteForeground();
sc2d.reset();
}
private function updateText():void{
guiscore.text = String(_score);
guiminscore.text = String(_leveldatas[_level].scoremin);
guitime.text = String(_time);
guilevel.text = String((_level + 1));
}
public function gameStart():void{
_over.gotoAndStop("ingame");
_nextwind = (Math.floor((Math.random() * 250)) + 250);
_sControl.playSound("bgsound", 0, 100000);
addEventListener(Event.ENTER_FRAME, gameLoop);
b_menu.addEventListener(MouseEvent.CLICK, menuClicked);
b_pause.addEventListener(MouseEvent.CLICK, pauseClicked);
b_soundon.addEventListener(MouseEvent.CLICK, toggleSound);
b_soundoff.addEventListener(MouseEvent.CLICK, toggleSound);
}
public function freegamesClicked(_arg1:MouseEvent):void{
FogAPI.Tracking.Click("http://www.freegamesforyourwebsite.com/");
}
private function clearPlatforms():void{
var _local1:Number;
_local1 = 0;
while (_local1 < _platforms.length) {
this.removeChild(_platforms[_local1]._mc);
_local1++;
};
}
private function buildLevel(_arg1:Number):void{
_level = _arg1;
_time = _leveldatas[_arg1].timelimit;
_score = _collectedscore;
_bonusscore = (_timebonus = 0);
createBackground(_arg1);
createPlatforms(_arg1);
_player = new player(sc2d, player_mc, this);
sc2d.addScrollObject(_player);
createForeground(_arg1);
sc2d.setOrigo(_player._pos_x, _player._pos_y);
minimap.maps.gotoAndStop((_level + 1));
}
public function level1F(_arg1:MouseEvent):void{
removeEventsF();
_lastlevel = 0;
pere.gotoAndPlay(2);
_collectedscore = 0;
}
public function instructionsPressed(_arg1:MouseEvent):void{
intructDone = false;
pere.gotoAndPlay(2);
removeEvents();
}
public function removeEvents():void{
mmenu.b_start.removeEventListener(MouseEvent.CLICK, startPressed2);
mmenu.b_instr.removeEventListener(MouseEvent.CLICK, instructionsPressed);
mmenu.b_more.removeEventListener(MouseEvent.CLICK, morePressed);
mmenu.b_free.removeEventListener(MouseEvent.CLICK, freePressed);
}
public function playAgain():void{
_time = _leveldatas[_level].timelimit;
_score = _collectedscore;
_bonusscore = (_timebonus = 0);
_player.reset();
sc2d.setOrigo(_player._pos_x, _player._pos_y);
gameStart();
}
private function menuClicked(_arg1:MouseEvent):void{
gameEnd();
destructLevel();
this.removeChild(_over);
this.gotoAndStop("menuanim");
}
private function createPlatforms(_arg1:Number):void{
_platforms = new Array();
switch (_arg1){
case 0:
polygon("Platform 1", new Array({x:18552.9, y:1207.95}, {x:18885.2, y:1205.4}, {x:18966.55, y:1263.75}, {x:19443.65, y:1796.7}, {x:19613.65, y:1832.2}, {x:19771, y:1781.45}, {x:19920.7, y:1667.25}, {x:20197.3, y:1603.8}, {x:20357.2, y:1624.1}), 0);
polygon("Platform 2", new Array({x:17956.55, y:794.3}, {x:18157.05, y:702.95}, {x:18682.35, y:672.5}, {x:19321.8, y:695.35}, {x:20347.05, y:994.75}, {x:20570.35, y:1048.05}), 0);
polygon("Platform 3", new Array({x:15977.2, y:893.25}, {x:16076.15, y:857.75}, {x:16647.15, y:964.3}, {x:17268.85, y:974.45}, {x:17461.7, y:900.9}, {x:17629.2, y:916.1}), 0);
polygon("Platform 4", new Array({x:15571, y:1380.95}, {x:15993.4, y:1323.05}, {x:16393.35, y:1337.35}, {x:16822.25, y:1322.15}, {x:16925.55, y:1271.3}, {x:17228.2, y:1264.25}), 0);
polygon("Platform 5", new Array({x:13069, y:1235.85}, {x:13195.85, y:1152.1}, {x:13875.95, y:900.9}, {x:13992.7, y:804.45}, {x:14307.35, y:763.85}, {x:14449.5, y:842.5}, {x:14660.1, y:1119.1}, {x:14807.3, y:1174.95}, {x:15068.65, y:1055.7}, {x:15398.55, y:977}, {x:15558.45, y:1121.65}), 0);
polygon("Platform 6", new Array({x:8656, y:817.15}, {x:9554.35, y:804.45}, {x:9658.4, y:758.75}, {x:9805.55, y:824.75}), 0);
polygon("Platform 7", new Array({x:8191.6, y:1350.05}, {x:8442.85, y:1268.85}, {x:8551.95, y:1367.8}, {x:8673.75, y:1398.25}, {x:9523.9, y:1350.05}, {x:9935, y:1091.2}, {x:10031.4, y:984.6}, {x:10741.95, y:961.8}, {x:11180.95, y:1228.25}, {x:11541.3, y:1322.15}, {x:12231.55, y:1334.8}, {x:12480.25, y:1223.15}), 0);
polygon("Platform 8", new Array({x:6184.3, y:913.55}, {x:6372.1, y:850.15}, {x:6806.05, y:860.3}, {x:7516.6, y:1174.95}), 0);
polygon("Platform 9", new Array({x:2892.95, y:1091.2}, {x:3070.6, y:982.1}, {x:3661.85, y:1093.75}, {x:4311.5, y:1070.9}, {x:4912.95, y:984.6}, {x:5547.35, y:1037.9}), 0);
polygon("Rail 12", new Array({x:6642, y:1480}, {x:7042, y:1565}), 1);
polygon("Platform 15", new Array({x:2229.6, y:919.8}, {x:2634.45, y:860.25}, {x:2765.4, y:800.75}, {x:4167.45, y:702.5}, {x:4244.85, y:741.2}), 0);
polygon("Rail 16", new Array({x:4128.75, y:1437.75}, {x:4185.3, y:1419.9}, {x:4983.1, y:1303.8}, {x:5468.3, y:1282.95}), 1);
polygon("Rail 17", new Array({x:7534.15, y:928.75}, {x:8370.6, y:806.7}), 1);
polygon("Rail 18", new Array({x:21637.95, y:705.45}, {x:21971.35, y:669.75}), 1);
polygon("Platform 20", new Array({x:268.15, y:5.95}, {x:682.3, y:634.65}, {x:846.2, y:685.3}, {x:1016, y:670.4}, {x:1138.15, y:595.9}, {x:1266.3, y:667.4}, {x:1451, y:685.3}, {x:1498.7, y:718.05}, {x:2559.4, y:1808.55}, {x:2815.65, y:1903.9}, {x:3721.4, y:1963.5}, {x:3894.2, y:1847.3}, {x:4221.95, y:1751.95}, {x:4356.05, y:1865.2}, {x:4576.55, y:1939.65}, {x:5157.55, y:1841.35}, {x:5339.3, y:1734.1}, {x:5750.45, y:1486.8}, {x:5836.85, y:1361.65}, {x:6084.15, y:1409.3}, {x:6632.4, y:1519.55}, {x:7034.65, y:1614.9}, {x:7162.75, y:1623.85}, {x:7556.05, y:2026.05}, {x:7693.1, y:2082.7}, {x:8339.65, y:2055.85}, {x:8512.5, y:1936.7}, {x:8843.2, y:1850.3}, {x:9048.8, y:2008.2}, {x:9162, y:2020.1}, {x:9465.9, y:1951.6}, {x:11512.85, y:1817.5}, {x:12171.3, y:1829.4}, {x:12308.4, y:1793.65}, {x:12639.1, y:1611.9}, {x:12764.25, y:1573.2}, {x:13029.4, y:1573.2}, {x:13181.35, y:1507.65}, {x:13461.45, y:1504.65}, {x:13577.65, y:1540.4}, {x:14286.8, y:1927.75}, {x:14408.95, y:1954.55}, {x:15812.3, y:1957.55}, {x:16166.85, y:1877.1}, {x:16440.95, y:1749}, {x:16625.7, y:1674.5}, {x:16893.85, y:1674.5}, {x:17668.5, y:1635.75}, {x:17862.2, y:1549.35}, {x:17990.3, y:1644.7}, {x:18368.7, y:2038}, {x:18532.6, y:2100.55}, {x:18863.3, y:2109.5}, {x:19009.3, y:2005.2}, {x:19125.5, y:2017.15}, {x:19259.6, y:2109.5}, {x:20755.3, y:2133.35}, {x:21187.35, y:2014.15}, {x:21848.8, y:1835.4}, {x:22105.05, y:1668.55}, {x:22736.7, y:917.7}, {x:22978.05, y:604.85}, {x:0x5A5A, y:515.45}, {x:23237.25, y:512.5}), 0);
polygon("Rail 22", new Array({x:2029.4, y:768.2}, {x:2223.45, y:698.2}), 1);
polygon("Rail 23", new Array({x:3642.15, y:1466.4}, {x:3826.65, y:1396.4}), 1);
polygon("Rail 24", new Array({x:5356.65, y:1141.95}, {x:5553.85, y:1078.3}), 1);
polygon("Rail 25", new Array({x:12574.15, y:757.05}, {x:12726.85, y:741.15}, {x:12793.65, y:763.4}), 1);
polygon("Rail 26", new Array({x:14024.65, y:1071.95}, {x:14180.55, y:1094.2}), 1);
polygon("Rail 27", new Array({x:14978.9, y:941.55}, {x:15583.3, y:919.25}), 1);
polygon("Rail 28", new Array({x:15572.2, y:1344.4}, {x:15982.8, y:1280.9}), 1);
polygon("Rail 29", new Array({x:19747.1, y:620.25}, {x:19874.35, y:566.2}), 1);
polygon("Rail 30", new Array({x:22088.25, y:1151.45}, {x:22263.2, y:1094.2}), 1);
polygon("Rail 31", new Array({x:22893.05, y:1294.6}, {x:22994.85, y:1288.25}), 1);
polygon("Rail 32", new Array({x:21569.8, y:521.65}, {x:22228.25, y:518.45}), 1);
polygon("Rail 33", new Array({x:22966.2, y:1485.45}, {x:23045.7, y:1472.75}), 1);
polygon("Rail 34", new Array({x:18322.1, y:763.4}, {x:18532, y:744.3}), 1);
polygon("Rail 35", new Array({x:14644.9, y:1266}, {x:14826.2, y:1202.35}), 1);
polygon("Rail 36", new Array({x:8244.9, y:677.5}, {x:8321.25, y:642.5}, {x:8394.4, y:674.35}), 1);
break;
case 1:
polygon("Platform 0", new Array({x:98.45, y:57}, {x:424.95, y:2.35}, {x:579.25, y:515.95}, {x:745.1, y:758.95}, {x:939.7, y:862.6}, {x:1492.5, y:857.95}, {x:1620.35, y:937.4}, {x:2011.9, y:1309.4}, {x:2204.2, y:1416.5}, {x:2312.45, y:1411.9}, {x:2670.65, y:1250.65}, {x:2882.55, y:1411.9}, {x:2997.7, y:1428.05}, {x:3720.9, y:1925.55}, {x:4002.2, y:1981.8}, {x:4550.1, y:1962.4}, {x:4793.1, y:1923.2}, {x:5292.9, y:1635.3}, {x:5455.25, y:1548.95}, {x:5653.35, y:1612.3}, {x:5826.1, y:1620.35}, {x:6082.95, y:1780.4}, {x:6403.1, y:1855.25}, {x:6560.85, y:1956.6}, {x:6916.7, y:1998.05}, {x:7400.4, y:2012.2}, {x:7926.6, y:1980.6}, {x:8131.7, y:1937.05}, {x:8579.65, y:1596.15}, {x:9039.15, y:1899}, {x:9533.2, y:1912.85}, {x:9939.7, y:1882.9}, {x:10498.25, y:1525.9}, {x:10626.1, y:1418.8}, {x:10732.05, y:1460.25}, {x:10835.7, y:1563.9}, {x:10928.95, y:1590.4}, {x:11363.15, y:1899}, {x:11996.55, y:1926.65}, {x:13007.7, y:1960.05}, {x:13354.35, y:1950.85}, {x:13536.3, y:1844.9}, {x:14107.5, y:1718.2}, {x:14184.65, y:1674.45}, {x:14287.15, y:1735.5}, {x:15147.4, y:1990}, {x:15703.65, y:1999.3}, {x:16301.35, y:1994.25}, {x:17656.85, y:1987.7}, {x:17815.75, y:1928.95}, {x:18078.35, y:1666.4}, {x:18465.3, y:1649.1}, {x:18585.05, y:1732.05}, {x:18716.35, y:1895.55}, {x:18890.25, y:1949.7}, {x:19729.75, y:1938.2}, {x:20868.7, y:1922.05}, {x:21248.75, y:1904.8}, {x:21933.95, y:1653.75}, {x:22392.3, y:1206.9}, {x:22867.9, y:552.8}, {x:22904.8, y:124.4}), 0);
polygon("Platform 1", new Array({x:20178.9, y:1425.75}, {x:20335.55, y:1296.75}, {x:20404.65, y:1301.35}, {x:20669.5, y:1444.15}, {x:20786.95, y:1441.85}, {x:21600, y:1156.25}, {x:21816.55, y:1156.25}, {x:21954.75, y:1043.4}, {x:22060.7, y:1087.15}, {x:22173.55, y:1181.6}), 0);
polygon("Platform 2", new Array({x:18914.4, y:916.7}, {x:20114.4, y:937.45}, {x:20254.9, y:820}, {x:20533.6, y:714.05}, {x:20697.1, y:686.4}, {x:21291.35, y:707.1}), 0);
polygon("Platform 3", new Array({x:17322.85, y:870.65}, {x:17415, y:820.3}, {x:17894.95, y:873.55}, {x:18688.7, y:1365.85}, {x:18872.95, y:1368.15}, {x:19038.8, y:1271.4}, {x:19287.55, y:1305.95}), 0);
polygon("Platform 4", new Array({x:12036.85, y:1568.55}, {x:12336.3, y:1485.6}, {x:12596.55, y:1329}, {x:13114.8, y:1319.8}, {x:13377.35, y:1197.7}, {x:13771.25, y:1388.9}, {x:14595.75, y:1589.25}, {x:15367.35, y:1575.45}, {x:15807.3, y:1464.9}, {x:15940.85, y:1352.05}, {x:16109, y:1444.15}, {x:16166.6, y:1483.3}, {x:16484.45, y:1478.7}, {x:16657.2, y:1365.85}, {x:16832.25, y:1195.4}, {x:17854.85, y:1227.65}, {x:18221.1, y:1308.25}), 0);
polygon("Platform 5", new Array({x:10919.75, y:1130.9}, {x:11502.5, y:1130.9}, {x:12267.15, y:794.65}, {x:12485.95, y:651.85}, {x:12651.8, y:617.3}, {x:12870.6, y:767}, {x:13349.7, y:928.25}, {x:14328.6, y:946.65}, {x:15254.5, y:686.4}, {x:15881, y:697.9}, {x:16813.8, y:886.75}), 0);
polygon("Platform 6", new Array({x:8520.4, y:1418.6}, {x:9111.7, y:1384.4}, {x:9236.1, y:1359.7}, {x:10159.7, y:1167.75}, {x:10226.5, y:1195.4}), 0);
polygon("Platform 7", new Array({x:7524.75, y:697.9}, {x:9556.25, y:769.3}, {x:10143.6, y:939.75}, {x:10300.2, y:891.4}, {x:10403.85, y:891.4}, {x:10452.2, y:923.6}), 0);
polygon("Platform 8", new Array({x:4574.25, y:974.3}, {x:5442.6, y:727.85}, {x:6080.6, y:743.95}, {x:6757.75, y:1105.6}, {x:7329, y:1315.2}, {x:7815, y:1345.1}, {x:8436.9, y:1029.55}, {x:8651.1, y:1153.95}), 0);
polygon("Platform 9", new Array({x:2132.85, y:930.55}, {x:2264.1, y:813.05}, {x:2547.45, y:743.95}, {x:2761.65, y:886.75}, {x:2851.45, y:914.4}, {x:3466.45, y:907.5}, {x:3577, y:978.9}, {x:3977.75, y:1227.65}, {x:4611.15, y:1262.2}, {x:4728.6, y:1303.65}), 0);
polygon("Platform 10", new Array({x:6462.95, y:1476.4}, {x:6715.5, y:1495.2}, {x:7031.6, y:1427}), 0);
polygon("Rail 12", new Array({x:4103, y:1895}, {x:4299, y:1893}, {x:4395, y:1882}), 1);
polygon("Rail 13", new Array({x:15851, y:1918}, {x:16036, y:1915}, {x:16141, y:1903}), 1);
polygon("Rail 14", new Array({x:16444, y:1902}, {x:16638, y:1893}), 1);
polygon("Rail 15", new Array({x:16680, y:1896}, {x:16865, y:1889}), 1);
polygon("Rail 16", new Array({x:8524, y:1354}, {x:9110, y:1324}), 1);
polygon("Rail 17", new Array({x:7538, y:1912}, {x:7728, y:1908}), 1);
polygon("Rail 18", new Array({x:3785.6, y:863.5}, {x:4425, y:821.65}), 1);
polygon("Rail 20", new Array({x:3991.75, y:1422.2}, {x:4953.85, y:1547.7}), 1);
polygon("Rail 22", new Array({x:1038, y:659.1}, {x:1225.9, y:649.55}), 1);
polygon("Rail 23", new Array({x:1350.05, y:662.3}, {x:1537.9, y:652.75}), 1);
polygon("Rail 24", new Array({x:1607.95, y:738.7}, {x:1716.2, y:773.75}, {x:1811.75, y:776.95}), 1);
polygon("Rail 25", new Array({x:2856.15, y:722.8}, {x:2938.9, y:681.4}, {x:3015.35, y:713.25}), 1);
polygon("Rail 26", new Array({x:3171.35, y:646.4}, {x:3314.65, y:585.9}), 1);
polygon("Platform 27", new Array({x:5543.5, y:1168.55}, {x:5721.8, y:1146.3}, {x:5944.7, y:1060.3}, {x:6132.55, y:1133.55}), 0);
polygon("Rail 28", new Array({x:7530.35, y:945.7}, {x:7922, y:932.95}), 1);
polygon("Rail 29", new Array({x:8733.95, y:936.15}, {x:9463.1, y:945.7}), 1);
polygon("Platform 30", new Array({x:8625.65, y:856.55}, {x:8718, y:821.5}, {x:8788.05, y:856.55}), 0);
polygon("Rail 31", new Array({x:12163.2, y:1012.55}, {x:12252.35, y:1025.3}), 1);
polygon("Rail 32", new Array({x:12443.4, y:1085.8}, {x:12516.6, y:1088.95}), 1);
polygon("Rail 33", new Array({x:12360.6, y:869.25}, {x:12481.6, y:885.2}), 1);
polygon("Rail 34", new Array({x:12236.4, y:1124}, {x:12351.05, y:1149.45}), 1);
polygon("Rail 35", new Array({x:14223.3, y:767.35}, {x:14395.2, y:713.25}), 1);
polygon("Rail 36", new Array({x:14688.15, y:643.2}, {x:14879.2, y:569.95}), 1);
polygon("Platform 37", new Array({x:15083, y:843.8}, {x:15162.6, y:818.3}, {x:15235.85, y:847}), 0);
polygon("Platform 38", new Array({x:15996.8, y:952.05}, {x:16076.4, y:932.95}, {x:16168.75, y:980.7}, {x:16232.45, y:942.5}, {x:16340.7, y:990.25}), 0);
polygon("Platform 39", new Array({x:16127.35, y:1053.95}, {x:16206.95, y:1025.3}, {x:16280.2, y:1050.75}), 0);
polygon("Platform 40", new Array({x:20072.45, y:1053.95}, {x:20222.1, y:999.8}, {x:20320.8, y:961.6}, {x:20651.95, y:1028.45}), 0);
polygon("Rail 41", new Array({x:20833.45, y:859.7}, {x:21075.45, y:805.6}), 1);
polygon("Rail 42", new Array({x:5916.05, y:936.15}, {x:5992.45, y:920.2}, {x:6078.4, y:971.15}), 1);
polygon("Platform 44", new Array({x:22708.85, y:1541.1}, {x:22906.25, y:1499.7}), 0);
break;
case 2:
polygon("Platform 0", new Array({x:29.1, y:34.3}, {x:124.4, y:236}), 0);
polygon("Platform 1", new Array({x:132.55, y:297.15}, {x:475.4, y:1115.4}, {x:644.55, y:1517.7}, {x:726.85, y:1577.15}, {x:1293.7, y:1942.85}, {x:1545.15, y:2002.25}, {x:1874.3, y:2016}, {x:2098.3, y:1924.55}, {x:2432, y:1723.4}, {x:3076.55, y:1403.4}, {x:3158.85, y:1348.55}, {x:3241.15, y:1366.85}, {x:3369.15, y:1430.85}, {x:3899.4, y:1974.85}, {x:4077.7, y:2052.55}, {x:4640, y:2057.15}, {x:5398.85, y:1700.55}, {x:5654.85, y:1600}, {x:5732.55, y:1700.55}, {x:6002.3, y:1609.15}, {x:6253.7, y:1485.7}, {x:6381.7, y:1494.85}, {x:7131.4, y:1961.15}, {x:7282.3, y:1984}, {x:8297.15, y:1970.25}, {x:8905.15, y:1984}, {x:9458.3, y:1979.4}, {x:9613.7, y:1883.4}, {x:9718.85, y:1938.25}, {x:9819.4, y:2016}, {x:9970.3, y:2006.85}, {x:10569.15, y:1705.15}, {x:10843.4, y:1714.25}, {x:11044.55, y:1668.55}, {x:11515.4, y:1558.85}, {x:12123.4, y:1540.55}, {x:12416, y:1682.25}, {x:12781.7, y:1933.7}, {x:12950.85, y:1988.55}, {x:14614.85, y:1997.7}, {x:14738.3, y:1961.15}, {x:15003.4, y:1714.25}, {x:15108.55, y:1686.85}, {x:15762.3, y:1664}, {x:15890.3, y:1581.7}, {x:15986.3, y:1581.7}, {x:16059.4, y:1664}, {x:16754.3, y:2016}, {x:16909.7, y:2057.15}, {x:17600, y:2011.4}, {x:17796.55, y:1965.7}, {x:18070.85, y:1668.55}, {x:18221.7, y:1627.4}, {x:18486.85, y:1654.85}, {x:18624, y:0x0700}, {x:18829.7, y:1956.55}, {x:19529.15, y:1933.7}, {x:19670.85, y:1828.55}, {x:19744, y:1833.15}, {x:19853.7, y:1915.4}, {x:21174.85, y:1910.85}, {x:21362.3, y:1874.25}, {x:21961.15, y:1645.7}, {x:22523.4, y:1097.15}, {x:22861.7, y:553.15}), 0);
polygon("Platform 2", new Array({x:19574.85, y:1449.15}, {x:19693.7, y:1462.85}, {x:19908.55, y:1590.85}, {x:20050.3, y:1590.85}, {x:20580.55, y:1421.7}, {x:20914.3, y:1412.55}, {x:21298.3, y:1526.85}), 0);
polygon("Platform 3", new Array({x:18925.7, y:918.85}, {x:20077.7, y:941.7}, {x:20786.3, y:978.25}, {x:21165.7, y:1028.55}), 0);
polygon("Platform 4", new Array({x:17362.3, y:845.7}, {x:17915.4, y:891.4}, {x:18683.4, y:1366.85}, {x:18934.85, y:1353.15}, {x:19062.85, y:0x0500}, {x:19282.3, y:1312}), 0);
polygon("Platform 5", new Array({x:14985.15, y:754.25}, {x:16160, y:781.7}, {x:17270.85, y:1092.55}, {x:17536, y:1092.55}, {x:18171.4, y:1243.4}), 0);
polygon("Platform 6", new Array({x:15858.3, y:1266.25}, {x:17087.4, y:1249.1}), 0);
polygon("Rail 7", new Array({x:15501.7, y:1182.5}, {x:15696.3, y:1173.4}), 1);
polygon("Platform 8", new Array({x:12978.3, y:772.55}, {x:13078.85, y:0x0300}, {x:13188.55, y:827.4}, {x:13417.15, y:800}, {x:13723.4, y:626.25}, {x:14477.7, y:644.55}, {x:14564.55, y:690.25}, {x:14934.85, y:1092.55}, {x:0x3D00, y:1444.55}), 0);
polygon("Platform 9", new Array({x:14569.15, y:1147.4}, {x:14445.7, y:1152}, {x:14276.55, y:1252.55}, {x:13595.4, y:1284.55}), 0);
polygon("Rail 10", new Array({x:13659.4, y:1129.15}, {x:13848.85, y:1119.55}), 1);
polygon("Platform 11", new Array({x:10802.3, y:1225.15}, {x:10861.7, y:1202.25}, {x:10930.3, y:1161.15}, {x:11017.15, y:1165.7}, {x:11117.7, y:1238.85}, {x:11501.7, y:1152}, {x:11684.55, y:1152}, {x:11972.55, y:1321.15}, {x:13110.85, y:1321.15}, {x:13248, y:1248}, {x:13334.85, y:1248}), 0);
polygon("Rail 12", new Array({x:8309.85, y:1911.4}, {x:8736.4, y:1880.4}), 1);
polygon("Platform 13", new Array({x:9353.15, y:1545.15}, {x:9462.85, y:1485.7}, {x:9545.15, y:1485.7}, {x:9673.15, y:1526.85}, {x:10258.3, y:1412.55}, {x:10372.55, y:1339.4}, {x:10464, y:1334.85}, {x:10555.4, y:1394.25}), 0);
polygon("Platform 14", new Array({x:8521.15, y:1270.85}, {x:8694.85, y:1348.55}, {x:9147.4, y:1344}, {x:9508.55, y:1152}, {x:9577.15, y:1037.7}, {x:9760, y:1065.15}, {x:10025.15, y:978.25}, {x:10340.55, y:946.25}, {x:10596.55, y:946.25}, {x:10747.4, y:882.25}, {x:10884.55, y:950.85}), 0);
polygon("Platform 15", new Array({x:6029.7, y:1101.7}, {x:6921.15, y:1097.15}, {x:7035.4, y:1033.15}, {x:7117.7, y:1019.4}, {x:7213.7, y:1078.85}), 0);
polygon("Rail 16", new Array({x:6491.4, y:961.4}, {x:6994.3, y:946.25}), 1);
polygon("Platform 17", new Array({x:3597.7, y:1238.85}, {x:3826.3, y:1152}, {x:4525.7, y:1161.15}, {x:4690.3, y:1056}, {x:4859.4, y:1161.15}, {x:5184, y:1133.7}, {x:5312, y:1046.85}, {x:5536, y:809.15}, {x:5659.4, y:758.85}, {x:6404.55, y:758.85}, {x:6523.4, y:681.15}, {x:6642.3, y:749.7}, {x:7108.55, y:736}, {x:7264, y:786.25}, {x:8041.15, y:1595.4}, {x:8269.7, y:1709.7}, {x:8484.55, y:1755.4}, {x:0x2200, y:1664}, {x:8841.15, y:1741.7}), 0);
polygon("Rail 18", new Array({x:7280.3, y:1897.85}, {x:8206.3, y:1890.4}), 1);
polygon("Platform 19", new Array({x:1526.85, y:1165.7}, {x:2496, y:918.85}, {x:2852.55, y:928}, {x:2985.15, y:822.85}, {x:3428.55, y:681.15}, {x:3990.85, y:704}, {x:5097.15, y:845.7}), 0);
polygon("Platform 20", new Array({x:804.55, y:982.85}, {x:1453.7, y:1398.85}, {x:1856, y:1572.55}, {x:2144, y:1632}), 0);
polygon("Rail 21", new Array({x:1540.55, y:0x0700}, {x:1677.3, y:1671.55}, {x:2018, y:1647.85}), 1);
polygon("Rail 22", new Array({x:13860.15, y:1452.25}, {x:14384.55, y:1404}), 1);
polygon("Rail 23", new Array({x:10012.85, y:645.55}, {x:10203.4, y:635.4}), 1);
polygon("Rail 24", new Array({x:6395.4, y:1193.15}, {x:6607.15, y:1178.4}), 1);
polygon("Rail 25", new Array({x:6770.85, y:1196.3}, {x:6983.2, y:1172.35}), 1);
polygon("Platform 26", new Array({x:22914.4, y:496.45}, {x:23057.95, y:442.65}), 0);
polygon("Rail 27", new Array({x:1963.35, y:1322.75}, {x:2055.75, y:1287.65}, {x:2138.65, y:1316.35}), 1);
polygon("Rail 28", new Array({x:2486.05, y:1510.8}, {x:2562.55, y:1478.9}, {x:2648.6, y:1507.6}), 1);
polygon("Rail 29", new Array({x:2903.55, y:688.45}, {x:2973.7, y:650.2}, {x:3037.45, y:627.9}), 1);
polygon("Rail 30", new Array({x:3184.05, y:631.1}, {x:3301.95, y:576.9}), 1);
polygon("Rail 31", new Array({x:4108.35, y:1319.55}, {x:4341.05, y:1361}), 1);
polygon("Rail 32", new Array({x:4318.75, y:1529.9}, {x:4452.6, y:1488.45}), 1);
polygon("Rail 33", new Array({x:4602.4, y:1568.15}, {x:4774.5, y:1498.05}), 1);
polygon("Rail 34", new Array({x:4640.65, y:1756.2}, {x:4768.15, y:1708.4}), 1);
polygon("Rail 35", new Array({x:5941.05, y:959.4}, {x:6059, y:921.15}), 1);
polygon("Platform 36", new Array({x:7512.35, y:1670.15}, {x:7643, y:1609.6}, {x:7735.45, y:1609.6}, {x:7850.2, y:1702}), 0);
polygon("Platform 37", new Array({x:10097.2, y:1077.3}, {x:10186.45, y:1042.25}, {x:10262.95, y:1061.35}), 0);
polygon("Rail 38", new Array({x:12031.9, y:1246.25}, {x:12191.25, y:1176.1}, {x:12280.5, y:1217.55}), 1);
polygon("Platform 39", new Array({x:12137.05, y:749}, {x:12290.05, y:694.85}, {x:12407.95, y:758.6}), 0);
polygon("Rail 40", new Array({x:13928.3, y:1086.85}, {x:14033.45, y:1058.2}), 1);
polygon("Rail 41", new Array({x:20191.25, y:675.7}, {x:20306, y:627.9}), 1);
polygon("Rail 42", new Array({x:20452.6, y:640.65}, {x:20589.65, y:586.45}), 1);
polygon("Platform 43", new Array({x:20066.95, y:1048.6}, {x:20216.75, y:1007.2}, {x:20299.6, y:1090.05}, {x:20411.15, y:1099.6}, {x:20659.75, y:1131.5}), 0);
polygon("Platform 44", new Array({x:22479.7, y:1909.2}, {x:22616.75, y:1823.15}, {x:22725.1, y:1845.45}), 0);
polygon("Platform 45", new Array({x:22734.65, y:2033.5}, {x:22852.6, y:1972.95}), 0);
break;
case 3:
polygon("Platform 0", new Array({x:266.8, y:-8}, {x:352, y:116.4}, {x:347.45, y:109.7}, {x:635.45, y:576}, {x:777.15, y:672}, {x:1005.7, y:681.15}, {x:1138.3, y:608}, {x:1261.7, y:667.4}, {x:1435.45, y:690.25}, {x:1499.45, y:731.4}, {x:2075.45, y:1321.15}, {x:2166.85, y:1371.4}, {x:2939.45, y:1449.15}, {x:3830.85, y:1549.7}, {x:4955.45, y:1677.7}, {x:5298.3, y:1664}, {x:5549.7, y:1613.7}, {x:5760, y:1481.15}, {x:5842.3, y:1371.4}, {x:6070.85, y:1417.15}, {x:6377.15, y:1462.85}, {x:6660.55, y:1517.7}, {x:6944, y:1412.55}, {x:7076.55, y:1581.7}, {x:7154.3, y:1622.85}, {x:7625.15, y:0x0800}, {x:7776, y:2098.25}, {x:8347.45, y:2070.85}, {x:8521.15, y:1947.4}, {x:8822.85, y:1865.15}, {x:9037.7, y:2011.4}, {x:9572.55, y:1961.15}, {x:10445.7, y:1892.55}, {x:11515.45, y:1819.4}, {x:12128, y:1819.4}, {x:12306.3, y:1801.15}, {x:12681.15, y:1577.15}, {x:12978.3, y:1522.25}, {x:13124.55, y:1449.15}, {x:13403.45, y:1426.25}, {x:13513.15, y:1504}, {x:14157.7, y:1851.4}, {x:14304, y:1952}, {x:15981.7, y:1920}, {x:16164.55, y:1860.55}, {x:16530.3, y:1709.7}, {x:16758.85, y:1668.55}, {x:17682.3, y:1650.25}, {x:17869.7, y:1545.15}, {x:18368, y:2038.85}, {x:18514.3, y:2107.4}, {x:19305.15, y:2121.15}, {x:19520, y:2002.25}, {x:19629.7, y:1993.15}, {x:19849.15, y:2125.7}, {x:19990.85, y:2144}, {x:20758.85, y:2134.85}, {x:21755.45, y:1865.15}, {x:22029.7, y:1737.15}, {x:22889.15, y:708.55}), 0);
polygon("Platform 1", new Array({x:2784, y:790.85}, {x:4013.7, y:694.85}, {x:4324.55, y:653.7}, {x:4603.45, y:658.25}), 0);
polygon("Platform 2", new Array({x:3250.3, y:1065.15}, {x:3419.45, y:1001.15}, {x:3730.3, y:1092.55}, {x:4064, y:1092.55}, {x:4672, y:1014.85}, {x:4882.3, y:873.15}, {x:5165.7, y:996.55}, {x:0x1700, y:1088}, {x:6546.3, y:1129.15}), 0);
polygon("Platform 3", new Array({x:5920, y:685.7}, {x:6779.45, y:854.85}, {x:7478.85, y:1156.55}, {x:7547.45, y:1220.55}), 0);
polygon("Platform 4", new Array({x:7954.3, y:827.4}, {x:9558.85, y:809.15}, {x:9654.85, y:0x0300}, {x:9805.7, y:841.15}), 0);
polygon("Platform 5", new Array({x:8315.45, y:1299.4}, {x:8453.7, y:1309.55}, {x:8620, y:1399.15}, {x:9202.3, y:1293.7}), 0);
polygon("Platform 6", new Array({x:8987.45, y:1691.4}, {x:9161.15, y:1568}, {x:9344, y:1494.85}, {x:10052.55, y:1019.4}, {x:10162.3, y:896}, {x:10358.85, y:982.85}, {x:11017.45, y:945.7}, {x:11506.3, y:809.15}, {x:12406.85, y:672}, {x:12630.85, y:562.25}), 0);
polygon("Platform 7", new Array({x:12233.15, y:1037.7}, {x:12530.3, y:1129.15}, {x:13540.55, y:950.85}, {x:14029.7, y:795.4}, {x:14578.3, y:781.7}, {x:14838.85, y:836.55}, {x:15085.7, y:713.15}, {x:15373.7, y:640}, {x:15707.45, y:754.25}), 0);
polygon("Rail 8", new Array({x:14624.55, y:1445.15}, {x:15404.55, y:1405}), 1);
polygon("Platform 9", new Array({x:15581, y:1342}, {x:15990.45, y:1283.55}, {x:16525.7, y:1334.85}, {x:16924.55, y:1274.55}, {x:17211.45, y:1257.15}), 0);
polygon("Platform 10", new Array({x:16045.7, y:841.15}, {x:16722.3, y:960}, {x:17275.45, y:973.7}, {x:17458.3, y:909.7}, {x:17627.45, y:914.25}), 0);
polygon("Platform 11", new Array({x:17997.7, y:763.4}, {x:18221.7, y:690.25}, {x:18797.7, y:676.55}, {x:19337.15, y:713.15}, {x:19949.7, y:905.15}, {x:20498.3, y:1019.4}), 0);
polygon("Platform 12", new Array({x:18180.55, y:1261.7}, {x:18752, y:1289.15}, {x:19218.3, y:1472}, {x:19689.15, y:1632}, {x:19881.15, y:1586.25}, {x:20013.6, y:1490.2}), 0);
polygon("Platform 13", new Array({x:21650.3, y:717.7}, {x:21979.45, y:694.85}, {x:22084.55, y:731.4}), 0);
polygon("Rail 14", new Array({x:4496.8, y:1471.8}, {x:5396, y:1344}), 1);
polygon("Rail 15", new Array({x:6066, y:642}, {x:6238, y:639}, {x:6307, y:641}, {x:6401, y:632}, {x:6519, y:634}), 1);
polygon("Rail 16", new Array({x:7858, y:1359}, {x:8266, y:1299}), 1);
polygon("Rail 17", new Array({x:10658, y:931}, {x:10845, y:928}), 1);
polygon("Rail 18", new Array({x:8237.75, y:733.75}, {x:9456, y:758.9}), 1);
polygon("Rail 19", new Array({x:19051.45, y:1067.45}, {x:19856, y:1222.9}), 1);
polygon("Platform 20", new Array({x:22909.75, y:694.9}, {x:23085.75, y:656}, {x:23154.3, y:674.3}), 0);
polygon("Rail 22", new Array({x:2030.3, y:780.9}, {x:2208.75, y:701.2}), 1);
polygon("Platform 23", new Array({x:4458.95, y:1176.1}, {x:4662.95, y:1099.6}), 0);
polygon("Platform 24", new Array({x:8239.05, y:675.7}, {x:8321.9, y:643.8}, {x:8385.65, y:675.7}), 0);
polygon("Rail 25", new Array({x:7337.05, y:742.6}, {x:7595.2, y:831.85}), 1);
polygon("Rail 26", new Array({x:8733.05, y:1019.9}, {x:9077.3, y:1019.9}), 1);
polygon("Rail 27", new Array({x:10517.9, y:516.35}, {x:11187.25, y:509.95}), 1);
polygon("Rail 28", new Array({x:11072.5, y:1794.4}, {x:11419.95, y:1788.05}), 1);
polygon("Platform 29", new Array({x:12560.95, y:755.35}, {x:12672.5, y:761.75}, {x:12720.35, y:729.85}, {x:12793.65, y:758.55}), 0);
polygon("Rail 30", new Array({x:12822.3, y:1198.4}, {x:12959.35, y:1230.25}), 1);
polygon("Rail 31", new Array({x:12000, y:1147.4}, {x:12248.6, y:1032.65}), 1);
polygon("Rail 32", new Array({x:13906, y:1491.65}, {x:14090.85, y:1411.95}), 1);
polygon("Rail 33", new Array({x:14039.85, y:1064.55}, {x:14157.8, y:1093.2}), 1);
polygon("Rail 34", new Array({x:14970.5, y:937.05}, {x:15588.85, y:924.3}), 1);
polygon("Platform 35", new Array({x:15416.75, y:1121.9}, {x:15509.15, y:1096.4}, {x:15579.3, y:1134.65}), 0);
polygon("Rail 36", new Array({x:18329.9, y:761.75}, {x:18546.6, y:752.2}), 1);
polygon("Rail 37", new Array({x:18502, y:1338.65}, {x:18619.9, y:1376.9}), 1);
polygon("Platform 41", new Array({x:20012.75, y:1485.3}, {x:20232.7, y:1625.5}), 0);
polygon("Rail 42", new Array({x:21558.55, y:506.8}, {x:22205.55, y:510}), 1);
polygon("Platform 43", new Array({x:22715.5, y:1603.2}, {x:22878.05, y:1612.75}), 0);
polygon("Platform 44", new Array({x:22718.7, y:1689.25}, {x:22932.25, y:1749.8}), 0);
break;
case 4:
polygon("Platform 0", new Array({x:210.85, y:177.7}, {x:425.15, y:13.7}, {x:667.45, y:662.85}, {x:841.15, y:832}, {x:960, y:854.85}, {x:1467.45, y:859.4}, {x:1577.15, y:914.25}, {x:1906.3, y:1229.7}, {x:2189.7, y:1403.4}, {x:2395.45, y:1385.15}, {x:2678.85, y:1257.15}, {x:2875.45, y:1408}, {x:3008, y:1435.4}, {x:3698.3, y:1924.55}, {x:3830.85, y:1952}, {x:4681.15, y:1970.25}, {x:4822.85, y:1920}, {x:5330.3, y:1618.25}, {x:5467.45, y:1549.7}, {x:5595.45, y:1609.15}, {x:6011.45, y:1627.4}, {x:6148.6, y:1659.4}, {x:6843.45, y:1979.4}, {x:7122.3, y:1961.15}, {x:7405.7, y:1764.55}, {x:7698.3, y:1828.55}, {x:7977.15, y:1956.55}, {x:8621.7, y:1915.4}, {x:9732.6, y:1906.25}, {x:10006.85, y:1865.15}, {x:10313.15, y:1618.25}, {x:10637.7, y:1430.85}, {x:10784, y:1531.4}, {x:10912, y:1563.4}, {x:11346.3, y:1878.85}, {x:11469.7, y:1915.4}, {x:12992, y:1965.7}, {x:13376, y:1952}, {x:13517.7, y:1851.4}, {x:14121.15, y:1723.4}, {x:14372.6, y:1769.15}, {x:15026.3, y:1952}, {x:15465.15, y:2002.25}, {x:15771.45, y:2002.25}, {x:15889.45, y:2012.15}, {x:16347.45, y:1984}, {x:16484.6, y:2002.25}, {x:17622.85, y:2006.85}, {x:17801.15, y:1947.4}, {x:18788.6, y:932.55}, {x:18939.45, y:864}, {x:19104, y:955.4}, {x:20338.3, y:1723.4}, {x:20512, y:1826.8}, {x:20667.45, y:1897.15}, {x:20854.85, y:1906.25}, {x:21005.7, y:1805.7}, {x:21184, y:1632}, {x:21485.7, y:1206.85}, {x:21604.6, y:1152}, {x:21833.15, y:1152}, {x:22148.6, y:850.25}, {x:22166.85, y:740.55}, {x:22230.85, y:672}, {x:22578.3, y:397.7}, {x:23085.7, y:406.85}), 0);
polygon("Platform 1", new Array({x:20608, y:736}, {x:20722.3, y:676.55}, {x:21325.7, y:704}, {x:21540.6, y:749.7}), 0);
polygon("Platform 2", new Array({x:19547.45, y:923.4}, {x:20150.85, y:941.7}, {x:20301.7, y:978.25}, {x:20900.6, y:1334.85}, {x:21024, y:1357.7}, {x:21197.7, y:1270.85}), 0);
polygon("Rail 3", new Array({x:20749.7, y:955.4}, {x:20850.3, y:845.7}, {x:21083.45, y:813.7}), 1);
polygon("Rail 4", new Array({x:17366.85, y:832}, {x:17728, y:873.15}, {x:18011.45, y:918.85}, {x:18363.45, y:928}), 1);
polygon("Platform 5", new Array({x:16946.3, y:1197.7}, {x:17613.7, y:1216}), 0);
polygon("Rail 6", new Array({x:15922.6, y:1525}, {x:16321, y:1503.15}, {x:17139.7, y:1380.55}), 1);
polygon("Platform 7", new Array({x:14349.7, y:950.85}, {x:15181.7, y:717.7}, {x:0x3C00, y:699.4}, {x:15867.45, y:704}, {x:16804.6, y:859.4}), 0);
polygon("Platform 8", new Array({x:13773.7, y:1371.4}, {x:14482.3, y:1558.85}, {x:14729.15, y:1577.15}, {x:15387.45, y:1577.15}), 0);
polygon("Platform 9", new Array({x:12096, y:1577.15}, {x:12333.7, y:1490.25}, {x:12598.85, y:1321.15}, {x:13060.6, y:1344}), 0);
polygon("Platform 10", new Array({x:10349.7, y:836.55}, {x:11506.3, y:758.85}, {x:12333.7, y:772.55}, {x:12635.45, y:630.85}, {x:12868.6, y:0x0300}, {x:13449.15, y:923.4}), 0);
polygon("Platform 11", new Array({x:10948.6, y:1133.7}, {x:11611.45, y:1147.4}), 0);
polygon("Rail 12", new Array({x:8563.6, y:1546.7}, {x:9149.3, y:1517.7}), 1);
polygon("Platform 13", new Array({x:8036.6, y:1220.55}, {x:8429.7, y:1037.7}, {x:8640, y:1147.4}, {x:9773.7, y:1156.55}, {x:10116.6, y:1069.7}), 0);
polygon("Rail 14", new Array({x:6473.85, y:1485.85}, {x:6892.6, y:1390.25}), 1);
polygon("Platform 15", new Array({x:4041.15, y:1202.25}, {x:4630.85, y:1252.55}, {x:4950.85, y:1234.25}), 0);
polygon("Rail 16", new Array({x:5331.85, y:1073.25}, {x:5953, y:1053.4}), 1);
polygon("Platform 17", new Array({x:4681.15, y:950.85}, {x:5353.15, y:736}, {x:5504, y:713.15}, {x:6089.15, y:754.25}, {x:6550.85, y:1005.7}, {x:6852.6, y:1106.25}, {x:7044.6, y:1028.55}, {x:7241.15, y:1115.4}), 0);
polygon("Platform 18", new Array({x:0x0B00, y:900.55}, {x:3433.15, y:918.85}, {x:3611.45, y:1005.7}), 0);
polygon("Platform 19", new Array({x:2029.7, y:809.15}, {x:2144, y:713.15}, {x:2441.15, y:649.15}), 0);
polygon("Rail 21", new Array({x:3808, y:1819.45}, {x:4626.3, y:1851.45}), 1);
polygon("Rail 22", new Array({x:8338.3, y:633.15}, {x:9563.45, y:688}), 1);
polygon("Platform 23", new Array({x:7574.85, y:697.15}, {x:9561.15, y:763.45}), 0);
polygon("Rail 24", new Array({x:10418.3, y:749.75}, {x:11202.3, y:706.3}), 1);
polygon("Rail 26", new Array({x:15862.6, y:1915.4}, {x:16139.4, y:1901.8}), 1);
polygon("Platform 27", new Array({x:23024, y:349.75}, {x:23092.6, y:294.9}), 0);
polygon("Rail 28", new Array({x:1447, y:749}, {x:1813.55, y:774.5}), 1);
polygon("Platform 29", new Array({x:2849.4, y:720.35}, {x:2941.8, y:685.25}, {x:3002.35, y:717.15}), 0);
polygon("Rail 30", new Array({x:3066.1, y:678.9}, {x:4522.7, y:662.95}), 1);
polygon("Rail 31", new Array({x:5960.15, y:927.5}, {x:6090.85, y:972.1}), 1);
polygon("Rail 32", new Array({x:7534.65, y:946.6}, {x:7920.3, y:930.7}), 1);
polygon("Platform 33", new Array({x:8631.05, y:854.2}, {x:8713.95, y:828.7}, {x:8796.8, y:854.2}), 0);
polygon("Rail 34", new Array({x:9128.3, y:796.8}, {x:9389.65, y:809.55}), 1);
polygon("Platform 35", new Array({x:9794.45, y:605.6}, {x:10183.3, y:605.6}, {x:10215.15, y:637.45}, {x:10361.75, y:592.85}, {x:10390.45, y:615.15}), 0);
polygon("Rail 36", new Array({x:12172.1, y:997.6}, {x:12254.95, y:1026.3}), 1);
polygon("Rail 37", new Array({x:12360.15, y:854.2}, {x:12494, y:892.45}), 1);
polygon("Rail 38", new Array({x:12232.65, y:1118.75}, {x:12347.4, y:1147.4}), 1);
polygon("Rail 39", new Array({x:12443, y:1093.25}, {x:12525.9, y:1090.05}), 1);
polygon("Rail 40", new Array({x:14345.8, y:1214.35}, {x:14588.05, y:1239.85}), 1);
polygon("Rail 41", new Array({x:14224.7, y:787.25}, {x:14393.65, y:717.15}), 1);
polygon("Rail 42", new Array({x:14683.65, y:627.9}, {x:14868.55, y:580.1}), 1);
polygon("Rail 43", new Array({x:14530.65, y:1061.35}, {x:14645.4, y:1090.05}), 1);
polygon("Rail 44", new Array({x:14406.35, y:1329.1}, {x:14524.3, y:1348.2}), 1);
polygon("Platform 45", new Array({x:15990.45, y:991.25}, {x:16092.45, y:940.25}, {x:16172.1, y:972.1}, {x:16258.15, y:937.05}, {x:16350.6, y:1004}), 0);
polygon("Platform 46", new Array({x:16117.95, y:1077.3}, {x:16197.6, y:1029.5}, {x:16290.05, y:1067.75}), 0);
polygon("Platform 47", new Array({x:18055.75, y:1121.9}, {x:18141.85, y:1090.05}, {x:18221.5, y:1109.15}), 0);
polygon("Rail 48", new Array({x:20063.75, y:1051.8}, {x:20229.5, y:1013.55}), 1);
polygon("Rail 49", new Array({x:20194.4, y:621.5}, {x:20337.85, y:580.1}), 1);
polygon("Rail 50", new Array({x:20678.9, y:1469.35}, {x:20780.9, y:1443.85}, {x:20854.2, y:1453.4}), 1);
break;
default:
break;
};
}
public function changeLevel():void{
if (_level < 4){
_collectedscore = _score;
destructLevel();
_lastlevel = (_lastlevel + 1);
levelOpen = (levelOpen + 1);
FogAPI.Storage.Set("levelOpen", levelOpen);
buildLevel(_lastlevel);
_player.keyCheck();
sc2d.setNextCenter(_player._pos_x, _player._pos_y);
sc2d.update();
minimap.maps.x = (90 - (_player._pos_x * _minimapscale));
minimap.maps.y = (33 - (_player._pos_y * _minimapscale));
updateText();
_over.gotoAndStop("startlevel");
} else {
_collectedscore = _score;
};
}
public function startPressed2(_arg1:MouseEvent):void{
if (intructDone == true){
removeEvents();
pere.gotoAndPlay(2);
} else {
removeEvents();
pere.gotoAndPlay(2);
};
}
public function level2F(_arg1:MouseEvent):void{
if (choose.level2.currentFrame == 2){
removeEventsF();
_lastlevel = 1;
pere.gotoAndPlay(2);
_collectedscore = 100000;
};
}
private function gameLoop(_arg1:Event):void{
bonusTime++;
_player.keyCheck();
sc2d.setNextCenter(_player._pos_x, _player._pos_y);
sc2d.update();
minimap.maps.x = (90 - (_player._pos_x * _minimapscale));
minimap.maps.y = (33 - (_player._pos_y * _minimapscale));
updateText();
_nextwind--;
if (_nextwind <= 0){
_sControl.playSound("wind", 0);
_nextwind = (Math.floor((Math.random() * 250)) + 250);
};
}
public function moreIPressed(_arg1:MouseEvent):void{
FogAPI.Tracking.Click();
}
function land(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){
var _local8:platformObject = new platformObject(sc2d, _arg1, new MovieClip(), _arg2, _arg3, 0, 0, (_arg4 - _arg2), (_arg5 - _arg3), 0, 0, (_arg4 - _arg2), (_arg5 - _arg3), _arg6, _arg7);
this.addChild(_local8._mc);
_platforms.push(_local8);
sc2d.addScrollObject(_local8);
return (_local8);
}
public function level3F(_arg1:MouseEvent):void{
if (choose.level3.currentFrame == 2){
removeEventsF();
_lastlevel = 2;
pere.gotoAndPlay(2);
_collectedscore = 250000;
};
}
public function moregamesClicked(_arg1:MouseEvent):void{
FogAPI.Tracking.Click();
}
}
}//package
Section 115
//tricks (tricks)
package {
class tricks {
var trx;
var nyLuft:Boolean;
var railkvote;
var bakketeljar:Number;
var time;
var score;
private var _main:Object;
var tilstand;
var gameoverteljar:Number;
var trickscore;
var timebonus;
var trickscore2;// = 5
function tricks(_arg1:Object){
_main = _arg1;
this.reset();
}
function reset():void{
gameoverteljar = 0;
bakketeljar = 0;
nyLuft = false;
tilstand = "pre";
time = (_main._leveldatas[_main._level].timelimit * 25);
score = _main._score;
trickscore = 0;
railkvote = 120;
trx = new Array();
}
function nail(){
if (tilstand == "game"){
bakketeljar = 0;
railkvote = 100;
score = (score + trickscore);
trx[(trx.length - 1)].ferdig = true;
};
}
function rail(_arg1){
if (tilstand == "game"){
if (railkvote > 0){
railkvote = (railkvote - 1);
};
trx[(trx.length - 1)].rail = (trx[(trx.length - 1)].rail + ((((1 + (railkvote / 100)) + (_arg1 / 500)) * trx[(trx.length - 1)].score) / 2000));
if (trx[(trx.length - 1)].rail > 1000){
trx[(trx.length - 1)].rail = (trx[(trx.length - 1)].rail * 0.7);
};
if (railkvote == 0){
trickscore = (trickscore + Math.round((10 + (trickscore / 30000))));
} else {
trickscore = (trickscore + Math.round(trx[(trx.length - 1)].rail));
};
};
}
function jubel(){
var _local1:* = "1";
return (_local1);
}
function triks(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10){
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
if (tilstand == "pre"){
tilstand = "game";
} else {
if (tilstand == "post"){
} else {
if (tilstand == "oot"){
} else {
if (tilstand == "game"){
if (time > 0){
if (_arg6 > 100){
_arg6 = 100;
};
_local11 = ((((_arg2 * _arg2) * _arg2) + ((0.1 * _arg3) * _arg3)) + ((0.07 * _arg4) * _arg4));
if (_arg2 <= 40){
_local11 = (_local11 * 0.5);
};
if (_arg5){
_local11 = (_local11 * 1.2);
};
if (_arg7){
_local11 = (_local11 * 1.1);
};
_local12 = "";
_arg6 = Math.abs(_arg6);
_local11 = (_local11 * ((165 - _arg6) / 150));
_local13 = 0;
if ((((_arg8 == "I")) || ((_arg8 == "U")))){
if (_arg9 == 1){
if (_arg7){
_local13 = this.avvik180(_arg4);
} else {
_local13 = this.avvik180((_arg4 + 90));
};
} else {
if (_arg7){
_local13 = this.avvik180(_arg4);
} else {
_local13 = this.avvik180((_arg4 + 90));
};
};
} else {
if (_arg7){
_local13 = this.avvik180((_arg4 + 90));
} else {
_local13 = this.avvik180(_arg4);
};
};
_local14 = "";
_local15 = "";
_local11 = (_local11 * ((100 - _local13) / 100));
_local11 = (_local11 / 10);
_local11 = Math.round(_local11);
if (_arg1 == ""){
_local14 = "";
_local11 = 0;
};
if (trx.length == 0){
trickscore = 0;
trx.push({namn:_arg1, luft:_arg2, salto:_arg3, rotasjon:_arg4, fakie:_arg5, toRail:_arg7, score:_local11, rail:0, ferdig:false, kombo:new Array()});
} else {
if (trx[(trx.length - 1)].ferdig){
trickscore = 0;
trx.push({namn:_arg1, luft:_arg2, salto:_arg3, rotasjon:_arg4, fakie:_arg5, toRail:_arg7, score:_local11, rail:0, ferdig:false, kombo:new Array()});
} else {
_local11 = (_local11 + Math.round((trx[(trx.length - 1)].rail / 100)));
trx[(trx.length - 1)].kombo.push(_arg1);
};
};
trx[(trx.length - 1)].kombo.push(_local14);
trickscore = (trickscore + _local11);
if (!_arg7){
this.nail();
};
};
};
};
};
};
}
function avvik180(_arg1){
var _local2:* = Math.floor((_arg1 / 180));
var _local3:* = (_arg1 - (_local2 * 180));
if (_local3 > 90){
_local3 = (180 - _local3);
};
return (_local3);
}
function poengvisning(){
if (trx.length < 1){
return;
};
if (tilstand == "game"){
time = (time - 1);
if (time == 250){
} else {
if (time <= 0){
tilstand = "oot";
};
};
};
if (tilstand == "oot"){
gameoverteljar = (gameoverteljar + 1);
if (gameoverteljar < 50){
_main._over.gotoAndStop("time1");
} else {
if (gameoverteljar == 50){
_main._over.gotoAndStop("time2");
_main.gameEnd();
};
};
} else {
if (tilstand == "post"){
gameoverteljar = (gameoverteljar + 1);
if (gameoverteljar < 50){
if (_main._score >= _main._leveldatas[_main._level].scoremin){
if (_main._level < 4){
_main._over.gotoAndStop("win1");
} else {
_main._over.gotoAndStop("complete1");
};
} else {
_main._over.gotoAndStop("score1");
};
} else {
if (gameoverteljar == 50){
if (_main._score >= _main._leveldatas[_main._level].scoremin){
if (_main._level < 4){
_main._over.gotoAndStop("win2");
} else {
_main._over.gotoAndStop("complete2");
};
} else {
_main._over.gotoAndStop("score2");
};
_main.gameEnd();
};
};
};
};
_main._time = Math.floor((time / 25));
_main._score = score;
_main._bonusscore = trickscore;
if (trx[(trx.length - 1)].ferdig){
if (_main._over.currentFrame == 2){
if ((((((((trickscore > 1)) && ((_main.bonusAnim.currentFrame == 1)))) && (!((trickscore2 === trickscore))))) && ((!(_main.bonusTime) < 50)))){
_main.bonusAnim.gotoAndPlay(2);
trickscore2 = trickscore;
_main.bonusTime = 0;
} else {
trickscore2 = trickscore;
};
};
bakketeljar = (bakketeljar + 1);
if (bakketeljar < 60){
_main.bonusAnim.guibonus.text = String(trickscore);
} else {
_main.bonusAnim.guibonus.text = "";
};
} else {
_main.bonusAnim.guibonus.text = String(trickscore);
};
if (trickscore == 0){
_main.bonusAnim.guibonus.text = "";
};
if (((trx[(trx.length - 1)].ferdig) && ((trx[(trx.length - 1)].kombo.length == 1)))){
} else {
if (trx[(trx.length - 1)].namn == "FALL"){
};
};
var _local1:* = "";
var _local2:* = (trx[(trx.length - 1)].kombo.length - 2);
if (_local2 > 0){
_local1 = "... + ";
};
if (_local2 < 0){
_local2 = 0;
};
var _local3:* = _local2;
while (_local3 < trx[(trx.length - 1)].kombo.length) {
_local1 = (_local1 + trx[(trx.length - 1)].kombo[_local3]);
if (_local3 < (trx[(trx.length - 1)].kombo.length - 1)){
_local1 = (_local1 + " + ");
};
_local3++;
};
if (tilstand == "post"){
_main._timebonus = timebonus;
_local1 = ((((("TIME BONUS" + " ") + timebonus) + ", ") + "FINISH BONUS") + " 100000");
} else {
if (tilstand == "oot"){
_local1 = "";
_main.bonusAnim.guibonus.text = "";
} else {
if (((trx[(trx.length - 1)].ferdig) && ((bakketeljar > 60)))){
_local1 = "";
};
};
};
}
function fjernBlank(_arg1){
if (_arg1.charAt(0) == " "){
_arg1 = _arg1.substr(1);
};
return (_arg1);
}
function fall(){
if (trx.length == 0){
trx.push({namn:"FALL", luft:0, salto:0, rotasjon:0, fakie:false, toRail:0, score:0, rail:0, ferdig:false, kombo:new Array()});
};
trickscore = 0;
trx[(trx.length - 1)].namn = "FALL";
trx[(trx.length - 1)].kombo = new Array();
this.nail();
}
function maal(){
if (tilstand == "game"){
timebonus = (Math.floor((time / 25)) * 1000);
trickscore = timebonus;
score = (score + trickscore);
tilstand = "post";
};
}
}
}//package
Section 116
//VoiceOver (VoiceOver)
package {
import flash.media.*;
public dynamic class VoiceOver extends Sound {
}
}//package