1 Reply Latest reply on Nov 30, 2008 7:57 AM by clbeech

    High scoring system for game

    Yair-Cravedgames.com
      Armor bot ranks software, gives you an actionscript that sends the score you want directly online, I have successfully finished it but in the game if i enter a number like 200 and a name like "yair" it works out just fine but when i put a variable like tt that is connected to a number it doesnt work. Here is the Code do you think you can help. Im guessing tt is time because i made this game with a partner

      The First keyframe has the code from my game in it then the next keyframe has the armorbot code:

      stop ();
      sintro.stop();
      t = Math.round(_global.totaltime * 10) / 10 + " units";
      tt.text = t;
      ct.text = _global.totalclickcount;
      _global.puNUM = 1;
      par = 1;
      clickcount = 0;
      N = 30;
      hs = 3;
      ci._visible = 0;
      flr = floor._y;
      kuid = false;
      xv = 0;
      yv = 20;
      g = 1.010000E+000;
      xd = 0;
      go = true;
      boost = 1;
      _global.score = 0;
      ballx = ball._x;
      bally = ball._y;
      d = 9.700000E-001;
      bbu = 5;
      bu = 20;
      bhu = 23;
      hb2l = 10;
      hb2r = 10;
      vb2t = 3;
      vb2b = 10;
      var B = new flash.filters.BlurFilter(0, 0, 2);
      var bupA = new Array();
      ////////////////////////////////////////////////////////////////////////////////////
      Heres the code on the button to the next keyframe:

      on (press) {
      nextFrame();
      }
      ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////
      And Here is the ArmorbotCode take note of the t's:

      //Send Highscore AS2.0 // Armor Bot Rankz
      import ab3.rankz.*;
      function __rankz_send__(par1,par2,par3,par4){
      par227 = new LoadVars();
      par228 = new LoadVars();
      par227.flashkey = par2;
      par227.SU0249 = par1;
      par227.bmFtZTE = Armor_Bot_30_En_AS1.Encode(par3);
      par227.c2NvcmUx = Armor_Bot_30_En_AS1.Encode(par4+"j%e%a%n%s");
      par227.flashkey = par227.flashkey.split("=").join("");
      par227.SU0249 = par227.SU0249.split("=").join("");
      par228.onLoad = function(success){
      if(success){
      trace(par228.msg);
      }else{
      trace(par228.loaded);
      }
      }
      par227.sendAndLoad(" http://rankz.armorbot.com/submit/",par228,"POST");
      }
      bXlnYW1lX25hbWVfdmFyaWFibGU = "Yair";//replace my_name1_variable with your name variable (1)
      bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = tt;//replace my_score1_variable with your score1 variable
      __rankz_send__("MzEyOGolZSVhJW4lcw==", "SnBrUk9ibEo=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
      //Send Highscore AS2.0 END
        • 1. High scoring system for game
          clbeech Level 3
          the variable 'tt' here is a textfield, not a Number, and also the assigned variable 't' includes the text 'units'. so you need to extract the value from a reference other than 'tt' - ie. the number of units, without the 'label'. you either need to create another variable to do so since the calculation is being made within the line defining 't' which provides a String value, or remove the +units portion of the string 't' casting it as a Number and concatenate that in the next line that assigns the textfield 'tt's value. in that way you use the variable 't' in the API call.