1 Reply Latest reply on Mar 18, 2011 12:15 PM by Carol L. Frampton

    Using FTE on the halo theme to display Arabic content in <mx:Label> and <mx:Text> components

    gbeakal


      Target: Use FTE on the halo theme to display Arabic content in <mx:Label> and <mx:Text> components with Arial font, Note that the <mx:Text> is selectable and the font Arial is embed with embedACFF=false

       

      To hit my target, i have tried the following secnarios:
          1.Checked the "Use Flash Text Engine for MX Controls" option in the Flash Builder 4 compiler setting window.

       

          2.Placed this argument -theme+=${flexlib}/themes/MXFTEText.css in additional compiler argument field

       

          3. And to make sure i placed the code in my css file
              @namespace mx "library://ns.adobe.com/flex/mx";
              mx|Label
              {   
                  textFieldClass: ClassReference("mx.core.UIFTETextField");
              }

       

      All of the the three techniques compile perfectly. The problem is when i run the application it gets stuck for 15sec or shows the following error up on run time:

       

      //-------------------------------ERROR MESSAGE-------------------------------

       

      ArgumentError: Error #2004: One of the parameters is invalid.
          at Error$/throwError()
          at flash.text.engine::TextBlock/recreateTextLine()
          at Function/http://adobe.com/AS3/2006/builtin::apply()
          at _main_mx_managers_SystemManager/callInContext()
          at flashx.textLayout.container::TextContainerManager/recreateTextLine()[C:\Vellum\branches\v 1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManage r.as:933]
          at flashx.textLayout.container::TextContainerManager/callInContext()[C:\Vellum\branches\v1\1 .1\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager.a s:866]
          at flashx.textLayout.compose::SimpleCompose/createTextLine()[C:\Vellum\branches\v1\1.1\dev\o utput\openSource\textLayout\src\flashx\textLayout\compose\SimpleCompose.as:234]
          at flashx.textLayout.compose::SimpleCompose/composeNextLine()[C:\Vellum\branches\v1\1.1\dev\ output\openSource\textLayout\src\flashx\textLayout\compose\SimpleCompose.as:186]
          at flashx.textLayout.compose::BaseCompose/composeParagraphElementIntoLines()[C:\Vellum\branc hes\v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\compose

       

      \BaseCompose.as:395]
          at flashx.textLayout.compose::SimpleCompose/composeParagraphElement()[C:\Vellum\branches\v1\ 1.1\dev\output\openSource\textLayout\src\flashx\textLayout\compose\SimpleCompose.as:165]
          at flashx.textLayout.compose::BaseCompose/composeBlockElement()[C:\Vellum\branches\v1\1.1\de v\output\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:219]
          at flashx.textLayout.compose::BaseCompose/composeInternal()[C:\Vellum\branches\v1\1.1\dev\ou tput\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:372]
          at flashx.textLayout.compose::BaseCompose/composeTextFlow()[C:\Vellum\branches\v1\1.1\dev\ou tput\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:339]
          at flashx.textLayout.compose::SimpleCompose/composeTextFlow()[C:\Vellum\branches\v1\1.1\dev\ output\openSource\textLayout\src\flashx\textLayout\compose\SimpleCompose.as:113]
          at FactoryDisplayComposer/http://ns.adobe.com/textLayout/internal/2008::callTheComposer()[C:\Vellum\branches\v1\1.1\ dev\output\openSource\textLayout\src\flashx\textLayout\factory

       

      \TextLineFactoryBase.as:422]
          at flashx.textLayout.compose::StandardFlowComposer/internalCompose()[C:\Vellum\branches\v1\1 .1\dev\output\openSource\textLayout\src\flashx\textLayout\compose

       

      \StandardFlowComposer.as:758]
          at flashx.textLayout.compose::StandardFlowComposer/compose()[C:\Vellum\branches\v1\1.1\dev\o utput\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer.as:821]
          at flashx.textLayout.factory::TextFlowTextLineFactory/createTextLines()[C:\Vellum\branches\v 1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\factory\TextFlowTextLineFacto ry.as:127]
          at flashx.textLayout.container::TextContainerManager/compose()[C:\Vellum\branches\v1\1.1\dev \output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager.as:1254 ]
          at flashx.textLayout.container::TextContainerManager/updateContainer()[C:\Vellum\branches\v1 \1.1\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager .as:1294]
          at mx.core::FTETextField/composeHTMLText()[E:\dev\4.x\frameworks\projects\spark\src\mx\core\ FTETextField.as:3130]
          at mx.core::FTETextField/validateNow()[E:\dev\4.x\frameworks\projects\spark\src\mx\core\FTET extField.as:2560]
          at mx.core::FTETextField/get htmlText()[E:\dev\4.x\frameworks\projects\spark\src\mx\core\FTETextField.as:1101]
          at mx.controls::Label/textFieldChanged()[E:\dev\4.x\frameworks\projects\framework\src\mx\con trols\Label.as:1593]
          at mx.controls::Label/textField_textFieldStyleChangeHandler()[E:\dev\4.x\frameworks\projects \framework\src\mx\controls\Label.as:1662]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.core::UIFTETextField/validateNow()[E:\dev\4.x\frameworks\projects\spark\src\mx\core\UI FTETextField.as:2221]
          at mx.core::UIFTETextField/set htmlText()[E:\dev\4.x\frameworks\projects\spark\src\mx\core\UIFTETextField.as:480]
          at mx.controls::Label/commitProperties()[E:\dev\4.x\frameworks\projects\framework\src\mx\con trols\Label.as:1379]
          at mx.controls::Text/commitProperties()[E:\dev\4.x\frameworks\projects\framework\src\mx\cont rols\Text.as:304]
          at mx.core::UIComponent/validateProperties()[E:\dev\4.x\frameworks\projects\framework\src\mx \core\UIComponent.as:7933]
          at mx.managers::LayoutManager/validateProperties()[E:\dev\4.x\frameworks\projects\framework\ src\mx\managers\LayoutManager.as:572]
          at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:700]
          at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1072]
      //-------------------------------END ERROR MESSAGE-------------------------------

       


      If anyone has a solution or a clue, how i can over come this error....pls let me know