Runtime Error when setting the textFlow of a TextArea with specific size
Hi All
When trying to set the textFlow of a Textrea with a specific size (412x258) the flash player crashes because of a 15 sec loop. Could you please help me on this?
Please find the code below:
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"xmlns:s="
library://ns.adobe.com/flex/spark"
xmlns:mx="
library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
creationComplete="init()"
>
<fx:Script>
<![CDATA[
import flashx.textLayout.conversion.TextConverter;
private var tfText:String = '<TextFlow columnCount="inherit" columnGap="inherit" columnWidth="inherit" lineBreak="inherit" paddingBottom="inherit" paddingLeft="inherit" paddingRight="inherit" paddingTop="inherit" verticalAlign="inherit" whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textDecoration="none" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">THE BEAUTIFUL NEW VAGUENESS</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="italic" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textDecoration="none" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">How do I learn to love the non-predictability of the world?</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default"></span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">Nothing is as it is forever. Time and again, everything changes. Again and again, the unpredictable happens, chaos breaks out constantly. Things never stay in order, things can never be effectively planned!</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default"></span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">The problem of contingency, of the non-predictability of personal and professional development, is problematic for many people. Continually, they see themselves questioned existentially. – Delité describes six effective ideas to overcome this problem. With a new attitude to this problem:</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default"></span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">1. Idea: We are children of evolution</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">2. Idea: Primal fear AND basic trust</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">3. Idea: A sensible attitude towards work</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">4. Idea: The illusion of secondary virtues</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">5. Idea: The end of self-pity</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">6. Idea: Loving life</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textDecoration="underline" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">Read more here</span></p><p color="#000000" direction="ltr" fontFamily="Arial" fontSize="12" justificationRule="auto" justificationStyle="auto" kerning="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="justify" textAlignLast="start" textIndent="0" textJustify="interWord" trackingRight="0"><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="11" fontStyle="normal" fontWeight="normal" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textDecoration="underline" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default"></span></p></TextFlow>';
private function init():void{
this.richText.textFlow = TextConverter.importToFlow(this.tfText, TextConverter.TEXT_LAYOUT_FORMAT);
trace(this.richText.text)
}
]]>
</fx:Script>
<s:TextArea name="richText" id="richText" x="0" y="0" width="412" height="258"
horizontalScrollPolicy="
auto" verticalScrollPolicy="auto" selectable="true"
borderVisible="
false" editable="false" contentBackgroundAlpha="0" paddingRight="15"
renderingMode="
cff" fontLookup="embeddedCFF" cffHinting="horizontalStem"/>
</s:Application>
The Error details:
Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
at flashx.textLayout.compose::BaseCompose/fitLineToParcel()
at flashx.textLayout.compose::ComposeState/composeNextLine()
at flashx.textLayout.compose::BaseCompose/composeParagraphElementIntoLines()
at flashx.textLayout.compose::ComposeState/composeParagraphElement()
at flashx.textLayout.compose::BaseCompose/composeBlockElement()
at flashx.textLayout.compose::BaseCompose/composeInternal()
at flashx.textLayout.compose::ComposeState/composeInternal()
at flashx.textLayout.compose::BaseCompose/composeTextFlow()
at flashx.textLayout.compose::ComposeState/composeTextFlow()
at flashx.textLayout.compose::StandardFlowComposer/http://ns.adobe.com/textLayout/internal/2008::callTheComposer()
at flashx.textLayout.compose::StandardFlowComposer/internalCompose()
at flashx.textLayout.compose::StandardFlowComposer/compose()
at flashx.textLayout.container::TextContainerManager/compose()
at flashx.textLayout.container::TextContainerManager/updateContainer()
at spark.components::RichEditableText/updateDisplayList()
at mx.core::UIComponent/validateDisplayList()
at mx.managers::LayoutManager/validateDisplayList()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/doPhasedInstantiationCallback()
Thank you for your support!
