TextFlow is getting cropped, How to fix that?
- January 25, 2010
- 1 reply
- 920 views
im getting the text from an external XML file:
<page>
<name><![CDATA[ <h1>2. The female sex hormones</h1>]]></name>
<subName><![CDATA[ <h2>2.1 Estrogens</h2>]]></subName>
<thumb>images/MOD1/Mod 1-Tab. 2.1-SMALL.png</thumb>
<imgBIG>images/MOD1/Mod 1-Tab. 2.1.png</imgBIG>
<image></image>
<detailsURL>http://www.prescript.co.uk </detailsURL>
<description></description>
<!--<description>
<![CDATA[
<p>The estrogens are a class of hormone. The three most important estrogens are <a href="#" class="glossaryLink">estrone</a>, <a href="#" class="glossaryLink">estradiol</a> and <a href="#" class="glossaryLink">estriol</a> These are often referred to as E<font face="ArialSub">1</font>, E<font face="ArialSub">2</font> and E<font face="ArialSub">3</font> respectively. Estradiol is the most potent and the most important component of HT while estriol is the weakest and least important. One type of estrogen can be converted to another type in the body.</p><br></br>
<p>Estradiol – also known as 17β-estradiol – is the key ingredient in the Estradot patch. More details can be found in Module 2 – Estradot: the product</p>
]]>
</description>-->
<tag><![CDATA[<p class="title-text">Table 2.1 The three main naturally occurring estrogens</p>]]>
</tag>
<!-- Text Layout-->
<txtLayout>
<TextFlow xmlns="http://ns.adobe.com/textLayout/2008" fontFamily="Arial" fontSize="12" textAlign="left">
<p>The estrogens are a class of hormone. The three most important estrogens are <a STYLE="text-decoration:none" fontWeight="bold" color="#ec008c" href="#">estrone</a>,<a STYLE="text-decoration:none" fontWeight="bold" color="#ec008c" href="#">estradiol</a>, and <a STYLE="text-decoration:none" fontWeight="bold" color="#ec008c" href="#" >estriol</a>. These are often referred to as E<span baselineShift="subscript" fontSize="14" fontLookup="embeddedCFF">1</span>, E<span baselineShift="subscript" fontSize="14" fontLookup="embeddedCFF">2</span> and E<span baselineShift="subscript" fontSize="14" fontLookup="embeddedCFF">3</span> respectively. Estradiol is the most potent and the most important component of HT while estriol is the weakest and least important. One type of estrogen can be converted to another type in the body.<br></br><br></br>Estradiol – also known as 17β-estradiol – is the key ingredient in the Estradot patch. More details can be found in Module 2 – Estradot: the product</p>
</TextFlow>
</txtLayout>
<txtLayoutX>0</txtLayoutX>
<txtLayoutY>86</txtLayoutY>
<txtLayoutW>705</txtLayoutW>
<!-- FIGURES-->
<fig></fig>
<figX></figX>
<figY></figY>
<figW></figW>
<pagetitleX>0</pagetitleX>
<pagetitleY>20</pagetitleY>
<pagetitleW>550</pagetitleW>
<subNameX>0</subNameX>
<subNameY>56</subNameY>
<subNameW>550</subNameW>
<thumbX></thumbX>
<thumbY>220</thumbY>
<imgX></imgX>
<imgY></imgY>
<descX>0</descX>
<descY>106</descY>
<descW>705</descW>
<tagX>0</tagX>
<tagY>200</tagY>
<tagW>550</tagW>
<swfX></swfX>
<swfY></swfY>
<swfW></swfW>
</page>
in Flash :
function createTxtLayout(X, Y, W, TXT)
{
//trace("Pages ------- createTxtLayout");
var TXTLayout:TextLayout;
var containerFormat:ContainerFormat;
//containerFormat.columnCount = 1;
//containerFormat.columnWidth = W;
var xmlTXT:XML;
xmlTXT = XML(TXT);
TXTLayout = new TextLayout()
addChild(TXTLayout);
//TXTLayout.getChildAt(2).width = 705;
TXTLayout.xmlText = xmlTXT;
TXTLayout.x = X;
TXTLayout.y = Y;
for(var i=0;i<TXTLayout.numChildren;i++)
{
trace("child "+i+ "is"+ TXTLayout.getChildAt(2).width);
}
}
Im desperate for a solution, i have tried adding columnWidth="705" columnCount="1" without any luck. when i trace TextLayout 3rd child which is a Sprite i get 550 as width.i wana be able set the width of the textLayout to 705px.
When i select the text and drag i can see the rest of the text,so it looks like theirs a mask on top.
Any Suggestions?
