Not showing InlineGraphic until I "realign text"
private function handler_insertInlineGraphic( event:RichTextEditorEvent ):void
{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener( Event.COMPLETE, handler_inlineGraphicLoaderComplete );
loader.load( new URLRequest( event.value as String ) );
}
private function handler_inlineGraphicLoaderComplete( event:Event ):void
{
var bmd:BitmapData = Bitmap( event.target.content ).bitmapData;
var bm:Bitmap = new Bitmap( bmd );
EditManager( _textFlow.interactionManager).insertInlineGraphic( bm, bm.width, bm.height );
_textFlow.interactionManager.setSelection( 0, 0 );
_textFlow.flowComposer.updateAllContainers();
//_textFlow.interactionManager.setFocus();
}
This methos places the image and the space inside the TextFlow, but the space is blank until I do some kind of modification to the text, turn it bold, anything, then I can see the image.
any idea?
