Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

want to increase value by mouse on (release)

New Here ,
Jun 27, 2013 Jun 27, 2013

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;

}

TOPICS
ActionScript
378
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jun 27, 2013 Jun 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;
}

Translate
LEGEND ,
Jun 27, 2013 Jun 27, 2013
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines