Problems with inlinegraphics in richeditabletext in flash player 10.1
Hi,
I've remarked a strange behaviour with fp 10.1 and TLF. If I create a TLF Textflow programmatically with an embedded inlinegraphicselement and set the richeditabletext so that i can select text (to copy it via a context menu), the image will disappear as soon as i click into the richeditable text.
Here's A snippet:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
>
<fx:Script>
<![CDATA[
import flashx.textLayout.elements.InlineGraphicElement;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
[Embed(source="bullet.png")]
[Bindable]
public static var bigBulletCls:Class;
private function createTLF():TextFlow{
var tf:TextFlow = new TextFlow();
var s:SpanElement;
var p:ParagraphElement;
var img:InlineGraphicElement;
img = new InlineGraphicElement();img.source = bigBulletCls;
p = new ParagraphElement();
p.paragraphStartIndent = 15;
p.paragraphSpaceBefore = 15;
p.textIndent = -13;
p.addChild(img);
s=new SpanElement();
s.text='test';
p.addChild(s);
tf.addChild(p);
/*img = new InlineGraphicElement();
img.source = "bullet.png";
p = new ParagraphElement();
p.paragraphStartIndent = 15;
p.paragraphSpaceBefore = 15;
p.textIndent = -13;
p.addChild(img);
s=new SpanElement();
s.text='test';
p.addChild(s);
tf.addChild(p);*/return tf;
}
]]>
</fx:Script>
<fx:Metadata>
</fx:Metadata>
<s:VGroup mouseEnabled="true">
<s:RichEditableText id="frontText"
width="580"
lineBreak="toFit" left="0" right="0" top="0" bottom="0"
paddingRight="0"
editable="false" mouseChildren="false" mouseEnabled="true"
focusEnabled="false" textFlow="{createTLF()}"
>
</s:RichEditableText>
</s:VGroup>
</s:Application>
I've investigated a bit more, and have noticed that if only one inlinegraphicelement is included that loads a non-embedded graphics (i.e. assign a path-string to the source attribute), then no images disappear upon entering the richeditabletext... (see the commented part in the above example)
Is that somehow a bug? I would like to have all my graphics included, so that nothing but the swf has to be deployed...
