Carriage return in TextArea Flash component in Director 11

Hello.
I have a very big problem now
Neither embedded Flash movies with textareas or standard flashcomponent TextArea from Director tool pallete do not react on keyboard button "Enter" pressings. There is no carriage return after ENTER button is pressed. The same with End and Home buttons!!
Please help with any advise.
Is that a common bug?
See attached test.dir file. Try to type something in both textareas and then press ENTER button on keyboard. You should realize then what I'm crying about(((
Alexey

I too struggled with this issue. If you're looking for a solution still I have written one. Used the attached script in your Flash document, I spent a few days going back and forth between Director and Flash to figure this one out. Basically what I do is attach a key listener to the movieclip containing the textfield object that on keyDown gets the currently focused textField (this way it will work with multiple textField objects). After that it determines if the enter key is hit and if it is inserts a "/n" break at the selection starting point. The only issue is if you select a whole word in the textField and hit enter a break will be placed at the beginning of the highlighted word and that word will not be deleted. Hopefully this helps.
-b
// BY / contempt.productions inc.  10.30.09
// Director 11.5 fix for bug where dynamic textfields don't register ENTER or RETURN key in Flash sprites
// Solution involves inserting a \n carriage return wherever cursor insertion point starts.
// In Flash this adds 2 carriage returns for every hit of the enter/return key
// In Director 11.5 it adds 1 carriage return
// Change "body_txt" to represent the dynamic textField object this script is referencing
myListener = new Object();
myListener.onKeyDown = function() {
_global.textFocus = Selection.getFocus();
// get a string of the path to the currently focused textField object
_global.selStart = Selection.getBeginIndex();
// get the insertion point, this is the start of any selection
var multiText = body_txt.text;
// get the text from the current textField object
var theKey = Key.getCode();
// get the current keyCode (13 is the keyCode for "enter/return" key)
if (eval(textFocus) == eval(body_txt)) {
// determine if focused textField and current textField are the same
if (theKey == 13) {
// enter key is pressed
var firstPart = multiText.slice(0, selStart);
// get the current textField's text from the beginning to the insertion point
var secondPart = multiText.slice(selStart, multiText.length);
// get the textField's text from the insertion point to the string's end
body_txt.text = firstPart+"\n"+secondPart;
// concatenate the first and second part of the textField's text with a carriage return
Selection.setSelection(selStart+1,selStart+1);
// place the text insertion point properly
myListener.onKeyUp = function() {
var theKey = Key.getCode();
Key.addListener(myListener);

Similar Messages

  • Carriage Returns in Textarea field in APEX Mail

    Greetings all,
    I have a form that the users fill out and when they click submit it uses APEX Mail to send the contents to individuals in an HTML format. One of the fields is a text area where the individual will enter information like the sample below:
    First to Arrive:  Bob
    Second to Arrive: Jane
    Third to Arrive: Sandy
    Last to Arrive: FredWhen the email is received, instead of being on one line, each entry follows the next like:
    First to Arrive: Bob Second to Arrive: Jane Third to Arrive: Sandy Last to Arrive: Fred
    I posted about getting the form fields to show the carriage returns and that works fine. Now trying to figure out what to add to make sure that line breaks are handles as html breaks br tags. Any assistance and examples would be appreciated.
    Thanks
    Wally
    Edited by: wfsteadman on Feb 17, 2011 4:49 PM

    3.  Re: Carriage Returns in Textarea field in APEX Mail
           617301
    this code looks like it should work but doesnt,
    REPLACE(REPLACE(REPLACE(:TEXT_FIELD_ITEM,CHR(10)||CHR(13),'<br/>'),CHR(10),'<br/>'),CHR(13),'<br/>')
    ....thanks.

  • Losing carriage returns in textarea / using plpdf to generate report

    Hello,
    I'm using Apex 3.1.1 and Oracle 10g database. I would appreciate any suggestions on how I can preserve carriage returns in a textarea when sending the text to a package that generates a report. Please see example of current problem (below code). I'm using an onkeypress function to check for keycode = 13 when the Enter key is pressed -- that is working. I also created an alert to show the url value -- I can see the text on multiple lines, so that appears to be working as well. The textarea value parameter in the package is defined as varchar2. Per the support folks at plpdf.com, chr(13) indicates an explicit line break, and they told me to check my text. I don't know what I'm missing. Thank you for any suggestions you may have.
    Lisa
      function callPLPDFRep()
          var url;
          url = '#OWNER#.' + $x('P&APP_PAGE_ID._REPORT_PROCEDURE').value + '?' + build_params();
          w = open(url, "winPDFRep", "Scrollbars=1, resizable=1, width=800, height=600");
          if (w.opener == null)
            w.opener = self;
            w.focus();
       function build_params()
        var lparms;
        lparms = '';
        lparms = lparms + '&p_incorrect=' + $x('P212_INCORRECT').value;
        lparms = lparms + '&p_correct=' + $x('P212_CORRECT').value;
        return lparms;
      }Text in textarea:
    035 5768 06/15/2010
    035 5768 06/16/2010
    035 5768 06/17/2010
    Printout on report:
    035 5768 06/15/2010035 5768 06/16/2010035 5768 06/17/2010

    Hello Michael,
    Thank you for your response. After doing some researching and experimenting, here's what I have found so far.
    First, using an onkeypress function to alert the keycode, a chr(13) is being returned when I press the Enter key in the textarea.
      function check_Enter(e)
        var keynum;
        var textval = $x('P212_INCORRECT').value;
        if(document.all) 
          keynum = e.keyCode
        else
          keynum = e.which
        alert(keynum);     
      }Next, when I access the value of the textarea via javascript with $x('P212_INCORRECT').value, the chr(13) is automatically converted to the newline character (\n). In an attempt to replace the \n with a \r so plpdf will recognize the carriage return, I added a javascript replace function before sending the text to the package, and it does not work.
      function build_params()
        var lparms;
        lparms = '';
        lparms = lparms + '&p_incorrect=' + $x('P212_INCORRECT').value;
        lparms = lparms + '&p_correct=' + $x('P212_CORRECT').value;
        alert(lparms.split(/\n/g).length - 1);  // confirm that a newline character is found
        lparms = lparms.replace( new RegExp( "\n", "g" ), "\r");  // replace newline character with carriage return
        return lparms;
      }When I tried to replace the newline character (\n) with chr(13), the chr(13) is printed out like it is text instead of a special character. In order to test that I have the correct syntax for the replace function in javascript, I tried replacing \n with '...', and then in the package that generates the PDF, I replaced the '...' with chr(13). That works!
    In response to your comment about the PLPDF procedure for multi line section, I am using: plpdf.PrintMultiLineCell(180, 6, l_incorrect, '0', 0). As a newbie to javascript, I am not sure why replacing \n with \r is not working. Can you advise how to use a chr(13) in the javascript replace function and have it recognized as a special character and not text? I don't know how to view special characters in the textarea other than checking for them with javascript.
    Thanks, Lisa

  • Carriage return in textArea

    Hi, I have a problem about the textArea. When I compile a textarea the carriage return is casual because it doesn't work as an editor text program. So the words that I write are "break off" casually.How can I implement a textArea that simulate an editor text program about carriage return? Is exist an option in the properties of the textarea in NetBeans 4.0 that implement it?
    Thanks!

    An example:
    if I write in runtime in the textArea this words:
    "Yesterday I played in the garden with my dog and then I studied Java in my bedroom"
    and the dimension's textArea is more small than the dimension of the sentence writed above, I have the next view in the textarea:
    "Yesterday I played in the garden with my dog and then I s
    tudied Java in my bedroom"
    Instead I want that the word "studied" doesn't break off as in the next example
    "Yesterday I played in the garden with my dog and then I
    studied Java in my bedroom"

  • Carriage return in textarea - how do I check for and remove it???

    I have an html form that has a <textarea> element for user input. I work mainly with Java and some JavaScript. Since carriage returns are permitted in a <textarea> element, upon retrieving the value submitted, my Java and/or JavaScript variables contain carriage returns as well, making the values incomplete.
    For Example :
    String dataSubmitted = request.getParameter("formInput");
    <script language="JavaScript">
    var textValue = "<%=dataSubmitted%>";
    ....//do other stuff
    </script>When I view the source of my JSP page, the above statement of code looks like this:
    var textValue = "This is some text that
    I submitted with a carriage return";I'm putting the text submitted through this form into a mysql database, and when I pull up the values I find that it has recorded the carriage return as well. There is an actual symbol representing a carriage return in the db field.
    What I'd like to do is use some Java code to go through each character of the String and find and remove the carriage return, perhaps replacing it with an empty space instead. But how do I check for a carriage return in a String variable?
    Also, is there a way to use JavaScript to alert the user when the carriage return button is pressed when they're in the <textarea>?
    Any input is appreciated,
    Thank You,
    -Love2Java

    What I'd like to do is use some Java code to go through
    each character of the String and find and remove the
    carriage return, perhaps replacing it with an empty
    space instead. But how do I check for a carriage return
    in a String variable?The carriage return is represented by the \r. Generally there is also a newline, the \n. You can use String#replaceAll() to replace occurences of them by a space.
    string = string.replaceAll("\r\n", " ");
    Also, is there a way to use JavaScript to alert the user
    when the carriage return button is pressed when they're
    in the <textarea>?You can capture keys using the 'onkeypress' attribute. The keyCode of a the return key is 13. So simply catch that:<textarea onkeypress="if (event.keyCode == 13) alert('You pressed the return button.'); return false;"></textarea>The return false prohibits the linebreak being inserted. If you remove that, then it will be inserted anyway.

  • Coding the "List" Flash Component

    Hello,
    I’m designing a simple list creation\editing
    application I was wondering where I can get information on coding
    the “List” Flash Component in Director MX 2004.
    I’ve got as far as finding out how change what is on the list
    using “.data” and “.labels”, but I want to
    be able to tell what the user selects from the list.
    Thanks for your time

    You can use an on change function in a behavior attached to
    the flash
    sprite.
    property thisSprite
    on beginSprite me
    thisSprite = me.spriteNum
    sprite(thisSprite).labels = ["one","two","three"]
    on change me
    put sprite(thisSprite).selectedItem.label
    end
    -- "one"
    Rob
    Rob Dillon
    Adobe Community Expert
    http://www.ddg-designs.com
    412-243-9119
    http://www.macromedia.com/software/trial/

  • On Windows 8.1 and Firefox 36.0.1 the textarea in forms has no carriage returns. Earlier versions the forms work. Is there a fix for this?

    Prior to this version of Firefox 36.0.1, the <textarea> in my HTML forms was working; displaying carriage returns. In version 36.0.1 they no longer function properly. Instead when I enter a carriage return, it displays a space instead of a newline. I went to the most basic textarea testing
    &lt;textarea&gt; name="comments" cols=20 rows=10 &lt;/textarea&gt;
    to make sure I wasn't introducing anything with other languages.
    I am using Windows 8.1 Pro. I rolled back to Firefox 35.0 and everything works fine. I install 36.0.1 and it stops working.
    I have access to another Laptop also running the same version of windows and Firefox and it appears to be doing strange things as well. I am suspicious in that I started noticing this immediately after a windows upgrade last night. The laptop also experienced the issues it is having immediately after a windows update yesterday evening.
    I have yet another PC running a different version of windows and Firefox and it too works fine. It looks like the issue is where there is windows 8.1 Pro and Firefox 36.0.1.
    Do you guys have any idea what is going on here?
    Thanks
    JMRAUPE57

    The current release supports the white-space property for a text area and it is possible that the website uses white-space: pre instead of white-space: pre-wrap.
    The former will prevent Firefox from wrapping the text.
    You can check that in the Inspector via the right-click context menu.
    *https://developer.mozilla.org/Tools/Page_Inspector
    See:
    *https://developer.mozilla.org/en-US/Firefox/Releases/36#CSS
    <blockquote>The white-space property is now working on <textarea> HTML elements (bug 82711).</blockquote>
    See also:
    *[[/questions/1050456]] Word wrap problems in 36.0

  • Reports not retaining carriage returns from htmldb_item.textarea

    I’m created a tabular form for multi row updates using htmldb_item.textarea for one of the fields. When I update the tabular form it keeps any carriage returns in this field, which is good. I then created a “PL/SQL function body returning a SQL Query” report for printing purposes. The problem is that the field populated by the htmldb_item.textarea does not retain any of the carriage returns in the report.
    I enter the following in the textarea on the tabular form:
    Line 1
    Line 2
    Line 3
    The report I created then displays the data as:
    Line 1 Line 2 Line 3
    I need the report to display the data the same as it appears on the tabular form.
    I tried this in my report from reading other similar situations on this forums, but didn’t work.
    replace("TEXTAREA",''||chr(13)||'',''||
    ||'') as title
    Anyone know of a solution?

    How about this?
    Go the page where you can edit the report column attribute - here is the bread crumb to help you figure out what I am talking about
    Home>Application Builder>Application 99999>Page Definition>Report Attributes>Column Attributes
    The second box in this page is Column formatting, you will find 4 text boxes (Number / Date Format, CSS Class, CSS Style, Highlight words) and a text area (HTML Expression). In the text area replace #COLUMN_ALIAS# with <PRE>#COLUMN_ALIAS</PRE>. You will get your newlines without tweaking the query or removing Strip HTML. Strip HTML is a security feature that I would not disable. On the down side you will loose some of the ability to format like fonts etc (:-(,
    Here is why you loose the newlines in the report. When browsers render html they have the liberty to reformat it. When reformating they can play around with whitespaces including new lines. To force a new line you have to use the BR tag or you can say the text is preformated using the PRE tags.

  • Textarea formatting for carriage returns

    Hi all,
    I've created a websheet that includes a textarea column and have found that while any text entered in edit mode displays a carriage return, as soon as the data has been entered and the field returns to read-only mode the carriage returns are not retained . . . all of the content is displayed in one continuous string. Is there a way to accomplish this?
    Note: Using APEX v4
    Thanks.
    Edited by: arrowjf on Jan 6, 2012 1:18 PM

    * The TextArea control uses UNIX-style line endings, which
    means that text data containing Windows-style carriage-return
    line-feed (that is, \r\n) formatting for new lines contain extra
    line breaks. You can use String.replace() with a regular expression
    to convert the text to UNIX-style line endings, as the following
    example shows:
    private static const windowsCRLF:RegExp = /\r\n/gm;
    myTextString = myTextString.replace(windowsCRLF, "\n");
    http://www.adobe.com/support/documentation/en/flex/2/releasenotes_flex2_sdk.html

  • Read Only TextAreas with Carriage Return, Line Breaks and Word Wrapping

    Hi all,
    I know there are a few posts around this subject but I cannot find the answer to the exact problem I have.
    I have a page that has a 'TextArea with Character Counter' (4000 Chars) that is conditionally read only based on the users credentials (using the 'Read Only' attributes of the TextArea item).
    When the field is editable (not Read Only) everything works fine but when I make the field Read Only I start to have problems:
    The first problem is that the Carriage Return and Line Breaks are ignored and the text becomes one continuos block. I have managed to fix this by adding pre and post element text of pre and /pre tags. This has made the Carriage Return and Line Breaks word nicely and dispaly correctly.
    However, it has introduced a second problem. Long lines, with no Carriage Returns or Line Breaks, now extend to the far right of the page with no word wrapping, making my page potentially 4000+ characters wide.
    How can I get the field to be display only, with recognised Carriage Returns and Line Breaks, and Word Wrapping inside a fixed width of, say, 150 characters?
    Many thanks,
    Martin

    Hi,
    Just a cut and paste of yours with the field name changed:
    htp.p('<script>');
    htp.p('$x("P3_COMMENTS").readonly=true;');
    htp.p('</script>');I also have the following in the page HTML Header, could they be conflicting?
    <script type="text/javascript" language="JavaScript">
    function setReleaseToProd(wpTypeCode){
       //setReleaseToProd($v(this))
      var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=set_release_to_prod',0);
      get.addParam('x01',wpTypeCode);
      gReturn = get.get();
      if(gReturn) {
         $s('P3_RELEASE_TO_PROD',gReturn);
      get = null;
    </script>I am a long way from knowing much about Javascript (this page code was written by someone else) so all help is much appreciated.
    Martin

  • HTML Textarea removing Carriage Returns

    Hi,
    Hoping someone can assist, I am retrieving some data from a table that currently consists of carriage returns but when I try and retrieve this information via Ajax and pass it back into the HTML page textarea field within ApEx, the value returned is one continuous string.
    All my carriage returns are removed.
    Can someone please assist, possibly using a javascript solution or some other type as to how I can preserve the carriage returns.
    Thanks.
    Tony.

    Hi Tony,
    I suspect the problem is simply due to the way HTML handles line breaks, which is to say, it generally ignores them. For example, this html:
    <p>To be or not to be, that is the question;
    Whether 'tis nobler in the mind to suffer
    The slings and arrows of outrageous fortune,
    Or to take arms against a sea of troubles,
    And by opposing, end them. To die, to sleep;
    No more; </p>would be displayed in a browser as:
    To be or not to be, that is the question; Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take arms against a sea of troubles, And by opposing, end them. To die, to sleep; No more;
    One way to get around this is to wrap the string in {font:Courier}&lt;pre&gt;&lt;/pre&gt;{font} tags; another would be to replace the carriage returns with {font:Courier}&lt;br&gt;{font}
    Hope this helps.
    tx, --Jen                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • textarea text lost in ITS when using carriage return

    If the user hits carriage return in a <textarea>, i.e. to create a new line of text, everything after the carriage return is ignored by R/3 when retrieving the text.
    Is there a way to avoid this loss of text.
    Thanks
    Karen

    Try with this.
    On the html:
    <textarea name="ztdline1[]" cols="100" rows="3">`if (ztdline1.dim > 0)` `repeat with r from 1 to 3; if ( ztdline1[r] != "*" ) ;write (strSub (ztdline1[r], 3, 132), "\r\n"); end; end` `end`</textarea>
    On the PBO dynpro:
      loop at ztdline1 cursor top_line.
      endloop.
    On the PAI dynpro:
      module get_text1.
      loop.
      endloop.
    where module get_text1 is:
      clear ztdline1.
      refresh ztdline1.
      do.
        field-get 'ZTDLINE1' sy-index message_line datalen.
        if sy-subrc <> 0.
          exit.
        endif.
        read table message_line index 1.
        if sy-subrc eq 0.
          ztdline1-tdline = message_line.
          append ztdline1.
        else.
          clear ztdline1-tdline.
          append ztdline1.
        endif.
      enddo.

  • Removing Carriage Returns within a Textarea

    Hi,
    Just wondering if someone could please let me know how to remove carriage returns from a Textarea after submitting the page?
    Within my PL/SQL process, I have used both REPLACE and TRANSLATE on both CHR(10) and CHR(13) but unfortunately it stills comes out the other end as follows:
    Description :this
    is
    a
    testWould like it all on one line minus the carriage returns.
    Thanks.
    Tony.

    The code I showed works for me. Computations and processes work similarly except that in a process you have to save the value in session state whereas in a computation that's done for you. Show your code or put an example on apex.oracle.com if you can't get it to work and I'll check it.
    Scott

  • Escaping carriage return characters in textarea

    Hi all,
    I have a HTML form containing a textarea field which users might us the carriage return.
    This form is then submitted to a processing servlet which saves the data to the database.
    Subsequently, I have another page which will retrieve the data using JDBC and and display these in HTML.
    Here's the problem:
    How do I replace the carriage return characters (seems from the database that there are 2 of them) with <br>?
    I've tried using the String.replaceAll("\r\n", "<br>"), but it didn't work :-(
    Thanks!

    Becuase you enter your patterns as expressions where some characters are used as control characters, and then have to esacpe some of the control characters in the expressions when you enter them as java strings.
    So the expression is actually \r\n if you let a user enter it into a textfield, but you have to escape the \ if you write it as a String in the source code (since \ is an escape characters in strings)
    /Kaj

  • Textarea has double carriage returns

    I have some xml that looks similar to this
    <events>
    <event>
    <title> Event Title</title>
    <description>This is the event description
    When I have line breaks, like this
    the text area will show 2, everywhere
    that I only have one.
    </description>
    </event>
    </events>
    I have even tried removing the tabs, so that the only extra
    characters are CR LF , but I always see extra carriage returns in
    my textarea.
    Ayone know what is causing this ?

    * The TextArea control uses UNIX-style line endings, which
    means that text data containing Windows-style carriage-return
    line-feed (that is, \r\n) formatting for new lines contain extra
    line breaks. You can use String.replace() with a regular expression
    to convert the text to UNIX-style line endings, as the following
    example shows:
    private static const windowsCRLF:RegExp = /\r\n/gm;
    myTextString = myTextString.replace(windowsCRLF, "\n");
    http://www.adobe.com/support/documentation/en/flex/2/releasenotes_flex2_sdk.html

Maybe you are looking for

  • SSRS 2008R2 : Not able to use Previous aggregrate function in matrix columns cell

    Hi Expert, I have used a matrix tablix in my report. It is working fine. But when I am trying to use Previous aggregrate in one matrix column cell I get the below error: The use of previous aggregrate function ia a tablix cell with in 'Tablix1' is no

  • Seeburger adapter XML-EDI info

    I would like know about Seeburger EDI adapter( XML-EDI) how it works, If any body have Seeburger adapter documentation pls. send some to [email protected] Thanks in advance.

  • Bill iPad 2 To My Account?

    I don't know where to post this question so I'll try here. I switched from Sprint last month to get the iPhone 4 with Verizon and now that the iPad 2 is coming out I'm thinking of getting the 3G enabled version as well.  With Sprint I could order dev

  • Able to play live video by rtmp but not by http

    Hi Experts ,                    I need some help in proceeding further on my HDS live streaming setup . i have adobe flash media server 4.5 and adobe flash media live encoder 3.2 . followed all the steps provided in the following link http://help.ado

  • 1.3.1 + OSX Leopard + Epson 2200 = Magenta pictures

    Has anyone managed to get this combination to print without a magenta cast? Photoshop CS3 prints just fine, but Lightroom using the exact same settings prints magenta. Note that I am meticulous in checking the printer settings to make sure that color