Fixed getText() to be more technically correct.
diff --git a/textLayout/src/flashx/textLayout/elements/InlineGraphicElement.as b/textLayout/src/flashx/textLayout/elements/InlineGraphicElement.as
index 5454867..3df5646 100644
--- a/textLayout/src/flashx/textLayout/elements/InlineGraphicElement.as
+++ b/textLayout/src/flashx/textLayout/elements/InlineGraphicElement.as
@@ -383,7 +383,12 @@
*/
public override function getText(relativeStart:int=0, relativeEnd:int=-1, paragraphSeparator:String="\n"):String
{
- return String.fromCharCode(0xFDEF);
+ if(relativeEnd == -1)
+ relativeEnd = textLength;
+
+ // We could probably just return _text (U+FDEF), but this allows clients to change _text to some other value
+ // and getText() will still work. (Of course, I cannot think of a reason you'd want to do that...)
+ return _text ? _text.substring(relativeStart, relativeEnd) : "";
}
private function changeGraphicStatus(stat:Object):void