Skip to main content
Known Participant
June 27, 2013
Answered

want to increase value by mouse on (release)

  • June 27, 2013
  • 1 reply
  • 394 views

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;

}

This topic has been closed for replies.
Correct answer Ned Murphy

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;
}

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
June 27, 2013

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;
}