1 Reply Latest reply on Jun 27, 2013 4:21 AM by Ned Murphy

    want to increase value by mouse on (release)

    Emraan.Khan

      my script is ................

       

      import flash.external.*; //so we can use externalInterface

      import QueryString.as;   //so we can use the QueryString Class

      var myPath:QueryString = new QueryString();

      assignVariables();

       

      //custom function to handle all the query string parameters

      function assignVariables() {

          //if myName parameter exists

         

          if (myPath.parameters.m1) {

              //assign it to the text of the myName text box

              //unescape() will translate/unencode the url characters

              myName.text = unescape(myPath.parameters.m1);

          }

          if (myPath.parameters.m2) {

              thisUrl.text = unescape(myPath.parameters.m2);

          }

          if (myPath.url) {

              //get the complete url (including any parameters)

              thisUrl.text = myPath.url;

          }

      }

       

       

      var st=12;

      thisUrl.text=st;

       

      my button script is----

       

      on(release){

          st = st+10;

      }

        • 1. Re: want to increase value by mouse on (release)
          Ned Murphy Adobe Community Professional & MVP

          There is nothing wrong with the code you show, though you should not be placing code on objects.  You should use the timeline instead.

           

          If the real problem is that the textfield does not display the increased value of st, that's because you do not reassign it the new value when you change it

           

          on(release){

              st = st+10;
              thisURL.text = st;
          }