CLEAR INPUT TEXT problem

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

  1. #1

    Default CLEAR INPUT TEXT problem

    hi, first i'll excuse for my english

    the problem is that i want to create a form when the user click on a inputtext
    is clear its content and let the user write the information

    i got one symbol a Movie Clip that has a input text inside

    i wrote this code:

    this is for the movie clip "mc_nombre"

    onClipEvent (load) {
    this.etiqueta.variable = "nombre";
    nombre = "nombre";
    }
    onClipEvent (mouseDown) {
    tellTarget (this) {
    nombre = "";
    }
    }

    and this one for "mc_apellido" that is a copy on the same symbol:

    onClipEvent (load) {
    this.etiqueta.variable = "apellido";
    apellido = "apellido";
    }
    onClipEvent (mouseMove) {
    tellTarget (this) {
    apellido = "";
    }
    }

    the problem here is that when i click in one of them, both clear its texts, i
    mean, that both input gets the instruccion to clear the variables to ""

    thanks for the help, and i hope that you can understand this

    if you know another way to do this please tell me

    nardove Guest

  2. Similar Questions and Discussions

    1. Polish characters in text input (linux problem only)
      I've got some problems with TextInput. When i want to type polish characters (RIGHT ALT + combination: A,C,E,L,N,O,S,Z and X) - I've got no results....
    2. Compare input text with imported XML data problem
      I am making a simple quiz with the Q and As held in an external XML file. I load the data and check it no problem and put the answer to the randomly...
    3. Clear an input field when user clicks in it
      Im trying to clear a value of a cfinput when the user clicks in it. i used to do this on html. <input name="" onClick="(this.value=' ')"> can...
    4. problem with reset/clear in <input type="file" >
      how to clear values in input file object. In My Form i need to upload a file and enter some values in other text fields. i have "Submit" and...
    5. text is not clear
      Hello Annvee, It depends on how large the font might be, more often, small fonts will appear blurry on your screen. Here are some links to help...
  3. #2

    Default Re: CLEAR INPUT TEXT problem

    add a hitTest to the clip action,

    onClipEvent (mouseDown) {
    if(this.hitTest(_root._xmouse,_root._ymouse,true)) {
    //tellTarget (this) {// no need for this line- plus tellTarget is deprecated
    code
    nombre = "";
    //}
    }
    }


    Jack. Guest

  4. #3

    Default Re: CLEAR INPUT TEXT problem

    Have you tried using the onSetFocus event? Maybe this will help.

    myInputTextBox.onSetFocus = function() {clearTag(_root.myInputTextBox);

    Regards,

    Chuck


    charleuts Guest

  5. #4

    Default Re: CLEAR INPUT TEXT problem

    your functions (defined before in script) might look something like this:

    function clearTag(o) {
    if (o.text.charAt(0)=="<" and o.text.charAt(o.text.length-1)==">") {
    o.setTextFormat(enteredFormat);
    o.text="";
    }
    }

    function addTag(o,s) {
    if (o.text=="") {
    o.setTextFormat(emptyFormat);
    o.text=s;
    }

    }

    charleuts Guest

  6. #5

    Default Re: CLEAR INPUT TEXT problem

    [url]http://home.hccnet.nl/john.mulder/flash/clear_on_focus.zip[/url]

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

  7. #6

    Default Re: CLEAR INPUT TEXT problem

    thanks a lot i'll try and let you all know
    nardove 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