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

  1. #1

    Default Join 2 text fields

    Hello all,
    Just a quick question. I have two text fields that each contain a number. I
    want both text fields to be joined to create one number. For example, the
    following code below traces a 150:

    trace(_root.labor_time.txtHours.text+_root.labor_t ime.txtQuarterHours.text);

    Now, i want to add a decimal between them so that it looks like this:
    1.50

    But, i can't figure out the syntax. Any ideas?

    Thanks in advance.
    Richard M.

    rmethod1234 Guest

  2. Similar Questions and Discussions

    1. Text edit functions not working for text entry fields onMAC
      In all the text-entry fields - one cannot cut, copy, paste, nor perform other normal text edit functions on MAC using Firefox. Any idea about the...
    2. Flowing text in separate, adjacent text fields.
      Is there a way to place two separate text fields on adjacent, but unequally-sized lines, so that the text flows from one, to the other? I've got a...
    3. Dynamic text fields. Continuing text over columns
      Hi I'm doing a mock up news paper article over 4 columns in flash mx and the text loads in dynamically. I have 4 dynamic text boxes sitting side...
    4. Moveable Editable Text / Text Fields
      Hi I am trying to add multiple 'post it' style notes to a director(8.5) project i can get the editable text fields to move(on the stage during...
    5. Join two text fields in menu or list
      I have a menu which is dynamically linked to an Access table. How can I get the menu to join two field's contents? For example, a menu on the form...
  3. #2

    Default Re: Join 2 text fields

    var newtextFieldDecimal = Number(_root.labor_time.txtHours.text + "." + _root.labor_time.txtQuarterHours.text);
    newTextField.text = newtextFieldDecimal;


    irraticFlash 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