<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Bryan's Dev Blog &#187; flex</title>
	<atom:link href="http://bryanlangdon.com/blog/category/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://bryanlangdon.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 18 Dec 2008 16:59:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>&#8216;W&#8217; Arial text cut off fix for as2 and as3</title>
		<link>http://bryanlangdon.com/blog/2008/12/15/w-arial-text-cut-off-fix-for-as2-and-as3/</link>
		<comments>http://bryanlangdon.com/blog/2008/12/15/w-arial-text-cut-off-fix-for-as2-and-as3/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 17:52:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[actionscript 2]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://bryanlangdon.com/blog/?p=69</guid>
		<description><![CDATA[Three times today while browsing the internet I saw the front part of &#8220;W&#8221; get cut off in a swf, so I thought I would post one way to deal with this.
All that you need to do is set your TextFormat leftMargin to .6.  Not entirely sure why its .6, but I checked and [...]]]></description>
			<content:encoded><![CDATA[<p>Three times today while browsing the internet I saw the front part of &#8220;W&#8221; get cut off in a swf, so I thought I would post one way to deal with this.<br />
All that you need to do is set your TextFormat leftMargin to .6.  Not entirely sure why its .6, but I checked and in both as2 and as3 .6 solves it and .5 does not.  Most likely it is rounding to 1 pixel, but I have found .6 can be farther to the left than setting it to 1.  The reasoning for making it as small as possible is so that you can do it to all TextFormat instances used on dynamic TextFields without shifting text throughout your app to the right.</p>
<p>So in both as2 and as3 -<br />
var tf:TextFormat = new TextFormat();<br />
tf.leftMargin = .6;<br />
textFieldYourUsing.setTextFormat(tf);</p>
<p>Here is an example in as3 -<br />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="WCutOffExample" width="300" height="100"codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"><param name="movie" value="http://bryanlangdon.com/content/blog/cutoffw/wcut_example_as3.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="allowScriptAccess" value="sameDomain" /><embed src="http://bryanlangdon.com/content/blog/cutoffw/wcut_example_as3.swf" quality="high" bgcolor="#ffffff" width="300" height="100" name="WCutOffExample" 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>Here is an example in as2 -<br />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="WCutOffExample" width="300" height="100"codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"><param name="movie" value="http://bryanlangdon.com/content/blog/cutoffw/wcut_example_as2.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="allowScriptAccess" value="sameDomain" /><embed src="http://bryanlangdon.com/content/blog/cutoffw/wcut_example_as2.swf" quality="high" bgcolor="#ffffff" width="300" height="100" name="WCutOffExample" 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>You can grab the not very interesting <a href="http://bryanlangdon.com/content/blog/cutoffw/cutoffWExample.zip">source code here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bryanlangdon.com/blog/2008/12/15/w-arial-text-cut-off-fix-for-as2-and-as3/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

