In the name of Allah the compassionate the most mercifull Who is Allah ?
May peace and Allah mercy and blessings be upon you
May peace and Allah mercy and blessings be upon you
- html:Boolean (get/set)
- get: returns true if FlarabyAS3Flex is configured to deal with html text, or false if dealing with normal text
- set: configures FlarabyAS3Flex to deal with html (true) or normal (false) text
- default value: false
- dir:String (get/set)
- get: returns 'RTL' if FlarabyAS3Flex is configured to return Right-To-Left text, 'LTR' if FlarabyAS3Flex is configured to return Left-To-Right text
- set: configures FlarabyAS3Flex to return Right-To-Left text (RTL) or Left-To-Right (LTR)
- default value: 'RTL'
- extraCharWidth:Number (get/set)
- get: returns current FlarabyAS3Flex extraCharWidth value
- set: sets FlarabyAS3Flex extraCharWidth value. Generaly, values from 0.1 to 1 give suitable results
- default value: FlarabyAS3Flex calculates a default value based on the font size defined in TextFormat.size
- FlarabyAS3Flex()
- FlarabyAS3Flex Constructor
- addPersianSupport():Boolean
- Adds Persian support to FlarabyAS3Flex
- Note that if Urdu support already exists (addUrduSupport() method was previously called), Persian support is automaticaly added, so no need to use this function
- Returns true on success or false otherwise
- removePersianSupport():Boolean
- Removes Persian support from FlarabyAS3Flex
- Note that if Urdu support already exists (addUrduSupport() method was previously called), Persian support cannot be removed
- Returns true on success or false otherwise
- addUrduSupport():Void
- Adds Urdu support to FlarabyAS3Flex
- Automaticaly adds Persian support
- Returns true on success or false otherwise
- removeUrduSupport():Void
- Removes Urdu support from FlarabyAS3Flex
- Automaticaly removes Persian support
- Returns nothing
- removeTashkeel(str:String):String
- Removes any Tashkeel from the str. Can be used just in case str may have Tashkeel.
- str: the string to remove Tashkeel from
- Returns a string with Tashkeel removed, if any
- convertArabicString(inputStr:String, width:Number, tfrmt:TextFormat):String
- The main function in FlarabyAS3Flex, used to render bidirectional RTL or LTR text, including Arabic, Persian, Urdu, English, French, Spanish and Italian
- inputStr: the string to be converted
- width: the width of the internal textField which text would be rendered
- tfrmt: the TextFormat object that gives text its properties, like: Font name, size and alignment. A font must exist in the library with a linkage identifier to be used in TextFormat.font
- Returns inputStr converted to a formatted string properly rendered in the swf file
- convertArabicChar(p:Number, str:String):String
- Converts an ASCII character (Arabic/Persian/Urdu) to a Unicode one (Arabic/Persian/Urdu) depending on its position in str
- p: position of character in str
- str: string/word in which the character exists
- Returns a Unicode Arabic/Persian/Urdu character
- isArabic(char:String):Boolean
- Finds whether the specified character is an Arabic/Persian/Urdu character
- char: the character to be checked
- Returns true or false
- isLatin(char:String):Boolean
- Finds whether the specified character is a Latin (English/French/Spanish/Italian)
- char: the character to be checked
- Returns true or false
- isDigit(char:String):Boolean
- Finds whether the specified character is a Digit
- char: the character to be checked
- Returns true or false
- isPunc(char:String):Boolean
- Finds whether the specified character is a Punctuation. A punctuation is considered a non Arabic, Persian, Urdu, Latin or digit character including space
- char: the character to be checked
- Returns true or false
- isTag(str:String):Boolean
- Finds whether the specified string is a tag. A tag is considered any string with a "<" at the start and a ">" at the end
- str: the string to be checked
- Returns true or false
- removeTags(str:String):String
- Extracts the string part of a tagged string.
Example:
removeTags("<a href='path/to/link'>Some Link</a>")
returns:
"Some Link" - str: the tagged string
- Returns the extracted string, or the same string if the string is not tagged
- Extracts the string part of a tagged string.
- getStringWidth(str:String):Number
- Computes the width of the string str
- Must be called after a call to convertArabicString() method
- str: the string to return its width
- Returns a number representing the width of str
- getCharArrWidth(arr:Array):Number
- Computes the width of an array of strings/characters
- Must be called after a call to convertArabicString() method
- str: the array of strings/characters to return their width
- Returns a number representing the width of the array of strings/characters
- replaceNewlines(str:String):String
- Replaces newline characters in str
- If html=true; or multiline=false; all newline characters (\r\n, \r, \n) will be converted to " "
- If multiline=true; and html=false; newline characters \r\n, \r will be converted to "\n"
- str: the string to be replaced
- Returns a string with newlines replaced
- getLines():Array
- Must be called after a call to convertArabicString() method
- Returns an array of lines representing the converted string lines
- direction (com.arabicode.text.Flaraby.DirEvent)
- Fires when dir property changes
- in mxml: direction
- in actionscript: DirEvent.DIRCHANGE
- extrawidth (com.arabicode.text.Flaraby.ExtraWidthEvent)
- Fires when extraCharWidth property changes
- in mxml: extrawidth
- in actionscript: ExtraWidthEvent.EXTRAWIDTHCHANGE
- convert (com.arabicode.text.Flaraby.ConvertEvent)
- Fires when text conversion process is finished
- in mxml: convert
- in actionscript: ConvertEvent.CONVERT
- persianadd (com.arabicode.text.Flaraby.PersianAddEvent)
- Fires when adding support for Persian
- in mxml: persianadd
- in actionscript: PersianAddEvent.PERSIANADD
- persianremove (com.arabicode.text.Flaraby.PersianRemEvent)
- Fires when removing support for Persian
- in mxml: persianremove
- in actionscript: PersianRemEvent.PERSIANREM
- urduadd (com.arabicode.text.Flaraby.UrduAddEvent)
- Fires when adding support for Urdu
- in mxml: urduadd
- in actionscript: UrduAddEvent.URDUADD
- urduremove (com.arabicode.text.Flaraby.UrduRemEvent)
- Fires when removing support for Urdu
- in mxml: urduremove
- in actionscript: UrduRemEvent.URDUREM



















Add new comment