کدوم کد سرور رو چک میکنه

شروع موضوع توسط Mohammad1980 ‏18 می 2014 در انجمن Action Script 3

  1. Mohammad1980

    Mohammad1980 New Member

    ارسال‌ها:
    8
    تشکر شده:
    0
    امتیاز دستاورد:
    1
    سلام دوستان<br>من یک بازی فلش دارم که وقتی میخواد لود بشه چک میکنه و میگه به سرور متصل نیستی و نمیگذاره بازی لود بشه. در صورتی که بازی به صورت آفلاین هست. اما چون از سایت دانلود شده اجازه اجراش رو نمیده . من کدهای اکشن رو در آوردم .ممنون میشم یکی از دوستان کمک کنه بگه کدوم کد کار چک کردن رو انجام میده تا با حذف اون کد بتونم بازی رو اجرا کنم. لطفا کمک کنید



    Action script...


    // [onClipEvent of sprite 32 in frame 1]
    onClipEvent (construct)
    {
    account = "";
    autoTrack = false;
    charSet = "";
    configURL = "";
    dc = "d1";
    debugTracking = false;
    moduleMediaVariables = {};
    moduleMediaVariables.playerName = "";
    moduleMediaVariables.trackVars = "None";
    moduleMediaVariables.trackEvents = "None";
    moduleMediaVariables.trackWhilePlaying = false;
    moduleMediaVariables.trackMilestones = "";
    moduleMediaVariables.trackSeconds = "";
    moduleMediaVariables.autoTrack = false;
    mobile = false;
    movieID = "";
    otherVariables = {};
    otherVariables.dynamicVariablePrefix = "";
    otherVariables.visitorID = "";
    otherVariables.visitorMigrationKey = "";
    otherVariables.visitorMigrationServer = "";
    otherVariables.visitorMigrationServerSecure = "";
    otherVariables.cookieDomainPeriods = "";
    otherVariables.cookieLifetime = "";
    otherVariables.currencyCode = "";
    otherVariables.purchaseID = "";
    otherVariables.variableProvider = "";
    otherVariables.channel = "";
    otherVariables.server = "";
    otherVariables.pageType = "";
    otherVariables.transactionID = "";
    otherVariables.events = "";
    otherVariables.products = "";
    otherVariables.campaign = "";
    otherVariables.state = "";
    otherVariables.zip = "";
    otherVariables.hier1 = "";
    otherVariables.hier2 = "";
    otherVariables.hier3 = "";
    otherVariables.hier4 = "";
    otherVariables.hier5 = "";
    otherVariables.list1 = "";
    otherVariables.list2 = "";
    otherVariables.list3 = "";
    otherVariables.prop1 = "";
    otherVariables.eVar1 = "";
    otherVariables.prop2 = "";
    otherVariables.eVar2 = "";
    otherVariables.prop3 = "";
    otherVariables.eVar3 = "";
    otherVariables.prop4 = "";
    otherVariables.eVar4 = "";
    otherVariables.prop5 = "";
    otherVariables.eVar5 = "";
    otherVariables.prop6 = "";
    otherVariables.eVar6 = "";
    otherVariables.prop7 = "";
    otherVariables.eVar7 = "";
    otherVariables.prop8 = "";
    otherVariables.eVar8 = "";
    otherVariables.prop9 = "";
    otherVariables.eVar9 = "";
    otherVariables.prop10 = "";
    otherVariables.eVar10 = "";
    otherVariables.prop11 = "";
    otherVariables.eVar11 = "";
    otherVariables.prop12 = "";
    otherVariables.eVar12 = "";
    otherVariables.prop13 = "";
    otherVariables.eVar13 = "";
    otherVariables.prop14 = "";
    otherVariables.eVar14 = "";
    otherVariables.prop15 = "";
    otherVariables.eVar15 = "";
    otherVariables.prop16 = "";
    otherVariables.eVar16 = "";
    otherVariables.prop17 = "";
    otherVariables.eVar17 = "";
    otherVariables.prop18 = "";
    otherVariables.eVar18 = "";
    otherVariables.prop19 = "";
    otherVariables.eVar19 = "";
    otherVariables.prop20 = "";
    otherVariables.eVar20 = "";
    otherVariables.prop21 = "";
    otherVariables.eVar21 = "";
    otherVariables.prop22 = "";
    otherVariables.eVar22 = "";
    otherVariables.prop23 = "";
    otherVariables.eVar23 = "";
    otherVariables.prop24 = "";
    otherVariables.eVar24 = "";
    otherVariables.prop25 = "";
    otherVariables.eVar25 = "";
    otherVariables.prop26 = "";
    otherVariables.eVar26 = "";
    otherVariables.prop27 = "";
    otherVariables.eVar27 = "";
    otherVariables.prop28 = "";
    otherVariables.eVar28 = "";
    otherVariables.prop29 = "";
    otherVariables.eVar29 = "";
    otherVariables.prop30 = "";
    otherVariables.eVar30 = "";
    otherVariables.prop31 = "";
    otherVariables.eVar31 = "";
    otherVariables.prop32 = "";
    otherVariables.eVar32 = "";
    otherVariables.prop33 = "";
    otherVariables.eVar33 = "";
    otherVariables.prop34 = "";
    otherVariables.eVar34 = "";
    otherVariables.prop35 = "";
    otherVariables.eVar35 = "";
    otherVariables.prop36 = "";
    otherVariables.eVar36 = "";
    otherVariables.prop37 = "";
    otherVariables.eVar37 = "";
    otherVariables.prop38 = "";
    otherVariables.eVar38 = "";
    otherVariables.prop39 = "";
    otherVariables.eVar39 = "";
    otherVariables.prop40 = "";
    otherVariables.eVar40 = "";
    otherVariables.prop41 = "";
    otherVariables.eVar41 = "";
    otherVariables.prop42 = "";
    otherVariables.eVar42 = "";
    otherVariables.prop43 = "";
    otherVariables.eVar43 = "";
    otherVariables.prop44 = "";
    otherVariables.eVar44 = "";
    otherVariables.prop45 = "";
    otherVariables.eVar45 = "";
    otherVariables.prop46 = "";
    otherVariables.eVar46 = "";
    otherVariables.prop47 = "";
    otherVariables.eVar47 = "";
    otherVariables.prop48 = "";
    otherVariables.eVar48 = "";
    otherVariables.prop49 = "";
    otherVariables.eVar49 = "";
    otherVariables.prop50 = "";
    otherVariables.eVar50 = "";
    pageName = "";
    pageURL = "";
    trackClickMap = false;
    trackingServer = "";
    trackingServerBase = "2o7.net";
    trackingServerSecure = "";
    trackLocal = true;
    trackOnLoad = false;
    useExternalVariables = false;
    visitorNamespace = "";
    }


    // [onClipEvent of sprite 88 in frame 2]
    onClipEvent (load)
    {
    setProperty("", _visible, false);
    }


    // [onClipEvent of sprite 419 in frame 4]
    onClipEvent (enterFrame)
    {
    engineLoop();
    }


    // [onClipEvent of sprite 479 in frame 5]
    onClipEvent (load)
    {
    blurstart = 5;
    setProperty("", _alpha, 25);
    }


    // [onClipEvent of sprite 340 in frame 5]
    onClipEvent (enterFrame)
    {
    _root.scoreScreenCounter();
    }


    // [Action in Frame 1]
    switchbtn.onRelease = function ()
    {
    _root.getURL("play_frame_hm.html");
    };


    function configActionSource()
    {
    s.referrer = "adultswim.com";
    s.account = "adultswimsocialgamesext";
    s.server = "Facebook";
    s.channel = "Games";
    s.pageName = "Robot Unicorn Attack - Game Play";
    s.pageURL = "";
    s.charSet = "ISO-8859-1";
    s.currencyCode = "USD";
    s.trackClickMap = true;
    s.movieID = "";
    s.debugTracking = true;
    s.trackLocal = false;
    s.visitorNamespace = "adultswim";
    s.trackingServer = "stats.adultswim.com";
    } // End of the function
    function doOmniture()
    {
    flash.external.ExternalInterface.call("refeshAds", _global.eVar);
    s.trackLink(_root._url, "o", _global.eVar);
    } // End of the function
    configActionSource();
    s.prop1 = "robot unicorn attack";
    _global.eVar = "game_plays";


    stop ();


    // [Action in Frame 2]
    function hideMuteButtons()
    {
    buttonMusic._visible = false;
    buttonSound._visible = false;
    } // End of the function
    function showMuteButtons()
    {
    buttonMusic._visible = true;
    buttonSound._visible = true;
    } // End of the function
    function toggleMusicMute()
    {
    if (!isAllMute)
    {
    _root.debugField.text = _root.debugField.text + " mm1 ";
    if (!isMusicMute)
    {
    _root.debugField.text = _root.debugField.text + " mm2 ";
    flash.external.ExternalInterface.call("createCookie", "museMute", "on", "30");
    so.data.muteMusic = "1";
    isMusicMute = true;
    stopAllSounds ();
    _root.musicShell.gotoAndPlay(8);
    buttonMusic.gotoAndStop(2);
    }
    else
    {
    _root.debugField.text = _root.debugField.text + " mm3 ";
    flash.external.ExternalInterface.call("createCookie", "museMute", "off", "30");
    so.data.muteMusic = "0";
    isMusicMute = false;
    buttonMusic.gotoAndStop(1);
    stopAllSounds ();
    if (_root._currentframe <= 2)
    {
    _root.musicShell.gotoAndPlay(1);
    }
    else
    {
    _root.musicShell.gotoAndPlay(5);
    } // end else if
    } // end else if
    }
    else
    {
    _root.debugField.text = _root.debugField.text + " mm4 ";
    buttonMusic.gotoAndStop(2);
    } // end else if
    } // End of the function
    function toggleAllMute()
    {
    if (!isAllMute)
    {
    flash.external.ExternalInterface.call("createCookie", "allMute", "on", "30");
    so.data.muteAll = "1";
    isAllMute = true;
    buttonSound.gotoAndStop(2);
    stopAllSounds ();
    var _loc2 = new Sound(_root);
    _loc2.setVolume(0);
    isMusicMute = false;
    toggleMusicMute();
    }
    else
    {
    flash.external.ExternalInterface.call("createCookie", "allMute", "off", "30");
    so.data.muteAll = "0";
    isAllMute = false;
    buttonSound.gotoAndStop(1);
    _loc2 = new Sound(_root);
    _loc2.setVolume(100);
    isMusicMute = true;
    toggleMusicMute();
    } // end else if
    } // End of the function
    var so = SharedObject.getLocal("rua", "/");
    so.data.isHM = "2";
    var isMusicMute = false;
    var isAllMute = false;
    var exMuseMute = flash.external.ExternalInterface.call("readCookie", "museMute");
    var exAllMute = flash.external.ExternalInterface.call("readCookie", "allMute");
    var soAllMute = so.data.muteAll == "1";
    var soMuseMute = so.data.muteMusic == "1";
    if (exAllMute == "on" || soAllMute)
    {
    toggleAllMute();
    }
    else if (exMuseMute == "on" || soMuseMute)
    {
    toggleMusicMute();
    } // end else if


    var tourney = new com.thup.ruafb.Tourney();


    System.security.allowDomain("*");
    var cr = new Array();
    cr[0] = 6412456;
    cr[1] = 741245;
    cr[2] = 18150618;


    function setHighScores()
    {
    endOK = 1;
    for (count = 1; count <= 5; count++)
    {
    if (HUDfinalScore > highScores[count])
    {
    scoreNum = count;
    for (count2 = 5; count2 > scoreNum; count2--)
    {
    highScores[count2] = highScores[count2 - 1];
    } // end of for
    highScores[count] = HUDfinalScore;
    finalbox["scorebox" + count].gotoAndPlay(2);
    count = 6;
    } // end if
    } // end of for
    for (count = 1; count <= 5; count++)
    {
    finalbox["score" + count].scoreText = highScores[count];
    } // end of for
    } // End of the function
    function deleteScores()
    {
    for (count = 1; count <= 5; count++)
    {
    this["highScore" + count] = 6000 - 1000 * count;
    } // end of for
    highScores = new Array(0, highScore1, highScore2, highScore3, highScore4, highScore5);
    highScoreNames = new Array("com", "com", "com", "com", "com");
    highScoresXX = new Array(0, 0, 0, 0, 0);
    } // End of the function
    var var1 = 0;
    var var3 = 2772;
    cmpSetObj.var1 = var1;
    cmpSetObj.var3 = var3;
    mccm.onPress = function ()
    {
    };
    for (count = 1; count <= 5; count++)
    {
    this["highScore" + count] = 6000 - 1000 * count;
    } // end of for
    if (highScores[5] <= 1000)
    {
    highScores = new Array(0, highScore1, highScore2, highScore3, highScore4, highScore5);
    highScoreNames = new Array("com", "com", "com", "com", "com");
    highScoresXX = new Array(0, 0, 0, 0, 0);
    } // end if


    _root.zDown = false;
    _root.xDown = false;
    keyCatcher.onKeyDown = function ()
    {
    if (String.fromCharCode(Key.getAscii()) == "Z" || String.fromCharCode(Key.getAscii()) == "z")
    {
    _root.zDown = true;
    }
    else if (String.fromCharCode(Key.getAscii()) == "X" || String.fromCharCode(Key.getAscii()) == "x")
    {
    _root.xDown = true;
    } // end else if
    };
    keyCatcher.onKeyUp = function ()
    {
    if (String.fromCharCode(Key.getAscii()) == "Z" || String.fromCharCode(Key.getAscii()) == "z")
    {
    _root.zDown = false;
    }
    else if (String.fromCharCode(Key.getAscii()) == "X" || String.fromCharCode(Key.getAscii()) == "x")
    {
    _root.xDown = false;
    } // end else if
    };
    Key.addListener(keyCatcher);


    function F_engineLoop()
    {
    if (this.player.dead != 1)
    {
    this.movePlayer();
    this.checkDiamonds();
    } // end if
    _root.pointArt.pointText = _root.HUDscore;
    if (_root.pointArt._xscale > 100)
    {
    _root.pointArt._xscale = _root.pointArt._xscale - 1;
    _root.pointArt._yscale = _root.pointArt._xscale;
    } // end if
    _root.setCamera();
    } // End of the function
    function F_checkDot(dotName)
    {
    tempDot = this["dot" + dotName];
    colliderx = tempDot._x;
    collidery = tempDot._y;
    var _loc3 = {x: colliderx, y: collidery};
    this.localToGlobal(_loc3);
    dotHit = 0;
    for (count = 1; count < 3; count++)
    {
    if (_root.engine.world["building" + count].solid.hitTest(_loc3.x, _loc3.y, true))
    {
    dotHit = 1;
    } // end if
    } // end of for
    if (dotHit)
    {
    return (1);
    }
    else
    {
    return (0);
    } // end else if
    } // End of the function
    function F_checkDiamonds()
    {
    if (this.world.building1.diamond._visible == true)
    {
    if (this.world.building1.diamond._currentframe == 1)
    {
    if (this.player.hitbox.hitTest(this.world.building1.diamond.hitbox))
    {
    if (this.player.animState == "charge" || this.player.chargeEndTime > 0)
    {
    this.world.building1.diamond.gotoAndStop(2);
    _root.cameraShake = 4;
    _root.enemyCombo = _root.enemyCombo + 1;
    _root.showPoints("Big", 1);
    _root.HUDscore = _root.HUDscore + starPoints * _root.enemyCombo;
    _root.pointArt._xscale = _root.pointArt._xscale + _root.enemyCombo * 4;
    }
    else
    {
    this.world.building1.diamond._x = this.world.building1.diamond._x + 15;
    this.world.building1.diamond._rotation = this.world.building1.diamond._rotation + 10;
    this.player.art.metalHit.gotoAndStop(2);
    _root.deathStyle = 3;
    this.player.deathTime(1);
    } // end else if
    }
    else if (this.world.building1.diamond.hitbox.hitTest(this.butterflybox))
    {
    _root.diamondCombo = 0;
    this.world.building1.diamond._visible = false;
    } // end if
    } // end if
    } // end else if
    if (this.world.building2.diamond._visible == true)
    {
    if (this.world.building2.diamond._currentframe == 1)
    {
    if (this.player.hitbox.hitTest(this.world.building2.diamond.hitbox))
    {
    if (this.player.animState == "charge" || this.player.chargeEndTime > 0)
    {
    this.world.building2.diamond.gotoAndStop(2);
    _root.cameraShake = 4;
    _root.HUDdiamonds = _root.HUDdiamonds + 1;
    _root.enemyCombo = _root.enemyCombo + 1;
    _root.showPoints("Big", 2);
    _root.HUDscore = _root.HUDscore + starPoints * _root.enemyCombo;
    _root.pointArt._xscale = _root.pointArt._xscale + _root.enemyCombo * 4;
    }
    else
    {
    this.world.building2.diamond._x = this.world.building2.diamond._x + 15;
    this.world.building2.diamond._rotation = this.world.building2.diamond._rotation + 10;
    this.player.art.metalHit.gotoAndStop(2);
    _root.deathStyle = 3;
    this.player.deathTime(1);
    } // end else if
    }
    else if (this.world.building2.diamond.hitbox.hitTest(this.butterflybox))
    {
    _root.diamondCombo = 0;
    this.world.building2.diamond._visible = false;
    } // end if
    } // end if
    } // end else if
    if (this.world.building1.butterfly._currentframe == 1)
    {
    if (this.world.building1.butterfly._visible)
    {
    this.world.building1.butterfly._x = this.world.building1.butterfly._x + 3;
    if (this.player.hitbox.hitTest(this.world.building1.butterfly.art.wings))
    {
    this.world.building1.butterfly.gotoAndStop(2);
    _root.butterflyCombo = _root.butterflyCombo + 1;
    this.player.colorUp = 3;
    _root.HUDscore = _root.HUDscore + butterPoints * _root.butterflyCombo;
    _root.pointArt._xscale = _root.pointArt._xscale + _root.butterflyCombo * 2;
    _root.showPoints("Small", 1);
    } // end if
    if (this.world.building1.butterfly.hitbox.hitTest(this.butterflybox))
    {
    if (this.world.building1.butterfly._currentframe == 1)
    {
    _root.butterflyCombo = 0;
    } // end if
    } // end if
    } // end if
    } // end if
    if (this.world.building2.butterfly._currentframe == 1)
    {
    if (this.world.building2.butterfly._visible)
    {
    this.world.building2.butterfly._x = this.world.building2.butterfly._x + 3;
    if (this.player.hitbox.hitTest(this.world.building2.butterfly.art.wings))
    {
    this.world.building2.butterfly.gotoAndStop(2);
    _root.butterflyCombo = _root.butterflyCombo + 1;
    this.player.colorUp = 3;
    _root.HUDscore = _root.HUDscore + butterPoints * _root.butterflyCombo;
    _root.pointArt._xscale = _root.pointArt._xscale + _root.butterflyCombo * 2;
    _root.showPoints("Small", 2);
    } // end if
    if (this.world.building2.butterfly.hitbox.hitTest(this.butterflybox))
    {
    if (this.world.building2.butterfly._currentframe == 1)
    {
    _root.butterflyCombo = 0;
    } // end if
    } // end if
    } // end if
    } // end if
    if (enemyCombo > bestStarCombo)
    {
    bestStarCombo = enemyCombo;
    } // end if
    if (butterflyCombo > bestFairyCombo)
    {
    bestFairyCombo = butterflyCombo;
    } // end if
    } // End of the function
    function F_checkOddLanding(landDirection)
    {
    if (checkDot("BottomRoot"))
    {
    for (count = 1; count < 10; count++)
    {
    if (checkDot("BottomStick") == 0)
    {
    travely(1);
    continue;
    } // end if
    count = 10;
    } // end of for
    }
    else
    {
    for (count = 1; count < 10; count++)
    {
    if (checkDot("BottomStick") == 0)
    {
    setProperty("", _x, _x + 1 * landDirection);
    continue;
    } // end if
    applyGravity = 0;
    touchGround = 1;
    count = 10;
    } // end of for
    } // end else if
    } // End of the function
    function F_travelx(movex)
    {
    this._x = this._x + movex;
    } // End of the function
    function F_travely(movey)
    {
    this._y = this._y + movey;
    } // End of the function
    function F_moveWorldx(movex)
    {
    for (count = 1; count < 3; count++)
    {
    if (count == 1)
    {
    otherBuilding = this.world.building2;
    }
    else
    {
    otherBuilding = this.world.building1;
    } // end else if
    building = this.world["building" + count];
    building._x = building._x - movex;
    _root.HUDscore = _root.HUDscore + int(movex / 8);
    if (_root.HUDscore > 5000)
    {
    if (dolphinLevel == 1)
    {
    dolphinLevel = 2;
    dolphins.gotoAndStop(2);
    } // end if
    } // end if
    if (_root.HUDscore > 10000)
    {
    if (dolphinLevel == 2)
    {
    dolphinLevel = 3;
    dolphins.gotoAndStop(3);
    } // end if
    } // end if
    if (_root.HUDscore > 15000)
    {
    if (dolphinLevel == 3)
    {
    dolphinLevel = 4;
    dolphins.gotoAndStop(4);
    } // end if
    } // end if
    if (_root.HUDscore > 20000)
    {
    if (dolphinLevel == 4)
    {
    dolphinLevel = 5;
    dolphins.gotoAndStop(5);
    } // end if
    } // end if
    if (_root.HUDscore > 25000)
    {
    if (dolphinLevel == 5)
    {
    dolphinLevel = 6;
    dolphins.gotoAndStop(6);
    } // end if
    } // end if
    if (_root.HUDscore > 30000)
    {
    if (dolphinLevel == 6)
    {
    dolphinLevel = 7;
    dolphins.gotoAndStop(7);
    } // end if
    } // end if
    if (building.diamond._visible)
    {
    _root["diamondEdgeTime" + count] = int(engine._x - 640 + building._x + building.diamond._x) / 20;
    diamondTriggerTime = 25 + (movex - 14) / 1.500000;
    if (_root["diamondSpawn" + count] != 1 && _root["diamondEdgeTime" + count] < diamondTriggerTime)
    {
    _root["diamondSpawn" + count] = 1;
    building.diamond.starSpawn.gotoAndPlay(2);
    _root.starTest.gotoAndPlay(2);
    } // end if
    } // end if
    if (building._x < -1500)
    {
    movexBuilding = int(movex / 1.500000);
    if (movexBuiling > 20)
    {
    movexBuilding = 20;
    } // end if
    building.gotoAndStop(random(movexBuilding) + 1);
    building.solid._visible = false;
    building.bloomArt.gotoAndStop(building._currentframe);
    building._x = otherBuilding._x + otherBuilding._width / 2 + building._width / 2 + 400 + movex * 8 + random(100);
    building._y = 300 + random(100);
    _root["diamondSpawn" + count] = 0;
    if (random(movex - 10) > 2)
    {
    building.diamond._visible = true;
    if (building.diamond._currentframe == 1)
    {
    _root.enemyCombo = 0;
    } // end if
    building.diamond.gotoAndStop(1);
    targetnum = random(2) + 2;
    targetdot = building["dot" + targetnum];
    building.diamond._x = targetdot._x;
    building.diamond._y = targetdot._y;
    }
    else
    {
    building.diamond._visible = false;
    } // end else if
    building.butterfly.gotoAndStop(1);
    targetdot = building.dot1;
    building.butterfly._x = targetdot._x - (400 + movex * 2);
    building.butterfly._y = targetdot._y - 150 + random(30);
    } // end if
    building = this.world["backa" + count];
    building._x = building._x - movex / 2;
    building._y = 500 - this._y / 2;
    if (building._x < -700)
    {
    building._x = building._x + (1400 + random(100));
    buidling.inside._y = -50 + random(100);
    if (random(2) == 0)
    {
    building._xscale = building._xscale * -1;
    } // end if
    } // end if
    building = this.world["backb" + count];
    building._x = building._x - movex / 8;
    building._y = 500 - this._y / 1.500000;
    if (building._x < -700)
    {
    building._x = building._x + (1400 + random(100));
    buidling.inside._y = -25 + random(50);
    if (random(2) == 0)
    {
    building._xscale = building._xscale * -1;
    } // end if
    } // end if
    } // end of for
    } // End of the function
    function setCamera()
    {
    if (engine.player.dead != 1)
    {
    engine._y = engine._y - (playerPointy - 200) / 10;
    if (engine._y < 0)
    {
    engine._y = 0;
    } // end if
    } // end if
    if (cameraShake > 0)
    {
    engine._y = engine._y + random(cameraShake * 3) * cameraShakeDir;
    engine._x = engine._x + random(cameraShake * 3) * cameraShakeDir;
    cameraShakeDir = cameraShakeDir * -1;
    cameraShake = cameraShake - 0.100000;
    }
    else
    {
    cameraShake = 0;
    } // end else if
    if (engine._x > 321)
    {
    engine._x = engine._x - 0.250000;
    }
    else if (engine._x < 319)
    {
    engine._x = engine._x + 0.250000;
    } // end else if
    } // End of the function
    function showPoints(psize, pnum)
    {
    pointFX = _root["points" + psize];
    fxy = _root.engine._y + (_root.engine.player._y - 10);
    with (pointFX)
    {
    _visible = true;
    gotoAndPlay(2);
    _x = 100;
    _y = fxy;
    } // End of with
    } // End of the function
    function dashWarning()
    {
    if (dashWarn < 3)
    {
    dashWarn = dashWarn + 1;
    dashText.gotoAndPlay(2);
    } // end if
    } // End of the function


    function F_movePlayer()
    {
    with (engine.player)
    {
    if (dropTime > 0)
    {
    dropTime = dropTime - 1;
    } // end if
    if (airChargeMeter < 100)
    {
    airChargeMeter = airChargeMeter + 1;
    } // end if
    _root.rainbowBar._xscale = airChargeMeter - 30;
    if (_root.rainbowBar._xscale < 0)
    {
    _root.rainbowBar._xscale = 0;
    } // end if
    prevAnimState = animState;
    rot4 = rot3;
    rot3 = rot2;
    rot2 = rot1;
    rot1 = rotationTarget;
    rotationTarget = 0;
    art._rotation = (rot1 + rot2 + rot3 + rot4) / 4;
    if (art._rotation > 20)
    {
    art._rotation = 20;
    }
    else if (art._rotation < -20)
    {
    art._rotation = -20;
    } // end else if
    if (_root.xDown || Key.isDown(_root.p1r) || Key.isDown(_root.p1rCase))
    {
    if (chargeCoolDown > 20)
    {
    if (airChargeMeter > 40)
    {
    _y = _y - 8;
    airChargeMeter = airChargeMeter - 70;
    chargeOffset = 15;
    airCharged = 1;
    airChargeCount = airChargeCount + 1;
    chargeCoolDown = 0;
    applyGravity = 0;
    animState = "charge";
    art.blurMe(30, 0);
    colorUp = 4;
    art.colorMe(colorUp, colorUp, colorUp);
    } // end if
    } // end if
    } // end if
    if (chargeCoolDown < 21)
    {
    chargeCoolDown = chargeCoolDown + 1;
    } // end if
    if (chargeEndTime > 0)
    {
    chargeEndTime = chargeEndTime - 1;
    } // end if
    if (animState != "charge")
    {
    if (_root.zDown || Key.isDown(_root.p1u) || Key.isDown(_root.p1uCase))
    {
    if (applyGravity == 0 || dropTime > 0 || jumpNum == 0)
    {
    if (!upPress)
    {
    art.sparkleSound.gotoAndStop(2);
    jumpNum = 1;
    dropTime = 0;
    touchGround = 0;
    applyGravity = 1;
    thrusty = jumpVel;
    gravity = 0;
    colorUp = 2;
    airCharged = 0;
    animState = "jump";
    } // end if
    }
    else
    {
    if (!upPress && gravity > 6)
    {
    if (jumpNum == 1)
    {
    art.jumpanim.rainbow.gotoAndStop(2);
    jumpNum = 2;
    applyGravity = 1;
    thrusty = jumpVel;
    gravity = 2;
    animState = "jump";
    colorUp = 3;
    art.colorMe(colorUp, colorUp, colorUp);
    } // end if
    } // end if
    gravity = gravity - 0.750000;
    } // end else if
    upPress = 1;
    }
    else
    {
    upPress = 0;
    } // end if
    } // end else if
    speedx = maxspeedx;
    _root.engine.moveWorldx(speedx);
    if (maxspeedx < 50)
    {
    maxspeedx = maxspeedx + 0.010000;
    } // end if
    _root.testVar6 = maxspeedx;
    _x = (speedx - 14) / 2 - 260 + offsetx;
    if (offsetx > 0)
    {
    offsetx = offsetx - 5;
    }
    else
    {
    offsetx = 0;
    } // end else if
    if (applyGravity && animState != "charge")
    {
    fallSpeed = thrusty - gravity;
    if (fallSpeed > 10)
    {
    fallSpeed = 10;
    } // end if
    travely(-fallSpeed);
    gravity = gravity + 1.200000;
    } // end if
    touchCeiling = 0;
    if (checkDot("Top"))
    {
    touchCeiling = 1;
    for (count = 1; count < 20; count++)
    {
    if (checkDot("Top"))
    {
    travely(1);
    continue;
    } // end if
    count = 21;
    } // end of for
    } // end if
    if (checkDot("Bottom"))
    {
    touchGround = 1;
    for (count = 1; count < 20; count++)
    {
    if (checkDot("Bottom"))
    {
    travely(-1);
    rotationTarget = rotationTarget - (rotationStep + 1);
    continue;
    } // end if
    count = 21;
    } // end of for
    } // end if
    if (checkDot("Right"))
    {
    _root.deathStyle = 2;
    deathTime(1);
    return (0);
    } // end if
    if (applyGravity)
    {
    art._rotation = 0;
    rotationTarget = 0;
    if (checkDot("TopRight"))
    {
    touchCeiling = 1;
    while (checkDot("TopRight"))
    {
    travely(1);
    } // end while
    } // end if
    if (checkDot("BottomLeft"))
    {
    if (gravity > thrusty)
    {
    if (touchGround == 0)
    {
    checkOddLanding(-1);
    } // end if
    } // end if
    if (touchGround == 0)
    {
    while (checkDot("BottomLeft"))
    {
    travely(-1);
    } // end while
    } // end if
    } // end if
    if (checkDot("BottomRight"))
    {
    if (gravity > thrusty)
    {
    if (touchGround == 0)
    {
    checkOddLanding(1);
    } // end if
    } // end if
    if (touchGround == 0)
    {
    while (checkDot("BottomRight"))
    {
    travely(-1);
    } // end while
    } // end if
    } // end if
    } // end if
    if (touchCeiling)
    {
    if (applyGravity)
    {
    thrusty = thrusty / 2;
    } // end if
    } // end if
    if (touchGround)
    {
    applyGravity = 0;
    gravity = 0;
    if (animState != "charge")
    {
    animState = "run";
    airCharged = 0;
    airChargeCount = 0;
    } // end if
    if (applyGravity == 0 && animState != "charge")
    {
    if (checkDot("BottomRoot"))
    {
    for (count = 1; count < 10; count++)
    {
    if (checkDot("BottomStick") == 0)
    {
    travely(1);
    rotationTarget = rotationTarget + rotationStep;
    continue;
    } // end if
    count = 10;
    } // end of for
    } // end if
    } // end if
    if (animState != "charge")
    {
    if (checkDot("BottomStick") == 0)
    {
    if (checkDot("BottomRightStick") == 0)
    {
    if (checkDot("BottomLeftStick") == 0)
    {
    touchGround = 0;
    airCharged = 0;
    dropTime = 10;
    jumpNum = 1;
    applyGravity = 1;
    thrusty = jumpVel;
    gravity = jumpVel;
    animState = "jump";
    } // end if
    } // end if
    } // end if
    } // end if
    } // end if
    var playerPoint = {x: _x, y: _y};
    this.localToGlobal(playerPoint);
    _root.playerPointx = playerPoint.x + 300;
    _root.playerPointy = playerPoint.y;
    if (colorUp > 1.200000)
    {
    colorUp = colorUp - 0.100000;
    art.colorMe(colorUp, colorUp, colorUp);
    } // end if
    if (_y < -600)
    {
    _y = -600;
    } // end if
    if (this.dead != 1)
    {
    art.gotoAndStop(animState);
    if (animState == "run")
    {
    if (prevAnimState != "run")
    {
    airChargeMeter = 100;
    art.runanim.gotoAndStop(200);
    } // end if
    jumpNum = 0;
    prevAnimFrame = animFrame;
    animFrame = art.runanim._currentframe;
    art.runanim.gotoAndStop(animFrame + int(speedx * 2));
    if (animFrame > 450)
    {
    art.runanim.gotoAndStop(animFrame - 450);
    } // end if
    if (prevAnimFrame < 90 && animFrame > 90)
    {
    art.gallopSounds.gotoAndStop(2);
    } // end if
    if (prevAnimFrame < 150 && animFrame > 150)
    {
    art.gallopSounds.gotoAndStop(3);
    } // end if
    if (prevAnimFrame < 180 && animFrame > 180)
    {
    art.gallopSounds.gotoAndStop(4);
    } // end if
    }
    else if (animState == "jump")
    {
    art.jumpanim.gotoAndStop(int(gravity * 8.750000));
    }
    else if (animState == "charge")
    {
    _root.engine.moveWorldx(speedx / 2);
    offsetx = offsetx + chargeOffset;
    chargeOffset = chargeOffset - 1;
    if (chargeOffset < 0)
    {
    chargeOffset = 0;
    } // end if
    } // end else if
    } // end else if
    if (_y > 700)
    {
    _root.deathStyle = 1;
    deathTime(1);
    } // end if
    } // End of with
    } // End of the function
    function F_endCharge()
    {
    with (engine.player)
    {
    touchGround = 0;
    if (jumpNum == 0)
    {
    dropTime = 10;
    }
    else
    {
    jumpNum = 1;
    } // end else if
    chargeEndTime = 10;
    applyGravity = 1;
    thrusty = jumpVel;
    gravity = jumpVel;
    animState = "jump";
    art.gotoAndStop("jump");
    art.jumpanim.gotoAndStop(int(gravity * 8.750000));
    } // End of with
    } // End of the function
    function F_deathTime(deathMethod)
    {
    this.dead = 1;
    lives.nextFrame();
    if (deathMethod == 1)
    {
    this.art.gotoAndStop("deathExplode");
    _root.cameraShake = 6;
    }
    else if (deathMethod == 2)
    {
    this.art.gotoAndStop("deathFall");
    } // end else if
    } // End of the function


    function initialize()
    {
    setProperty("", _quality, "medium");
    _root.p1u = 90;
    _root.p1uCase = 122;
    _root.p1d = 83;
    _root.p1l = 65;
    _root.p1r = 88;
    _root.p1rCase = 120;
    _root.p1ps = 32;
    _root.score = 0;
    _root.HUDscore = 0;
    _root.HUDdiamonds = 0;
    _root.HUDbutterflies = 0;
    _root.HUDfinalScore = 0;
    _root.cameraShakeDir = 1;
    _root.cameraShake = 0;
    _root.butterflyCombo = 0;
    _root.enemyCombo = 1;
    _root.butterPoints = 10;
    _root.starPoints = 100;
    _root.dolphinLevel = 1;
    _root.dashWarn = 0;
    _root.deathStyle = 1;
    if (_root.scoreTurn == 0)
    {
    _root.score1 = 0;
    _root.score2 = 0;
    _root.score3 = 0;
    _root.bestFairyCombo = 0;
    _root.bestStarCombo = 0;
    _root.scoreTurn = 1;
    } // end if
    _root.lives.gotoAndStop(scoreTurn);
    with (engine)
    {
    originx = 320;
    originy = 240;
    player.thrusty = 0;
    player.offsetx = 0;
    player.gravity = 0;
    player.applyGravity = 1;
    player.maxspeedx = 14;
    player.jumpVel = 14;
    player.speedx = player.maxspeedx;
    player.speedstep = 0.250000;
    player.dead = 0;
    player.airCharged = 0;
    player.airChargeCount = 0;
    player.airChargeMeter = 100;
    player.chargeCoolDown = 100;
    player.chargeEndTime = 0;
    player.dropTime = 0;
    player.rotationStep = 2;
    player.rotationTarget = 0;
    player.rot1 = 0;
    player.rot2 = 0;
    player.rot3 = 0;
    player.animState = "run";
    player.colorUp = 4;
    } // End of with
    engine.player.checkDot = F_checkDot;
    engine.player.endCharge = F_endCharge;
    engine.player.deathTime = F_deathTime;
    engine.player.checkOddLanding = F_checkOddLanding;
    engine.player.travelx = F_travelx;
    engine.player.travely = F_travely;
    engine.engineLoop = F_engineLoop;
    engine.moveWorldx = F_moveWorldx;
    engine.movePlayer = F_movePlayer;
    engine.checkDiamonds = F_checkDiamonds;
    engine.world.building1.diamond._visible = false;
    engine.world.building2.diamond._visible = false;
    } // End of the function
    stop ();
    scoreTurn = 0;


    // [Action in Frame 3]
    _root.tourneyHolder._visible = false;
    _root.showMuteButtons();


    stopAllSounds ();
    if (!_root.isMusicMute)
    {
    musicShell.gotoAndPlay(3);
    musicStarted = 1;
    } // end if
    _root.tourney.hideScores();
    _root.tourney.killFrameCheck();


    // [Action in Frame 4]
    stop ();
    initialize();
    _root.tourneyHolder._visible = false;


    // [Action in Frame 5]
    function setScoreScreen()
    {
    scoreArt1._visible = true;
    scoreArt1.scoreText = score1;
    if (scoreTurn > 1)
    {
    scoreArt2._visible = true;
    scoreArt2.scoreText = score2;
    } // end if
    if (scoreTurn > 2)
    {
    scoreArt3._visible = true;
    scoreArt3.scoreText = score3;
    } // end if
    if (scoreTurn == 1)
    {
    scorebox1.gotoAndPlay(2);
    }
    else if (scoreTurn == 2)
    {
    scorebox2.gotoAndPlay(2);
    } // end else if
    if (scoreTurn == 3)
    {
    scorebox3.gotoAndPlay(2);
    }
    else
    {
    endOK = 1;
    scoreTurn = scoreTurn + 1;
    } // end else if
    } // End of the function
    function showFinalScore()
    {
    scoreArtFinal._visible = true;
    finalbox._visible = true;
    finalbox.gotoAndPlay(2);
    HUDfinalScore = score1 + score2 + score3;
    scoreArtFinal.scoreText = HUDfinalScore;
    scoreTurn = 0;
    _root.tourney.doFinalScore(HUDfinalScore);
    pressztext._visible = true;
    presszreflection._visible = true;
    pressztext.gotoAndStop(2);
    presszreflection.gotoAndStop(2);
    } // End of the function
    function scoreScreenCounter()
    {
    if (scoreTurn != 0)
    {
    screenTime = screenTime - 1;
    pressztext.timeText = int(screenTime / 30);
    presszreflection.timeText = int(screenTime / 30);
    if (screenTime <= 0)
    {
    _root.HUDscore = 0;
    gotoAndStop(4);
    } // end if
    } // end if
    } // End of the function
    endOK = 0;
    _root.tourney.showScores();
    _root["score" + scoreTurn] = HUDscore;
    if (scoreTurn == 1)
    {
    pressztext._visible = true;
    presszreflection._visible = true;
    scoreArt1._visible = false;
    scoreArt2._visible = false;
    scoreArt3._visible = false;
    scoreStars1.gotoAndPlay(2);
    } // end if
    if (scoreTurn == 2)
    {
    scoreArt1.scoreText = score1;
    scoreArt2._visible = false;
    scoreArt3._visible = false;
    scoreStars2.gotoAndPlay(2);
    } // end if
    if (scoreTurn == 3)
    {
    timerSound.gotoAndStop(2);
    scoreArt3._visible = false;
    scoreArt1.scoreText = score1;
    scoreArt2.scoreText = score1;
    scoreStars3.gotoAndPlay(2);
    pressztext._visible = false;
    presszreflection._visible = false;
    } // end if
    scoreArtFinal._visible = false;
    finalbox._visible = false;
    screenTime = 270;


    switchbtn2.onRelease = function ()
    {
    _root.getURL("play_frame_hm.html");
    };​
     
    نوشته شده توسط Mohammad1980 در ‏18 می 2014

به اشتراک بگذارید