3 Replies Latest reply on Feb 4, 2011 11:11 AM by FTQuest

    RichEditableText with embedded images does not handle mouse events reliably

    ozDiGennaro Level 1

      I'm using Flash Builder "Burrito".  downloaded a couple of weeks ago.  Flash Player debug version.

      I have the following MXML object:



      width="100%" height="100%"







      <s:Group id="myGroup" width="100%" height="100%">

      <s:RichEditableText id="myRichText" >


      <!--- Do not set the height of the RichEditableText - since it seems to prevent the appearance of the vertical scroll bars -->



      With the following Actionscript to initialize, etc.

                  textContainer = new SxBorderContainer(name);
                  textContainer.dx = dxAvailable;
                  textContainer.dy = dyAvailable;


      scroller = new SxScroller();


      scroller.dx = dxAvailable

      scroller.dy = dyAvailable;



      var richText:RichEditableText;


      richText = scroller.richText;

      richText.toolTip = toolTip;

      richText.enabled = true; // required for mouse click capture

      richText.selectable = true; // required for mouse click capture

      richText.width = dxAvailable



           var textFlow:TextFlow = TextFlowUtil.importFromString(textFlowString, WhiteSpaceCollapse.PRESERVE);


            richText.textFlow = textFlow;

      And the following code to catch events:


      Here's the problem.   If I have embedded images in the TextFlow that is imported into the richText, I only catch "some" mouse clicks.  It's hard to know, but it seems that only mouse clicks into white space (between paragraphs) are caught.  Mouse up and down are caught, but not "click".  Very puzzling.


      TextFlow like this:


            <div color="#442222" fontFamily="Times New Roman" fontSize="20" paragraphSpaceAfter="15" textIndent="15">
                  Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do:  once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, `and what is the use of a book,' thought Alice `without pictures or conversation?'
                    <span>So she was considering in her own mind</span>
                    <img source="assets/library/alice/images/White Rabbit.png" height="auto" width="auto" float="left" />
                     <span> (as well as she could, for the hot day made her feel very sleepy and stupid), whether the pleasure of making a daisy-chain would be worth the trouble of getting up and picking the daisies, when suddenly a White Rabbit with pink eyes ran close by her.</span>



      If there are no embedded imags, I get all clicks exactly.

      Is it a bug?  Am I missing something?