Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Increase by 1

    Hello all,
    I'm writing a small time tracking application and i've run into a small
    problem. I have a textbox that displays the number of hours a user has worked
    on a specific project. I'm trying to set it up so when the user clicks on a
    button, the number in the textbox increases by 1.

    Here is the code contained in the button:

    _root.labor_time.txtHours.text = _root.labor_time.txtHours.text+1;

    When i test this out instead of increasing by 1 it's appended to the current
    number. For example, if a 1 is currently in the textbox it is changed to an 11
    then 111 and etc.

    Any ideas?
    Thanks in advance.

    Richard M.

    rmethod1234 Guest

  2. Similar Questions and Discussions

    1. how can I increase the max key length?
      Hi, if I try to install mediawiki, I get following mysql-error, during running config/index.php: "Specified key was too long; max key length is...
    2. increase database connections
      Hi all, Currently, I notice that there are only two database connections between my ColdFusion server and the SQL server. May I ask how can I...
    3. Increase Row Height
      Does anyone know how i can increase the height of the rows in a datagrid?
    4. Increase Director's RAM for authoring
      Hi, Is it possible to increase Director's RAM for authoring as I have to import lot of image sequences(100+ frames) and when I do so it just runs...
    5. How to increase memory?
      Hi, I have Adobe Photoshop Elements version 2, an iMac with OS 9.1, and 320 MB RAM. I would like to increase the memory allocated to Adobe...
  3. #2

    Default Re: Increase by 1

    it sounds like the number displayed in the text box needs to be converted from text to integer or number.

    _root.labor_time.txtHours.text = int(text) + 1;

    jjjake01 Guest

  4. #3

    Default Re: Increase by 1

    _root.labor_time.txtHours.text = Number(_root.labor_time.txtHours.text) + 1

    John

    --
    ----------------------------------------------------------------------------
    -----------
    RESOURCES
    [url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
    ----------------------------------------------------------------------------
    -----------
    TUTORIALS at
    [url]www.laiverd.com[/url]
    Flash & PHP Emailform
    Using textfiles in Flash
    ----------------------------------------------------------------------------
    -----------


    Laiverd.COM Guest

  5. #4

    Default Re: Increase by 1

    That did it.

    Thanks.
    Richard M.

    rmethod1234 Guest

Posting Permissions

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

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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139