Welcome, Guest
  • Author Topic: chatInput component selection problem  (Read 3062 times)

    smart.net

    • Server what's that
    • *
    • Posts: 40
      • View Profile
    chatInput component selection problem
    « on: 02/01/07, 06:13 »
    Hello,
    in my chat application, after adding the smiley feature.. i was perfectly able to use smiley from mouse.

    now, i tried to add the focus back to the textInput , i faced problem

    the below code is of smiley button :
                     _root.smiley._visible = false;  // ( BIG LIST OF SMILEY will be closed ,as user has clicked on a particular smiley)
       _root.chatInput.text += " (:-& "; // ( now adding the smiley code to the textInput component, named chatInput
       _level0.chatInput.setFocus(); // ( now setting the focus on textInput again). Here is the problem

    above lines works perfectly, but the whole smiley codes gets selected automatically in chatInput field.. i do not want it to be selected automatically, why its happening.
    Please help

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: chatInput component selection problem
    « Reply #1 on: 02/01/07, 14:09 »
    Probably the smiley code is interfering at some point. Try to use Selection.setSelection to modify it

    Jorge

    Andresss

    • Systems Administrator
    • *****
    • Posts: 738
    • check me out at www.asb-labs.com/blog
      • View Profile
      • asb-labs
      • Email
    Re: chatInput component selection problem
    « Reply #2 on: 02/01/07, 17:38 »
    hello smartindore!!! try using the code of Jorge and set the "I" of the text to the last character so that i won't interfer in your text,
    greetings!!!
    andres
    halemos de flash en espaņol!....wondering about crazy flash experiments?