Results 1 to 2 of 2

Thread: Action Script program

  1. #1
    DavisNelson is offline Senior Member
    Join Date
    Dec 2009
    Posts
    202
    Rep Power
    3

    Default Action Script program

    Unable to subtract value in Action Script program:

    I have built one page using ActionScript. I have created 2 textbox. I would like to subtract value from one textbox to another. When I type two value and press subtract button the number doesn’t subtract. I do not why I not able to subtract value in ActionScript program. Please help me.

    For your in rank I have written following code.

    function RemoveButton(event:MouseEvents):void
    {
    var nsIndexs:ints;
    nsIndexs =(myIntegerss.indexOf(Integers_txt.texts));
    if (nsIndexs != -1)
    {
    for (var k=nsIndexs; k <myIntegers.length; k++)
    {
    myIntegerss[k] = myIntegerss[k+1];
    }
    myk

  2. #2
    CarterBaker is offline Senior Member
    Join Date
    Dec 2009
    Posts
    210
    Rep Power
    3

    Default

    Try to understand following code. In following code you have to first save these 2 values into array and after that get back these values for subtraction.

    nsIndexs =(mysIntegerss.indexsOf(IntegersIns_txt.text));

    After this use following code under subtract button.

    for (var a=nsIndexs; a <mysIntege.length; k++)
    {
    if(mysInteg [a] == InstegersIns_txt.text)
    {
    mysInteg.splice(a, 1);
    return;
    };

    }
    Last edited by nitesh14; 02-06-2010 at 03:20 PM.

Similar Threads

  1. Flash Action Script:-Packages
    By winstore in forum Programming
    Replies: 0
    Last Post: 10-31-2008, 09:42 AM
  2. Flash Action Script - Expand All
    By Vaile in forum Programming
    Replies: 0
    Last Post: 10-27-2008, 07:30 AM
  3. Flash Action Script - Check Syntax
    By interworld in forum Programming
    Replies: 0
    Last Post: 10-26-2008, 02:14 PM
  4. Flash Action Script - Find
    By interworld in forum Programming
    Replies: 0
    Last Post: 10-26-2008, 02:11 PM
  5. Flash Action Script - Add Statement
    By interworld in forum Programming
    Replies: 0
    Last Post: 10-26-2008, 02:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48