Detecting RTL and LTR TLF text
Hi All,
I have set RTL in the preferences panel.
I need to test RTL and LTR 'direction' setting. It reports Null if it has not been explicitly set because it inherits the LTR. I am trying to set LTR explicitly when I initialize the text and put it on the stage or at minimum, test for null and force it.
import flash.text.*;
import flash.text.TextFormat;
if (txtField.direction == null) {
trace("It traces Null");// It traces Null
txtField.direction = LTR;
}
RangeError: Property direction value LTR is out of range
at flashx.textLayout.property::Property$/defaultErrorHandler()
at flashx.textLayout.property::EnumStringProperty/setHelper()
at flashx.textLayout.formats::TextLayoutFormatValueHolder/setCoreStyle()
at flashx.textLayout.formats::TextLayoutFormatValueHolder/set direction()
at flashx.textLayout.elements::FlowElement/set direction()
at fl.text::TLFTextField/set direction()
at Code::Page1/textOverFlow()
at Code::Page1/_Topic()
at Code::Page1()
I have tried to add this:
import flashx.textLayout.formats;
Then it reports:
Page1.as, Line 16 1172: Definition flashx.textLayout:formats could not be found.
