<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>franto.com</title>
	
	<link>http://franto.com</link>
	<description />
	<lastBuildDate>Tue, 03 Nov 2009 12:22:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/franto" type="application/rss+xml" /><feedburner:emailServiceId>franto</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Numeric sorting of Flex DataGridColumn</title>
		<link>http://feedproxy.google.com/~r/franto/~3/S5lAM1hCPiw/</link>
		<comments>http://franto.com/numeric-sorting-of-flex-datagridcolumn/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 12:18:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex Tips]]></category>

		<guid isPermaLink="false">http://franto.com/?p=1123</guid>
		<description><![CDATA[This is quick solution for Flex coders. If you want to sort column in DataGrid, default sorting is sorted by String and not Number. If you have just one numeric column, you can create custom sort function and set sortCompareFunction for given DataGridColumn. If you have more such columns and you dataProvider is ArrayCollection which consists of many object, better solution is override DataGridColumn and implement compareFunction inside this class.]]></description>
			<content:encoded><![CDATA[<div class='series_toc'><h3>Table of contents for flex-tips</h3><ol><li><a href='http://franto.com/problem-with-xml-attributes-in-as3-0/' title='Problem with XML attributes in AS3.0'>Problem with XML attributes in AS3.0</a></li><li><a href='http://franto.com/unable-to-export-swc-oem/' title='Unable to export SWC oem'>Unable to export SWC oem</a></li><li>Numeric sorting of Flex DataGridColumn</li></ol></div> <p>This is quick example for <strong>Numeric sorting of Flex DataGrid columns</strong>. If you want to sort column in DataGrid, default sorting is sorted by String and not by Number. If you have just one numeric column, you may create custom sort function and set <strong>sortCompareFunction</strong> for given <strong>DataGridColumn</strong>. If you have more such columns and your dataProvider is <strong>ArrayCollection</strong>, which consists of many objects, better solution is override <strong>DataGridColumn</strong> and implement compare function inside this class. Here is class</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">flexets</span>.<span style="color: #006600;">components</span>.<span style="color: #006600;">dataGridClasses</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">controls</span>.<span style="color: #006600;">dataGridClasses</span>.<span style="color: #006600;">DataGridColumn</span>;
	<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">utils</span>.<span style="color: #006600;">ObjectUtil</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> NumericDataGridColumn <span style="color: #0066CC;">extends</span> DataGridColumn
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const NUMERIC:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;N&quot;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> NumericDataGridColumn<span style="color: #66cc66;">&#40;</span>columnName:<span style="color: #0066CC;">String</span>=<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span>columnName<span style="color: #66cc66;">&#41;</span>;
			initCompare<span style="color: #66cc66;">&#40;</span>NUMERIC<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> initCompare<span style="color: #66cc66;">&#40;</span>numeric:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>numeric == NUMERIC<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				sortCompareFunction = numericCompare;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		* Pull the numbers from the objects and call the implementation. TAKEN FROM mx.collections.SortField
		*/</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> numericCompare<span style="color: #66cc66;">&#40;</span>a:<span style="color: #0066CC;">Object</span>, b:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">int</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> fa:<span style="color: #0066CC;">Number</span>;
			<span style="color: #0066CC;">try</span>
			<span style="color: #66cc66;">&#123;</span>
				fa = dataField == <span style="color: #000000; font-weight: bold;">null</span> ? <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">&#91;</span>dataField<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #0066CC;">catch</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">error</span>:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> fb:<span style="color: #0066CC;">Number</span>;
			<span style="color: #0066CC;">try</span>
			<span style="color: #66cc66;">&#123;</span>
				fb = dataField == <span style="color: #000000; font-weight: bold;">null</span> ? <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span>b<span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span>b<span style="color: #66cc66;">&#91;</span>dataField<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #0066CC;">catch</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">error</span>:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #b1b100;">return</span> ObjectUtil.<span style="color: #006600;">numericCompare</span><span style="color: #66cc66;">&#40;</span>fa, fb<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>and then just use NumericDataGridColumn  in your mxml in DataGrid like this</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DataGrid</span> id=<span style="color: #ff0000;">&quot;myDG&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> dataProvider=<span style="color: #ff0000;">&quot;{myDataProvider}&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:columns</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DataGridColumn</span> dataField=<span style="color: #ff0000;">&quot;id&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;dataGridClasses:NumericDataGridColumn</span> dataField=<span style="color: #ff0000;">&quot;order&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DataGridColumn</span> dataField=<span style="color: #ff0000;">&quot;title&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;dataGridClasses:NumericDataGridColumn</span> dataField=<span style="color: #ff0000;">&quot;price&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:columns</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:DataGrid</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Enjoy this little Flex tip.</p>
 <div class='series_links'><a href='http://franto.com/unable-to-export-swc-oem/' title='Unable to export SWC oem'>Previous in series</a> </div>
<p><a href="http://feedads.g.doubleclick.net/~a/6F1DYsJMx-jpLLCyhbXpk3wqwXI/0/da"><img src="http://feedads.g.doubleclick.net/~a/6F1DYsJMx-jpLLCyhbXpk3wqwXI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/6F1DYsJMx-jpLLCyhbXpk3wqwXI/1/da"><img src="http://feedads.g.doubleclick.net/~a/6F1DYsJMx-jpLLCyhbXpk3wqwXI/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/franto?a=S5lAM1hCPiw:d0lSZaW5ZYA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/franto?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=S5lAM1hCPiw:d0lSZaW5ZYA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/franto?i=S5lAM1hCPiw:d0lSZaW5ZYA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=S5lAM1hCPiw:d0lSZaW5ZYA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/franto?i=S5lAM1hCPiw:d0lSZaW5ZYA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=S5lAM1hCPiw:d0lSZaW5ZYA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/franto?i=S5lAM1hCPiw:d0lSZaW5ZYA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=S5lAM1hCPiw:d0lSZaW5ZYA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/franto?i=S5lAM1hCPiw:d0lSZaW5ZYA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/franto/~4/S5lAM1hCPiw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://franto.com/numeric-sorting-of-flex-datagridcolumn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://franto.com/numeric-sorting-of-flex-datagridcolumn/</feedburner:origLink></item>
		<item>
		<title>More Google Wave invitations</title>
		<link>http://feedproxy.google.com/~r/franto/~3/833uEXsFJ3k/</link>
		<comments>http://franto.com/more-google-wave-invitations/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 10:43:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[My Sites]]></category>
		<category><![CDATA[Google Wave]]></category>
		<category><![CDATA[invitation]]></category>

		<guid isPermaLink="false">http://franto.com/?p=1120</guid>
		<description><![CDATA[I get more Google Wave invitations today and as I have already invited my friends I have now free Google Wave invitations. So if you want to try Google Wave and play with it, but do not know anyone with Google Wave account, ask in comments. I will send 10 invitation for first 10 people which will ask for Google Wave invitation in comments.]]></description>
			<content:encoded><![CDATA[<p>I get more Google Wave invitations today and as I have already invited my friends I have now free Google Wave invitations. So if you want to try Google Wave and play with it, but do not know anyone with Google Wave account, ask in comments. I will send 10 invitation for first 10 people which will ask for Google Wave invitation in comments.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/QatzMq1gqL3hflGAKp5S_COZDnM/0/da"><img src="http://feedads.g.doubleclick.net/~a/QatzMq1gqL3hflGAKp5S_COZDnM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/QatzMq1gqL3hflGAKp5S_COZDnM/1/da"><img src="http://feedads.g.doubleclick.net/~a/QatzMq1gqL3hflGAKp5S_COZDnM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/franto?a=833uEXsFJ3k:im8H81YZTPo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/franto?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=833uEXsFJ3k:im8H81YZTPo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/franto?i=833uEXsFJ3k:im8H81YZTPo:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=833uEXsFJ3k:im8H81YZTPo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/franto?i=833uEXsFJ3k:im8H81YZTPo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=833uEXsFJ3k:im8H81YZTPo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/franto?i=833uEXsFJ3k:im8H81YZTPo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=833uEXsFJ3k:im8H81YZTPo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/franto?i=833uEXsFJ3k:im8H81YZTPo:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/franto/~4/833uEXsFJ3k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://franto.com/more-google-wave-invitations/feed/</wfw:commentRss>
		<slash:comments>56</slash:comments>
		<feedburner:origLink>http://franto.com/more-google-wave-invitations/</feedburner:origLink></item>
		<item>
		<title>$1000 for Wordpress plugin</title>
		<link>http://feedproxy.google.com/~r/franto/~3/Hn0fxpziUS8/</link>
		<comments>http://franto.com/1000-for-wordpress-plugin/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 07:13:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[web analytics]]></category>
		<category><![CDATA[wordpress plugin]]></category>

		<guid isPermaLink="false">http://franto.com/?p=1106</guid>
		<description><![CDATA[If you are Wordpress plugin developer you have nice chance to earn $1000. It's for <a href="http://franto.com/go/getclicky">GetClicky Web Analytics</a> site. It is site similar to Google Analytics, but their data are realtime, so you can really see who is on your site and which content is seen by your visitors currently. It's very useful web analytics site and I'm using it for tracking my sites. But get back to <a href="http://franto.com/go/getclicky">GetClicky</a> Wordpress Plugin.]]></description>
			<content:encoded><![CDATA[<p>If you are Wordpress plugin developer you have nice chance to earn $1000. It&#8217;s for <a href="http://franto.com/go/getclicky/">GetClicky Web Analytics</a> site. It is site similar to Google Analytics, but their data are realtime, so you can really see who is on your site and which content is seen by your visitors currently. It&#8217;s very useful web analytics site and I&#8217;m using it for tracking my sites. But get back to <a href="http://franto.com/go/getclicky/">GetClicky</a> Wordpress Plugin.</p>
<p>They need to help with development and they are willing to pay you $1000. Here is quotation form their site:</p>
<div style="font-style:italics;color:#888888;font-size:14px;font-family:Arial">Our WordPress plugin seems to have serious compatibility issues with 2.7 and beyond. It&#8217;s also lacking a couple of features we wish that it had. We find the WP API very difficult to work with and wish to never lay eyes on it again. Therefore, we are offering $1,000 to a qualified WP plugin developer to make the plugin of our dreams.</p>
<p>You need to be very experienced with the WP API, and must have developed at least one major (semi-popular) plugin, or several more minor ones. You also must be the type of person who believes code is a beautiful piece of art, because if there&#8217;s one thing that gets my goat, it&#8217;s messy code.&#8221;</p></div>
<p>Read more about it: <a href="http://getclicky.com/blog/178/1000-for-a-new-clicky-wordpress-plugin">$1000 for Wordpress plugin</a>. And if you are not Wordpress plugin developer you may be interested in tracking you site with <a href="http://franto.com/go/getclicky/">realtime web analytics by GetClicky</a>. It&#8217;s completly free for one site and it&#8217;s very affordable if you want to <strong>track more sites in realtime</strong>.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/OSA2AupD8zQU9bxZ-CRUuCRwqio/0/da"><img src="http://feedads.g.doubleclick.net/~a/OSA2AupD8zQU9bxZ-CRUuCRwqio/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/OSA2AupD8zQU9bxZ-CRUuCRwqio/1/da"><img src="http://feedads.g.doubleclick.net/~a/OSA2AupD8zQU9bxZ-CRUuCRwqio/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/franto?a=Hn0fxpziUS8:lxOHcdQKilw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/franto?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=Hn0fxpziUS8:lxOHcdQKilw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/franto?i=Hn0fxpziUS8:lxOHcdQKilw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=Hn0fxpziUS8:lxOHcdQKilw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/franto?i=Hn0fxpziUS8:lxOHcdQKilw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=Hn0fxpziUS8:lxOHcdQKilw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/franto?i=Hn0fxpziUS8:lxOHcdQKilw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=Hn0fxpziUS8:lxOHcdQKilw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/franto?i=Hn0fxpziUS8:lxOHcdQKilw:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/franto/~4/Hn0fxpziUS8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://franto.com/1000-for-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://franto.com/1000-for-wordpress-plugin/</feedburner:origLink></item>
		<item>
		<title>Kseniya Simonova – Sand Animation</title>
		<link>http://feedproxy.google.com/~r/franto/~3/NFa1nrU7ZCc/</link>
		<comments>http://franto.com/kseniya-simonova-sand-animation/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 14:17:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://franto.com/?p=1102</guid>
		<description><![CDATA[Off Topic: This is really amazing sand animation by Ksenyia (winner of Ukraine&#8217;s Got Talent). She is painting and animating German occupation of Ukraine in WW2. 

]]></description>
			<content:encoded><![CDATA[<p><strong>Off Topic: </strong>This is really amazing sand animation by Ksenyia (winner of <strong>Ukraine&#8217;s Got Talent</strong>). She is painting and animating German occupation of Ukraine in WW2. </p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/518XP8prwZo&#038;hl=cs&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/518XP8prwZo&#038;hl=cs&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>

<p><a href="http://feedads.g.doubleclick.net/~a/DzOk9uDck3aTLc6MBws4cdg5M4Q/0/da"><img src="http://feedads.g.doubleclick.net/~a/DzOk9uDck3aTLc6MBws4cdg5M4Q/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/DzOk9uDck3aTLc6MBws4cdg5M4Q/1/da"><img src="http://feedads.g.doubleclick.net/~a/DzOk9uDck3aTLc6MBws4cdg5M4Q/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/franto?a=NFa1nrU7ZCc:ogSognoU0G8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/franto?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=NFa1nrU7ZCc:ogSognoU0G8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/franto?i=NFa1nrU7ZCc:ogSognoU0G8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=NFa1nrU7ZCc:ogSognoU0G8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/franto?i=NFa1nrU7ZCc:ogSognoU0G8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=NFa1nrU7ZCc:ogSognoU0G8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/franto?i=NFa1nrU7ZCc:ogSognoU0G8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=NFa1nrU7ZCc:ogSognoU0G8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/franto?i=NFa1nrU7ZCc:ogSognoU0G8:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/franto/~4/NFa1nrU7ZCc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://franto.com/kseniya-simonova-sand-animation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://franto.com/kseniya-simonova-sand-animation/</feedburner:origLink></item>
		<item>
		<title>Goodbye FlashDen, hello ActiveDen</title>
		<link>http://feedproxy.google.com/~r/franto/~3/zebU38AShug/</link>
		<comments>http://franto.com/goodbye-flashden-hello-activeden/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 20:04:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://franto.com/?p=1095</guid>
		<description><![CDATA[I've found out today, that there is no longer <strong>FlashDen.net</strong>, but instead there is new site in <strong>Envato network</strong> called <a href="http://franto.com/go/activeden.net"><strong>ActiveDen</strong></a>. It's same site, but Adobe has asked Envato to change the name because "Flash" is registered trademark of Adobe. And there are also Flex files on ActiveDen, so there are no more just pure Flash files, so it's maybe better name now.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve found out today, that there is no longer <strong>FlashDen.net</strong>, but instead there is new site in <strong>Envato network</strong> called <a href="http://franto.com/go/activeden.net"><strong>ActiveDen</strong></a>. It&#8217;s same site, but Adobe has asked Envato to change the name because &#8220;Flash&#8221; is registered trademark of Adobe. And there are also Flex files on ActiveDen, so there are no more just pure Flash files, so it&#8217;s maybe better name now.</p>
<h3><a href="http://franto.com/go/activeden.net">Goodbye FlashDen, hello ActiveDen</a></h3>

<p><a href="http://feedads.g.doubleclick.net/~a/WGJDVuNbrvTvxTQqPIdPU_eSDnY/0/da"><img src="http://feedads.g.doubleclick.net/~a/WGJDVuNbrvTvxTQqPIdPU_eSDnY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/WGJDVuNbrvTvxTQqPIdPU_eSDnY/1/da"><img src="http://feedads.g.doubleclick.net/~a/WGJDVuNbrvTvxTQqPIdPU_eSDnY/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/franto?a=zebU38AShug:l9umbW6G9JE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/franto?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=zebU38AShug:l9umbW6G9JE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/franto?i=zebU38AShug:l9umbW6G9JE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=zebU38AShug:l9umbW6G9JE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/franto?i=zebU38AShug:l9umbW6G9JE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=zebU38AShug:l9umbW6G9JE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/franto?i=zebU38AShug:l9umbW6G9JE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=zebU38AShug:l9umbW6G9JE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/franto?i=zebU38AShug:l9umbW6G9JE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/franto/~4/zebU38AShug" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://franto.com/goodbye-flashden-hello-activeden/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://franto.com/goodbye-flashden-hello-activeden/</feedburner:origLink></item>
		<item>
		<title>Major update of Goalscape AIR application</title>
		<link>http://feedproxy.google.com/~r/franto/~3/1WWej5fqmhA/</link>
		<comments>http://franto.com/major-update-ofr-goalscape-air-application/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 20:06:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Goalscape]]></category>

		<guid isPermaLink="false">http://franto.com/?p=1081</guid>
		<description><![CDATA[This friday we have released <strong><a href="http://www.goalscape.com/blog/major-update-out-today">major update for Goalscape AIR application</a></strong>. It is project we (me with Tomas as <a href="http://www.flexets.com">Flexets company</a>) have been working on for more than year. If you are not aware of Goalscape application please look at intro video. But in one sentence it's <strong>Goal Management Software</strong>.]]></description>
			<content:encoded><![CDATA[<p>This friday we have released <strong><a href="http://www.goalscape.com/blog/major-update-out-today">major update for Goalscape AIR application</a></strong>. It is project we (me with Tomas as <a href="http://www.flexets.com">Flexets company</a>) have been working on for more than year. If you are not aware of <strong>Goalscape</strong> application please look at intro video. But in one sentence it&#8217;s <strong>Goal Management Software</strong>.</p>
<p><object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6497482&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=a0a3a8&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=6497482&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=a0a3a8&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object></p>
<p>Here is list of main features in this update:</p>
<ul>
<li><strong>Search function</strong></li>
<li><strong>Adding and naming goals</strong></li>
<li><strong>Icons for common functions</strong></li>
<li><strong>Language support</strong></li>
<li><strong>Notes text</strong></li>
<li><strong>Attachments</strong></li>
</ul>
<p>If you are interested in details go and read about them here: <strong><a href="http://www.goalscape.com/blog/major-update-out-today">Major update for Goalscape AIR application</a></strong> and <strong><a href="http://www.goalscape.com/goalscape-download">download Goalscape</a></strong> (AIR application). You have 1 month free trial and then it&#8217;s just 45€ one time payment which include all future updates.</p>
<p>If you have any questions about <strong><a href="http://www.goalscape.com">Goalscape</a></strong> ask in comments, I can answer them in comments. Even if you install <strong><a href="http://www.goalscape.com">Goalscape</a></strong> and want to see there some features, let me know and we will consider to add them to <strong><a href="http://www.goalscape.com">Goalscape</a></strong>.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/tRw8yhIfn6wuZUKuUJn0civXTaw/0/da"><img src="http://feedads.g.doubleclick.net/~a/tRw8yhIfn6wuZUKuUJn0civXTaw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/tRw8yhIfn6wuZUKuUJn0civXTaw/1/da"><img src="http://feedads.g.doubleclick.net/~a/tRw8yhIfn6wuZUKuUJn0civXTaw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/franto?a=1WWej5fqmhA:9YoS_PxcA0s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/franto?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=1WWej5fqmhA:9YoS_PxcA0s:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/franto?i=1WWej5fqmhA:9YoS_PxcA0s:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=1WWej5fqmhA:9YoS_PxcA0s:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/franto?i=1WWej5fqmhA:9YoS_PxcA0s:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=1WWej5fqmhA:9YoS_PxcA0s:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/franto?i=1WWej5fqmhA:9YoS_PxcA0s:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=1WWej5fqmhA:9YoS_PxcA0s:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/franto?i=1WWej5fqmhA:9YoS_PxcA0s:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/franto/~4/1WWej5fqmhA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://franto.com/major-update-ofr-goalscape-air-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://franto.com/major-update-ofr-goalscape-air-application/</feedburner:origLink></item>
		<item>
		<title>Why my sites were not indexed by Google?</title>
		<link>http://feedproxy.google.com/~r/franto/~3/501xxW3duzg/</link>
		<comments>http://franto.com/why-my-sites-were-not-indexed-by-google/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 19:12:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[My Sites]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://franto.com/?p=1070</guid>
		<description><![CDATA[Few months ago I've created site <strong><a href="http://filmcomposers.info" title="Movie Soundtracks Composers">http://filmcomposers.info</a></strong> about <strong>Movie Soundtracks Composers</strong>, because I like movie soundtracks and music composing (orchestral) (I really love Hans Zimmer work). But site is still not indexed by google...]]></description>
			<content:encoded><![CDATA[<p>Few months ago I&#8217;ve created site <strong><a href="http://filmcomposers.info" title="Movie Soundtracks Composers">http://filmcomposers.info</a></strong> about <strong>Movie Soundtracks Composers</strong>, because I like movie soundtracks and music composing (orchestral) (I really love Hans Zimmer work). But site is still not indexed by google. I was thinking, that&#8217;s because almost all content is done by <strong><a href="http://franto.com/wordpress-as-cms/">Wordpress plugin Pods</a></strong> and there are no posts or pages and just this site is linking to the site <strong><a href="http://filmcomposers.info" title="Movie Soundtracks Composers">http://filmcomposers.info</a></strong>. So I&#8217;ve submitted site to Google Webmasters tools, still nothing, I have check if there is no robots.txt file or if inside of that file are search spiders disalloved. I didn&#8217;t find anything. Buuut, yes, I&#8217;m such a fool <img src='http://franto.com/blog2/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It&#8217;s Wordpress privacy setting: <strong>I would like my blog to be visible to everyone, including search engines (like Google, Sphere, Technorati) and archivers</strong> or <strong>I would like to block search engines, but allow normal visitors</strong>. Yes, that&#8217;s why google can&#8217;t indexed my site <img src='http://franto.com/blog2/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  This option adds meta tag into page header:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;meta name=&quot;robots&quot; content=&quot;noindex, nofollow&quot;&gt;</pre></div></div>

<p>So if you have same problems and you have site based on <strong>Wordpress</strong>, check in your Admin section <strong>Settings > Privacy</strong> or check html source code for robots meta tag in header.</p>
<p>After this discovery yesterday I&#8217;ve found out that even <strong><a href="http://franto.com">franto.com</a></strong> has same settings and it&#8217;s not indexed by google from time I&#8217;ve changed hosting provider few months ago. So I have rather changed all my other sites and they are all ok <img src='http://franto.com/blog2/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I think I need to create some AIR app for checking such SEO problems&#8230;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/upWfa-jyqObRK0tLss93We6elcg/0/da"><img src="http://feedads.g.doubleclick.net/~a/upWfa-jyqObRK0tLss93We6elcg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/upWfa-jyqObRK0tLss93We6elcg/1/da"><img src="http://feedads.g.doubleclick.net/~a/upWfa-jyqObRK0tLss93We6elcg/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/franto?a=501xxW3duzg:gRApfe-i1c4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/franto?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=501xxW3duzg:gRApfe-i1c4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/franto?i=501xxW3duzg:gRApfe-i1c4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=501xxW3duzg:gRApfe-i1c4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/franto?i=501xxW3duzg:gRApfe-i1c4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=501xxW3duzg:gRApfe-i1c4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/franto?i=501xxW3duzg:gRApfe-i1c4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=501xxW3duzg:gRApfe-i1c4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/franto?i=501xxW3duzg:gRApfe-i1c4:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/franto/~4/501xxW3duzg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://franto.com/why-my-sites-were-not-indexed-by-google/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://franto.com/why-my-sites-were-not-indexed-by-google/</feedburner:origLink></item>
		<item>
		<title>Text Layout Engine: TruncationOptions</title>
		<link>http://feedproxy.google.com/~r/franto/~3/_ScLhjPhSws/</link>
		<comments>http://franto.com/text-layout-engine-truncationoptions/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 12:46:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Text Layout Engine]]></category>

		<guid isPermaLink="false">http://franto.com/?p=1061</guid>
		<description><![CDATA[This is same example as yesterday (<strong><a href="http://franto.com/text-layout-engine-fit-text-into-rectangle/">Fit text in rectangle with Text Layout Engine</a></strong>), but I've added one more switch. You can decide if you want use <strong>TruncationOptions</strong> or not. Reason why I want to show this to you is that it works differently. I do not know if this is feature or bug, but try to tell me your opinion in comments.]]></description>
			<content:encoded><![CDATA[<div class='series_toc'><h3>Table of contents for Text Layout Engine</h3><ol><li><a href='http://franto.com/text-layout-engine-in-flex-3/' title='Text Layout Engine in Flex 3'>Text Layout Engine in Flex 3</a></li><li><a href='http://franto.com/text-layout-engine-fit-text-into-rectangle/' title='Text Layout Engine: Fit text into rectangle'>Text Layout Engine: Fit text into rectangle</a></li><li>Text Layout Engine: TruncationOptions</li></ol></div> <p>This is same example as yesterday (<strong><a href="http://franto.com/text-layout-engine-fit-text-into-rectangle/">Fit text in rectangle with Text Layout Engine</a></strong>), but I&#8217;ve added one more switch. You can decide if you want use <strong>TruncationOptions</strong> or not. Reason why I want to show this to you is that it works differently. I do not know if this is feature or bug, but try to tell me your opinion in comments. When I use TruncationOptions in this way:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> truncationOptions<span style="color: #000000; font-weight: bold;">:</span>TruncationOptions = <span style="color: #0033ff; font-weight: bold;">new</span> TruncationOptions<span style="color: #000000;">&#40;</span><span style="color: #990000;">'...'</span>,<span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#41;</span>;
factory.truncationOptions = truncationOptions;</pre></div></div>

<p>all works nice and text is fitted into rectangle. But when I do not include truncation last line of text is out of the rectangle if any pixel line of text line is inside rectangle. Maybe there is some other property which can handle this situation, but I&#8217;m not really aware of it. Do you know about such property?</p>
<p>Try it in this example:<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                        id="TextLayoutEngineExamples" width="100%" height="400"
                        codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
                        <param name="movie" value="http://franto.com/uploads/examples/textLayoutEngine/fit2/TextLayoutEngineExamples.swf" />
                        <param name="quality" value="high" />
                        <param name="bgcolor" value="#333333" />
                        <param name="allowScriptAccess" value="sameDomain" />
                        <embed src="http://franto.com/uploads/examples/textLayoutEngine/fit2/TextLayoutEngineExamples.swf" quality="high" bgcolor="#333333"
                                width="100%" height="400" name="TextLayoutEngineExamples" align="middle"
                                play="true"
                                loop="false"
                                quality="high"
                                allowScriptAccess="sameDomain"
                                type="application/x-shockwave-flash"
                                pluginspage="http://www.adobe.com/go/getflashplayer">
                        </embed>
        </object>
</p>
<p>and here is source code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>xml <span style="color: #004993;">version</span>=<span style="color: #990000;">&quot;1.0&quot;</span> encoding=<span style="color: #990000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Application xmlns<span style="color: #000000; font-weight: bold;">:</span>mx=<span style="color: #990000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> layout=<span style="color: #990000;">&quot;absolute&quot;</span> applicationComplete=<span style="color: #990000;">&quot;fit()&quot;</span>
	<span style="color: #004993;">backgroundColor</span>=<span style="color: #990000;">&quot;0x333333&quot;</span> <span style="color: #004993;">color</span>=<span style="color: #990000;">&quot;0xffffff&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Style <span style="color: #004993;">source</span>=<span style="color: #990000;">&quot;styles/fonts.css&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>RadioButtonGroup id=<span style="color: #990000;">&quot;radioGroup&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>VBox <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;100%&quot;</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;100%&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>RadioButton id=<span style="color: #990000;">&quot;radioButton1&quot;</span> label=<span style="color: #990000;">&quot;Don't truncate&quot;</span> <span style="color: #004993;">value</span>=<span style="color: #990000;">&quot;false&quot;</span> group=<span style="color: #990000;">&quot;{radioGroup}&quot;</span>	selected=<span style="color: #990000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>RadioButton id=<span style="color: #990000;">&quot;radioButton2&quot;</span> label=<span style="color: #990000;">&quot;Truncate&quot;</span> <span style="color: #004993;">value</span>=<span style="color: #990000;">&quot;true&quot;</span> group=<span style="color: #990000;">&quot;{radioGroup}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;100%&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Label <span style="color: #004993;">text</span>=<span style="color: #990000;">&quot;Text:&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>TextInput id=<span style="color: #990000;">&quot;txtInput&quot;</span> <span style="color: #004993;">color</span>=<span style="color: #990000;">&quot;0x000000&quot;</span> <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;100%&quot;</span> <span style="color: #004993;">change</span>=<span style="color: #990000;">&quot;fit()&quot;</span> <span style="color: #004993;">text</span>=<span style="color: #990000;">&quot;Text Layout Engine: Fit Text into Rectangle&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Label <span style="color: #004993;">text</span>=<span style="color: #990000;">&quot;Font Size:&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HSlider id=<span style="color: #990000;">&quot;fsSlider&quot;</span> liveDragging=<span style="color: #990000;">&quot;true&quot;</span> minimum=<span style="color: #990000;">&quot;6&quot;</span> maximum=<span style="color: #990000;">&quot;50&quot;</span> snapInterval=<span style="color: #990000;">&quot;1&quot;</span> <span style="color: #004993;">value</span>=<span style="color: #990000;">&quot;14&quot;</span>
				<span style="color: #004993;">change</span>=<span style="color: #990000;">&quot;fit()&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Label <span style="color: #004993;">text</span>=<span style="color: #990000;">&quot;Text Width:&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HSlider id=<span style="color: #990000;">&quot;wSlider&quot;</span> liveDragging=<span style="color: #990000;">&quot;true&quot;</span> minimum=<span style="color: #990000;">&quot;0&quot;</span> maximum=<span style="color: #990000;">&quot;500&quot;</span> snapInterval=<span style="color: #990000;">&quot;1&quot;</span> <span style="color: #004993;">value</span>=<span style="color: #990000;">&quot;100&quot;</span>
				<span style="color: #004993;">change</span>=<span style="color: #990000;">&quot;fit()&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Label <span style="color: #004993;">text</span>=<span style="color: #990000;">&quot;Text Height:&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HSlider id=<span style="color: #990000;">&quot;hSlider&quot;</span> liveDragging=<span style="color: #990000;">&quot;true&quot;</span> minimum=<span style="color: #990000;">&quot;0&quot;</span> maximum=<span style="color: #990000;">&quot;500&quot;</span> snapInterval=<span style="color: #990000;">&quot;1&quot;</span> <span style="color: #004993;">value</span>=<span style="color: #990000;">&quot;100&quot;</span>
				<span style="color: #004993;">change</span>=<span style="color: #990000;">&quot;fit()&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Label <span style="color: #004993;">text</span>=<span style="color: #990000;">&quot;Fit font to do not truncate text:&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>CheckBox id=<span style="color: #990000;">&quot;chbTruncate&quot;</span> selected=<span style="color: #990000;">&quot;false&quot;</span> <span style="color: #004993;">change</span>=<span style="color: #990000;">&quot;fit()&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Label <span style="color: #004993;">text</span>=<span style="color: #990000;">&quot;isTruncated?&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Canvas <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;20&quot;</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;20&quot;</span> <span style="color: #004993;">backgroundColor</span>=<span style="color: #990000;">&quot;0xff0000&quot;</span> 
				<span style="color: #004993;">visible</span>=<span style="color: #990000;">&quot;{!isTruncated}&quot;</span> includeInLayout=<span style="color: #990000;">&quot;{!isTruncated}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Canvas <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;20&quot;</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;20&quot;</span> <span style="color: #004993;">backgroundColor</span>=<span style="color: #990000;">&quot;0x00aa00&quot;</span> 
				<span style="color: #004993;">visible</span>=<span style="color: #990000;">&quot;{isTruncated}&quot;</span> includeInLayout=<span style="color: #990000;">&quot;{isTruncated}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>UIComponent id=<span style="color: #990000;">&quot;ui&quot;</span> <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;100%&quot;</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;100%&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>UIComponent<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>VBox<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Script<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span>
			<span style="color: #0033ff; font-weight: bold;">import</span> assets.TLEAssets;
			<span style="color: #0033ff; font-weight: bold;">import</span> flashx.textLayout.factory.TruncationOptions;
			<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.engine.Kerning;
			<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.engine.FontLookup;
			<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.engine.RenderingMode;
			<span style="color: #0033ff; font-weight: bold;">import</span> flashx.textLayout.formats.TextLayoutFormat;
			<span style="color: #0033ff; font-weight: bold;">import</span> flashx.textLayout.factory.StringTextLineFactory;
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> sprite<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Sprite</span>;
&nbsp;
			<span style="color: #000000;">&#91;</span>Bindable<span style="color: #000000;">&#93;</span> <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> isTruncated<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span>;
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> fit<span style="color: #000000;">&#40;</span>fs<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span>, cnt<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
	        <span style="color: #000000;">&#123;</span>
	        	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>sprite == <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span>
	        	<span style="color: #000000;">&#123;</span>
	        		sprite = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Sprite</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
	        		ui.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>sprite<span style="color: #000000;">&#41;</span>;
	        	<span style="color: #000000;">&#125;</span>
	        	<span style="color: #0033ff; font-weight: bold;">while</span> <span style="color: #000000;">&#40;</span>sprite.<span style="color: #004993;">numChildren</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>
	        	<span style="color: #000000;">&#123;</span>
	        		sprite.<span style="color: #004993;">removeChildAt</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>;
	        	<span style="color: #000000;">&#125;</span>
	            <span style="color: #6699cc; font-weight: bold;">var</span> factory<span style="color: #000000; font-weight: bold;">:</span>StringTextLineFactory = <span style="color: #0033ff; font-weight: bold;">new</span> StringTextLineFactory<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	            factory.compositionBounds = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Rectangle</span><span style="color: #000000;">&#40;</span> <span style="color: #000000; font-weight:bold;">10</span>, <span style="color: #000000; font-weight:bold;">10</span>, wSlider.<span style="color: #004993;">value</span>, hSlider.<span style="color: #004993;">value</span> <span style="color: #000000;">&#41;</span>;
&nbsp;
	           	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>fs == <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span>
	           		fs = fsSlider.<span style="color: #004993;">value</span>;
&nbsp;
	            <span style="color: #6699cc; font-weight: bold;">var</span> format<span style="color: #000000; font-weight: bold;">:</span>TextLayoutFormat = <span style="color: #0033ff; font-weight: bold;">new</span> TextLayoutFormat<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
	            format.fontFamily = <span style="color: #990000;">&quot;Verdana, _sans&quot;</span>;
	            format.<span style="color: #004993;">fontSize</span> = fs;
	            format.<span style="color: #004993;">color</span> = 0x000000;
	            format.textAlpha = .9;
	            format.<span style="color: #004993;">kerning</span> = Kerning.ON;
	            format.renderingMode = RenderingMode.CFF;
				format.fontLookup = FontLookup.EMBEDDED_CFF;
	            factory.spanFormat = format;
&nbsp;
				<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>radioGroup.selectedValue == <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>
				<span style="color: #000000;">&#123;</span>
					<span style="color: #6699cc; font-weight: bold;">var</span> truncationOptions<span style="color: #000000; font-weight: bold;">:</span>TruncationOptions = <span style="color: #0033ff; font-weight: bold;">new</span> TruncationOptions<span style="color: #000000;">&#40;</span><span style="color: #990000;">'...'</span>,<span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#41;</span>;
					factory.truncationOptions = truncationOptions;
				<span style="color: #000000;">&#125;</span>				
&nbsp;
	            factory.<span style="color: #004993;">text</span> = txtInput.<span style="color: #004993;">text</span>;
	            factory.createTextLines<span style="color: #000000;">&#40;</span> useTextLines <span style="color: #000000;">&#41;</span>;
&nbsp;
	            isTruncated = factory.isTruncated;
&nbsp;
	            <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>chbTruncate.selected <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> isTruncated <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> fs <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight:bold;">10</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> cnt <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">50</span><span style="color: #000000;">&#41;</span>
	            <span style="color: #000000;">&#123;</span>
	            	fs<span style="color: #000000; font-weight: bold;">--</span>;
	            	cnt<span style="color: #000000; font-weight: bold;">++</span>;
	            	fit<span style="color: #000000;">&#40;</span>fs, cnt<span style="color: #000000;">&#41;</span>;
	            <span style="color: #000000;">&#125;</span>
&nbsp;
	            sprite.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
	            sprite.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0x555555,.5<span style="color: #000000;">&#41;</span>;
	            sprite.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span> <span style="color: #000000; font-weight:bold;">10</span>,<span style="color: #000000; font-weight:bold;">10</span>, wSlider.<span style="color: #004993;">value</span>, hSlider.<span style="color: #004993;">value</span> <span style="color: #000000;">&#41;</span>;
	            sprite.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">endFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
	        <span style="color: #000000;">&#125;</span>
&nbsp;
	        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> useTextLines<span style="color: #000000;">&#40;</span> line<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">DisplayObject</span> <span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
	        <span style="color: #000000;">&#123;</span>
	            <span style="color: #6699cc; font-weight: bold;">var</span> displayObject<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">DisplayObject</span> = sprite.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span> line <span style="color: #000000;">&#41;</span>;
	        <span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>Script<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>Application<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Let me know, what you think about it&#8230;</p>
<p><strong>P.S.</strong> I have other example with use <strong>TextFlow</strong> component with <strong>TextFlowTextLineFactory</strong> (graphics included within the text) instead of using <strong>StringTextLineFactory</strong>. I will post it later today or tommorow. Stay tuned</p>
 <div class='series_links'><a href='http://franto.com/text-layout-engine-fit-text-into-rectangle/' title='Text Layout Engine: Fit text into rectangle'>Previous in series</a> </div>
<p><a href="http://feedads.g.doubleclick.net/~a/RjGvEXu_KtEBI25loipEhow5QuU/0/da"><img src="http://feedads.g.doubleclick.net/~a/RjGvEXu_KtEBI25loipEhow5QuU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/RjGvEXu_KtEBI25loipEhow5QuU/1/da"><img src="http://feedads.g.doubleclick.net/~a/RjGvEXu_KtEBI25loipEhow5QuU/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/franto?a=_ScLhjPhSws:txSp7r91by0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/franto?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=_ScLhjPhSws:txSp7r91by0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/franto?i=_ScLhjPhSws:txSp7r91by0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=_ScLhjPhSws:txSp7r91by0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/franto?i=_ScLhjPhSws:txSp7r91by0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=_ScLhjPhSws:txSp7r91by0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/franto?i=_ScLhjPhSws:txSp7r91by0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=_ScLhjPhSws:txSp7r91by0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/franto?i=_ScLhjPhSws:txSp7r91by0:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/franto/~4/_ScLhjPhSws" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://franto.com/text-layout-engine-truncationoptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://franto.com/text-layout-engine-truncationoptions/</feedburner:origLink></item>
		<item>
		<title>blog2</title>
		<link>http://feedproxy.google.com/~r/franto/~3/d9p7Y29lLVU/</link>
		<comments>http://franto.com/blog2/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 11:01:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://franto.com/?p=1056</guid>
		<description><![CDATA[Hey visitors. Thank you for visiting my site. I want to say you, that this blog has different URL structure in past years and I have changed, because it was not nice, that each post on franto.com blog has 2 different URLs. I could just redirect this URL to http://franto.com, but I want to tell you reason...]]></description>
			<content:encoded><![CDATA[<p><strong>Hey Visitor</strong>. Thank you for visiting my site. I want to say you, that this blog has different URL structure in past years and I have changed it, because it was not nice, that each post on <a href="http://franto.com">franto.com blog</a> had 2 different URLs. I could just redirect this URL to <a href="http://franto.com">http://franto.com</a>, but I want to tell you reason, why this URL does not longer exist. If you are looking for something specific on my site and can not find, please let me know in comments and I will get back to you as fast as I can and point you to correct URL. Also if you have anything else you want me say, just write your comment below this post.</p>
<p>Thank you,<br />
Franto</p>

<p><a href="http://feedads.g.doubleclick.net/~a/4TO9lzu5q7hK8QHlf4ZpyEz-dGA/0/da"><img src="http://feedads.g.doubleclick.net/~a/4TO9lzu5q7hK8QHlf4ZpyEz-dGA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/4TO9lzu5q7hK8QHlf4ZpyEz-dGA/1/da"><img src="http://feedads.g.doubleclick.net/~a/4TO9lzu5q7hK8QHlf4ZpyEz-dGA/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/franto?a=d9p7Y29lLVU:r0eb3JUwi58:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/franto?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=d9p7Y29lLVU:r0eb3JUwi58:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/franto?i=d9p7Y29lLVU:r0eb3JUwi58:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=d9p7Y29lLVU:r0eb3JUwi58:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/franto?i=d9p7Y29lLVU:r0eb3JUwi58:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=d9p7Y29lLVU:r0eb3JUwi58:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/franto?i=d9p7Y29lLVU:r0eb3JUwi58:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=d9p7Y29lLVU:r0eb3JUwi58:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/franto?i=d9p7Y29lLVU:r0eb3JUwi58:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/franto/~4/d9p7Y29lLVU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://franto.com/blog2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://franto.com/blog2/</feedburner:origLink></item>
		<item>
		<title>Text Layout Engine: Fit text into rectangle</title>
		<link>http://feedproxy.google.com/~r/franto/~3/FQ9YBNf1Ynk/</link>
		<comments>http://franto.com/text-layout-engine-fit-text-into-rectangle/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 11:15:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Text Layout Engine]]></category>

		<guid isPermaLink="false">http://franto.com/?p=1040</guid>
		<description><![CDATA[This is first example in serie of examples of showcase how to use <strong>Text Layout Engine</strong> (mainly for Flex 3). 

<strong>Here is quick description:</strong> I need to fit text in rectangle (need it for our <strong><a href="http://www.goalscape.com">Goalscape</a></strong> project). I want to be able to change width, height, font size and text of course.]]></description>
			<content:encoded><![CDATA[<div class='series_toc'><h3>Table of contents for Text Layout Engine</h3><ol><li><a href='http://franto.com/text-layout-engine-in-flex-3/' title='Text Layout Engine in Flex 3'>Text Layout Engine in Flex 3</a></li><li>Text Layout Engine: Fit text into rectangle</li><li><a href='http://franto.com/text-layout-engine-truncationoptions/' title='Text Layout Engine: TruncationOptions'>Text Layout Engine: TruncationOptions</a></li></ol></div> <p>This is first example in serie of examples of showcase how to use <strong>Text Layout Engine</strong> (mainly for Flex 3). </p>
<p><strong>Here is quick description:</strong> I need to fit text in rectangle (need it for our <strong><a href="http://www.goalscape.com">Goalscape</a></strong> project). I want to be able to change width, height, font size and text of course. In <strong>Text Layout Engine</strong> this can be done very easily. All you need to do is create correct format for your text, and set <strong>compositionBounds</strong> for text line factory. I will use <strong>StringTextLineFactory</strong> class, which provides a simple way to create <strong>TextLines</strong> from a string. Even I add also <strong>TruncationOptions</strong>, which specifies options for limiting the number of lines of text created by a text line factory and for indicating when lines have been left out.  I&#8217;m using <strong>TruncationOptions</strong>, because I want use maximum of 3 lines and if text is too long I want add &#8230; at the end. This is done automatically in <strong>Text Layout Engine</strong> and I do not need to implement by myself.</p>
<p>Only problem I see, that result .swf file size is over 500kB even builded as Release version (Debug version has 692kB). It&#8217;s because of <strong>Text Layout Engine</strong> and <strong>Flex framework</strong> are included in .swf. But because I will use it in AIR application, it&#8217;s ok for me.</p>
<p>I have created Flash demo for you, but it works just in Flash Player 10, because of Text Layout Engine. Just play with sliders and write your custom text to see effect. In case text will be truncating you will see <span style="color:#008800">green square</span>, otherwise there will be <span style="color:#aa0000">red square</span> (not truncated).<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                        id="TextLayoutEngineExamples" width="100%" height="350"
                        codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
                        <param name="movie" value="http://franto.com/uploads/examples/textLayoutEngine/fit/TextLayoutEngineExamples.swf" />
                        <param name="quality" value="high" />
                        <param name="bgcolor" value="#869ca7" />
                        <param name="allowScriptAccess" value="sameDomain" />
                        <embed src="http://franto.com/uploads/examples/textLayoutEngine/fit/TextLayoutEngineExamples.swf" quality="high" bgcolor="#869ca7"
                                width="100%" height="350" name="TextLayoutEngineExamples" align="middle"
                                play="true"
                                loop="false"
                                quality="high"
                                allowScriptAccess="sameDomain"
                                type="application/x-shockwave-flash"
                                pluginspage="http://www.adobe.com/go/getflashplayer">
                        </embed>
        </object>
</p>
<p>And this is source code</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>xml <span style="color: #004993;">version</span>=<span style="color: #990000;">&quot;1.0&quot;</span> encoding=<span style="color: #990000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Application xmlns<span style="color: #000000; font-weight: bold;">:</span>mx=<span style="color: #990000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> layout=<span style="color: #990000;">&quot;absolute&quot;</span> applicationComplete=<span style="color: #990000;">&quot;fit()&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Style <span style="color: #004993;">source</span>=<span style="color: #990000;">&quot;styles/fonts.css&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>VBox <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;100%&quot;</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;100%&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;100%&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Label <span style="color: #004993;">text</span>=<span style="color: #990000;">&quot;Text:&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>TextInput id=<span style="color: #990000;">&quot;txtInput&quot;</span> <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;100%&quot;</span> <span style="color: #004993;">change</span>=<span style="color: #990000;">&quot;fit()&quot;</span> <span style="color: #004993;">text</span>=<span style="color: #990000;">&quot;Text Layout Engine: Fit Text into Rectangle&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Label <span style="color: #004993;">text</span>=<span style="color: #990000;">&quot;Font Size:&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HSlider id=<span style="color: #990000;">&quot;fsSlider&quot;</span> liveDragging=<span style="color: #990000;">&quot;true&quot;</span> minimum=<span style="color: #990000;">&quot;6&quot;</span> maximum=<span style="color: #990000;">&quot;50&quot;</span> snapInterval=<span style="color: #990000;">&quot;1&quot;</span> <span style="color: #004993;">value</span>=<span style="color: #990000;">&quot;14&quot;</span>
				<span style="color: #004993;">change</span>=<span style="color: #990000;">&quot;fit()&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Label <span style="color: #004993;">text</span>=<span style="color: #990000;">&quot;Text Width:&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HSlider id=<span style="color: #990000;">&quot;wSlider&quot;</span> liveDragging=<span style="color: #990000;">&quot;true&quot;</span> minimum=<span style="color: #990000;">&quot;0&quot;</span> maximum=<span style="color: #990000;">&quot;500&quot;</span> snapInterval=<span style="color: #990000;">&quot;1&quot;</span> <span style="color: #004993;">value</span>=<span style="color: #990000;">&quot;100&quot;</span>
				<span style="color: #004993;">change</span>=<span style="color: #990000;">&quot;fit()&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Label <span style="color: #004993;">text</span>=<span style="color: #990000;">&quot;Text Height:&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HSlider id=<span style="color: #990000;">&quot;hSlider&quot;</span> liveDragging=<span style="color: #990000;">&quot;true&quot;</span> minimum=<span style="color: #990000;">&quot;0&quot;</span> maximum=<span style="color: #990000;">&quot;500&quot;</span> snapInterval=<span style="color: #990000;">&quot;1&quot;</span> <span style="color: #004993;">value</span>=<span style="color: #990000;">&quot;100&quot;</span>
				<span style="color: #004993;">change</span>=<span style="color: #990000;">&quot;fit()&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Label <span style="color: #004993;">text</span>=<span style="color: #990000;">&quot;isTruncated?&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Canvas <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;20&quot;</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;20&quot;</span> <span style="color: #004993;">backgroundColor</span>=<span style="color: #990000;">&quot;0xff0000&quot;</span> 
				<span style="color: #004993;">visible</span>=<span style="color: #990000;">&quot;{!isTruncated}&quot;</span> includeInLayout=<span style="color: #990000;">&quot;{!isTruncated}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Canvas <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;20&quot;</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;20&quot;</span> <span style="color: #004993;">backgroundColor</span>=<span style="color: #990000;">&quot;0x00aa00&quot;</span> 
				<span style="color: #004993;">visible</span>=<span style="color: #990000;">&quot;{isTruncated}&quot;</span> includeInLayout=<span style="color: #990000;">&quot;{isTruncated}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>HBox<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>UIComponent id=<span style="color: #990000;">&quot;ui&quot;</span> <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;100%&quot;</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;100%&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>UIComponent<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>VBox<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;</span>mx<span style="color: #000000; font-weight: bold;">:</span>Script<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span>
			<span style="color: #0033ff; font-weight: bold;">import</span> flashx.textLayout.factory.TruncationOptions;
			<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.engine.Kerning;
			<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.engine.FontLookup;
			<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span>.engine.RenderingMode;
			<span style="color: #0033ff; font-weight: bold;">import</span> flashx.textLayout.formats.TextLayoutFormat;
			<span style="color: #0033ff; font-weight: bold;">import</span> flashx.textLayout.factory.StringTextLineFactory;
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> sprite<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Sprite</span>;
&nbsp;
			<span style="color: #000000;">&#91;</span>Bindable<span style="color: #000000;">&#93;</span> <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> isTruncated<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span>;
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> fit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
	        <span style="color: #000000;">&#123;</span>
	        	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>sprite == <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span>
	        	<span style="color: #000000;">&#123;</span>
	        		sprite = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Sprite</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
	        		ui.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>sprite<span style="color: #000000;">&#41;</span>;
	        	<span style="color: #000000;">&#125;</span>
	        	<span style="color: #0033ff; font-weight: bold;">while</span> <span style="color: #000000;">&#40;</span>sprite.<span style="color: #004993;">numChildren</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>
	        	<span style="color: #000000;">&#123;</span>
	        		sprite.<span style="color: #004993;">removeChildAt</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>;
	        	<span style="color: #000000;">&#125;</span>
	            <span style="color: #6699cc; font-weight: bold;">var</span> factory<span style="color: #000000; font-weight: bold;">:</span>StringTextLineFactory = <span style="color: #0033ff; font-weight: bold;">new</span> StringTextLineFactory<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	            factory.compositionBounds = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Rectangle</span><span style="color: #000000;">&#40;</span> <span style="color: #000000; font-weight:bold;">10</span>, <span style="color: #000000; font-weight:bold;">10</span>, wSlider.<span style="color: #004993;">value</span>, hSlider.<span style="color: #004993;">value</span> <span style="color: #000000;">&#41;</span>;
&nbsp;
	            <span style="color: #6699cc; font-weight: bold;">var</span> format<span style="color: #000000; font-weight: bold;">:</span>TextLayoutFormat = <span style="color: #0033ff; font-weight: bold;">new</span> TextLayoutFormat<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
	            format.fontFamily = <span style="color: #990000;">&quot;Verdana, _sans&quot;</span>;
	            format.<span style="color: #004993;">fontSize</span> = fsSlider.<span style="color: #004993;">value</span>;
	            format.<span style="color: #004993;">color</span> = 0x000000;
	            format.textAlpha = .9;
	            format.<span style="color: #004993;">kerning</span> = Kerning.ON;
	            format.renderingMode = RenderingMode.CFF;
				format.fontLookup = FontLookup.EMBEDDED_CFF;
	            factory.spanFormat = format;
&nbsp;
				<span style="color: #6699cc; font-weight: bold;">var</span> truncationOptions<span style="color: #000000; font-weight: bold;">:</span>TruncationOptions = <span style="color: #0033ff; font-weight: bold;">new</span> TruncationOptions<span style="color: #000000;">&#40;</span><span style="color: #990000;">'...'</span>,<span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#41;</span>;
				factory.truncationOptions = truncationOptions;				
&nbsp;
&nbsp;
&nbsp;
	            factory.<span style="color: #004993;">text</span> = txtInput.<span style="color: #004993;">text</span>;
	            factory.createTextLines<span style="color: #000000;">&#40;</span> useTextLines <span style="color: #000000;">&#41;</span>;
&nbsp;
	            isTruncated = factory.isTruncated;
&nbsp;
	            sprite.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
	            sprite.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0x555555,.5<span style="color: #000000;">&#41;</span>;
	            sprite.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span> <span style="color: #000000; font-weight:bold;">10</span>,<span style="color: #000000; font-weight:bold;">10</span>, wSlider.<span style="color: #004993;">value</span>, hSlider.<span style="color: #004993;">value</span> <span style="color: #000000;">&#41;</span>;
	            sprite.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">endFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
	        <span style="color: #000000;">&#125;</span>
&nbsp;
	        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> useTextLines<span style="color: #000000;">&#40;</span> line<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">DisplayObject</span> <span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
	        <span style="color: #000000;">&#123;</span>
	            <span style="color: #6699cc; font-weight: bold;">var</span> displayObject<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">DisplayObject</span> = sprite.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span> line <span style="color: #000000;">&#41;</span>;
	        <span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>Script<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>mx<span style="color: #000000; font-weight: bold;">:</span>Application<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

 <div class='series_links'><a href='http://franto.com/text-layout-engine-in-flex-3/' title='Text Layout Engine in Flex 3'>Previous in series</a> <a href='http://franto.com/text-layout-engine-truncationoptions/' title='Text Layout Engine: TruncationOptions'>Next in series</a></div>
<p><a href="http://feedads.g.doubleclick.net/~a/EGMO1vegPfgWHfHcBs7zq1VYRmw/0/da"><img src="http://feedads.g.doubleclick.net/~a/EGMO1vegPfgWHfHcBs7zq1VYRmw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/EGMO1vegPfgWHfHcBs7zq1VYRmw/1/da"><img src="http://feedads.g.doubleclick.net/~a/EGMO1vegPfgWHfHcBs7zq1VYRmw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/franto?a=FQ9YBNf1Ynk:l2Aljr6U4fo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/franto?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=FQ9YBNf1Ynk:l2Aljr6U4fo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/franto?i=FQ9YBNf1Ynk:l2Aljr6U4fo:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=FQ9YBNf1Ynk:l2Aljr6U4fo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/franto?i=FQ9YBNf1Ynk:l2Aljr6U4fo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=FQ9YBNf1Ynk:l2Aljr6U4fo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/franto?i=FQ9YBNf1Ynk:l2Aljr6U4fo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/franto?a=FQ9YBNf1Ynk:l2Aljr6U4fo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/franto?i=FQ9YBNf1Ynk:l2Aljr6U4fo:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/franto/~4/FQ9YBNf1Ynk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://franto.com/text-layout-engine-fit-text-into-rectangle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://franto.com/text-layout-engine-fit-text-into-rectangle/</feedburner:origLink></item>
	</channel>
</rss>
