<?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>deleteaso &#187; JSFL</title>
	<atom:link href="http://deleteaso.com/category/jsfl/feed/" rel="self" type="application/rss+xml" />
	<link>http://deleteaso.com</link>
	<description>When something's not working delete aso files</description>
	<lastBuildDate>Tue, 25 Oct 2011 13:32:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Fuel ANT Tasks</title>
		<link>http://deleteaso.com/fuel-ant-tasks/</link>
		<comments>http://deleteaso.com/fuel-ant-tasks/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 09:39:31 +0000</pubDate>
		<dc:creator>julian</dc:creator>
				<category><![CDATA[ANT]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JSFL]]></category>

		<guid isPermaLink="false">http://deleteaso.com/?p=201</guid>
		<description><![CDATA[At Fuel Industries our projects always start with a FLA, but we use FDT for all of our coding. We wanted to have a way that we could publish our projects from FDT as well as run daily automatic builds. This is easy when working with Flex because Flex has a command line compiler, but [...]]]></description>
			<content:encoded><![CDATA[<p>At Fuel Industries our projects always start with a FLA, but we use FDT for all of our coding. We wanted to have a way that we could publish our projects from FDT as well as run daily automatic builds. This is easy when working with Flex because Flex has a command line compiler, but Flash doesn&#8217;t. So we wrote custom ANT tasks in Java that will allow us to publish fla&#8217;s in multiple ways.</p>
<p>Here are a few examples of some of the things you can do.</p>
<p>First you can simply compile fla&#8217;s</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;fla_publish&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;flash<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fla</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${src}/redsquare.fla&quot;</span> <span style="color: #000066;">build</span>=<span style="color: #ff0000;">&quot;publish&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fla</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${src}/bluesquare.fla&quot;</span> <span style="color: #000066;">build</span>=<span style="color: #ff0000;">&quot;export&quot;</span> <span style="color: #000066;">swf</span>=<span style="color: #ff0000;">&quot;${src}/bluesquare.swf&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fla</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${src}/greensquare.fla&quot;</span> <span style="color: #000066;">build</span>=<span style="color: #ff0000;">&quot;test&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/flash<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The fla task can take multiple different types of values for the build parameter &#8211; publish, test, and export.<br />
publish will simply publish the file at the current settings set for the fla.<br />
test will compile and run the swf in the Flash IDE. This is like hitting cmd-enter/ctrl-enter<br />
export will export the swf. In order to use this mode you must specify a output swf file.</p>
<p>You can also publish and test Flash CS3 Flp files</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;flp_publish&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;flash<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;flp</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${src}/fuelanttask.flp&quot;</span> <span style="color: #000066;">build</span>=<span style="color: #ff0000;">&quot;publish&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/flash<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>If set the build mode to &#8220;test&#8221; it will look for the flp project default file and compile that project last and test the default file.<br />
The nice thing about using the flp task is that if one of your files has a compile error, it will stop the build process and alert you of the error. This is different then the IDE as it just keeps compile the project and you won&#8217;t see if one of your files compiled incorrectly.</p>
<p>We have also created a task called buildnumbercommand. This task gets the local SVN revision number and inserts it into a BuildNumber.as file. This way we have the build number accessible in ActionScript and we are able to display it automatically in our files. For instance we place ours in the right click menu so our clients can see what version of the build they are looking at.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;version&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;buildnumbercommand</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;${src}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The path parameter is the directory in which the BuildNumber.as file is located. Below is an example of BuildNumber.as</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> BuildNumber 
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> static const BUILD_NUMBER <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;1&quot;</span>;
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Here are some of the other parameters for the Tasks</p>
<h2>flash task</h2>
<p><b>path</b> &#8211; This is needed on Windows only. This is the path to your Flash IDE executable and is defaulted to the default install location for CS3 and CS4. C:\Program Files\Adobe\Adobe Flash CS3\Flash.exe and C:\Program Files\Adobe\Adobe Flash CS4\Flash.exe. If you have the Flash IDE installed in these locations you can omit this parameter.</p>
<p><b>version</b> &#8211; accepts either &#8220;CS3&#8243; or &#8220;CS4&#8243;. The default is &#8220;CS3&#8243;. This is used to determine which IDE to compile your files in. &#8220;CS3&#8243; is the default and can be omitted if you want to use CS3.</p>
<p><b>deleteaso</b> &#8211; true | false will delete your aso files before compiling any files. The default is false.</p>
<p><b>closeDocs</b> &#8211; true | false will close your fla after it&#8217;s compiled. The default is false. This is ignored when compiling a flp project and will always close it afterwards.</p>
<p><b>quit</b> &#8211; true | false will close the Flash IDE after all the files have been compiled.</p>
<p><b>verbose</b> &#8211; true | false has some more output messages during compilation.</p>
<h2>fla task</h2>
<p><b>file</b> &#8211; the path to your fla file</p>
<p><b>build</b> &#8211; valid values are &#8220;export&#8221;, &#8220;publish&#8221;, &#8220;test&#8221;. The default is &#8220;publish&#8221;.<br />
publish will simply publish the file at the current settings set for the fla.<br />
test will compile and run the swf in the Flash IDE. This is like hitting cmd-enter/ctrl-enter<br />
export will export the swf. In order to use this mode you must specify a output swf file.</p>
<p><b>swf</b> &#8211; the file path to a swf to be compiled. This is only needed when the build parameter is set to &#8220;export&#8221; and will be ignored otherwise.</p>
<h2>flp task</h2>
<p><b>file</b> &#8211; the path to your flp file</p>
<p><b>build</b> &#8211; valid values are &#8220;export&#8221;, &#8220;publish&#8221;, &#8220;test&#8221;. The default is &#8220;publish&#8221;.<br />
If set the build mode to &#8220;test&#8221; it will look for the flp project default file and compile that project last and test the default file.</p>
<p>UPDATE : the ANT tasks have been put up on Google code. The source, examples, documentation, and the compiled jar can be found there</p>
<p>http://code.google.com/p/fuelanttasks/</p>
<p>This is a video of me showing how to use them at Flash On The Beach during the speaker throwdown<br />
<object width="400" height="220"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7287099&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7287099&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="220"></embed></object>
<p><a href="http://vimeo.com/7287099">FOTB09 &#8211; Jam Throwdown &#8211; Julian Dolce</a> from <a href="http://vimeo.com/flashonthebeach">John Davey</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://deleteaso.com/fuel-ant-tasks/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Fix Textfields JSFL</title>
		<link>http://deleteaso.com/fix-textfields-jsfl/</link>
		<comments>http://deleteaso.com/fix-textfields-jsfl/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 21:48:01 +0000</pubDate>
		<dc:creator>julian</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JSFL]]></category>

		<guid isPermaLink="false">http://deleteaso.com/?p=183</guid>
		<description><![CDATA[Today Seb was having some issues when dealing with embedded fonts &#8211; read his post. He came up with some ActionScript ways to get around it. Well another way would be to use JSFL. A couple of my team members at Fuel Industries wrote the following JSFL script. It goes through your library and searches [...]]]></description>
			<content:encoded><![CDATA[<p>Today Seb was having some issues when dealing with embedded fonts &#8211; <a href="http://www.sebleedelisle.com/2009/08/font-embedding-wtf-in-flash/" target="_blank">read his post.</a> He came up with some ActionScript ways to get around it. Well another way would be to use JSFL. A couple of my team members at Fuel Industries wrote the following JSFL script. It goes through your library and searches out any dynamic textfields. Once it finds one it makes sure it&#8217;s on a whole pixel, turns the auto kern off, embeds &#8220;UpperCase, LowerCase, Numerals, Punctuation&#8221; characters, and makes it not selectable. But you could make it do pretty much anything you can through JSFL.</p>
<p></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">fl.<span style="color: #660066;">outputPanel</span>.<span style="color: #660066;">clear</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
scanLibrary<span style="color: #009900;">&#40;</span>fl.<span style="color: #660066;">getDocumentDOM</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">library</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> getIsWholeInt<span style="color: #009900;">&#40;</span>n<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> s <span style="color: #339933;">=</span> String<span style="color: #009900;">&#40;</span>n<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>s.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">else</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> round<span style="color: #009900;">&#40;</span>n<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> s <span style="color: #339933;">=</span> String<span style="color: #009900;">&#40;</span>n<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> a <span style="color: #339933;">=</span> s.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> num <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>a<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> dec <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>a<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>dec <span style="color: #339933;">&gt;=</span> <span style="color: #CC0000;">5</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		num<span style="color: #339933;">++;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">return</span> num<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">/**
 * Scans the supplied flash library for linked classes and makes sure the textfields are set up properly
 * @param 	library		A flash library to scan.
 */</span>
<span style="color: #003366; font-weight: bold;">function</span> scanLibrary<span style="color: #009900;">&#40;</span>library<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> items <span style="color: #339933;">=</span> library.<span style="color: #660066;">items</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> <span style="color: #000066; font-weight: bold;">item</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> replaceCount <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> items.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">item</span> <span style="color: #339933;">=</span> items<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">itemType</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'movie clip'</span><span style="color: #009900;">&#41;</span> 
		<span style="color: #009900;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> timeline <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">timeline</span><span style="color: #339933;">;</span>
			<span style="color: #003366; font-weight: bold;">var</span> h <span style="color: #339933;">=</span> timeline.<span style="color: #660066;">layerCount</span><span style="color: #339933;">;</span>
&nbsp;
			library.<span style="color: #660066;">selectItem</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			library.<span style="color: #660066;">editItem</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>h<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #003366; font-weight: bold;">var</span> k <span style="color: #339933;">=</span> timeline.<span style="color: #660066;">layers</span><span style="color: #009900;">&#91;</span>h<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">frameCount</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>k<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span>
				<span style="color: #009900;">&#123;</span>
					<span style="color: #003366; font-weight: bold;">var</span> j <span style="color: #339933;">=</span> timeline.<span style="color: #660066;">layers</span><span style="color: #009900;">&#91;</span>h<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">frames</span><span style="color: #009900;">&#91;</span>k<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">elements</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>j<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span>
					<span style="color: #009900;">&#123;</span>
						<span style="color: #003366; font-weight: bold;">var</span> elems <span style="color: #339933;">=</span> timeline.<span style="color: #660066;">layers</span><span style="color: #009900;">&#91;</span>h<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">frames</span><span style="color: #009900;">&#91;</span>k<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">elements</span><span style="color: #339933;">;</span>
						<span style="color: #003366; font-weight: bold;">var</span> p <span style="color: #339933;">=</span> elems.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>
&nbsp;
						<span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>p<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span>
						<span style="color: #009900;">&#123;</span>
							<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>elems<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">elementType</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;text&quot;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>elems<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">textType</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;dynamic&quot;</span> <span style="color: #339933;">||</span> elems<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">textType</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;input&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
							<span style="color: #009900;">&#123;</span>
								<span style="color: #006600; font-style: italic;">//Change the Static Text Fields to Dynamic</span>
								<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>elems<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">textType</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;static&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
									elems<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">textType</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;dynamic&quot;</span><span style="color: #339933;">;</span>
								<span style="color: #009900;">&#125;</span>
&nbsp;
								<span style="color: #006600; font-style: italic;">//Handle all Dynamic TextFields</span>
								<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>elems<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">textType</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;dynamic&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
									<span style="color: #006600; font-style: italic;">//Remove the ability to be selectable</span>
									elems<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">selectable</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
								<span style="color: #009900;">&#125;</span>
&nbsp;
								<span style="color: #006600; font-style: italic;">//Handle all Dynamic or Input Textfields</span>
&nbsp;
								<span style="color: #006600; font-style: italic;">//Remove the auto kern attribute</span>
								elems<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">setTextAttr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'autoKern'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
								<span style="color: #006600; font-style: italic;">//Embed fonts UpperCase, LowerCase, Numerals, Punctuation</span>
								elems<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">embedRanges</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;1|2|3|4&quot;</span><span style="color: #339933;">;</span>
&nbsp;
								<span style="color: #006600; font-style: italic;">//Pop onto whole pixel</span>
								<span style="color: #003366; font-weight: bold;">var</span> matX <span style="color: #339933;">=</span> elems<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">matrix</span><span style="color: #339933;">;</span>
								<span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> matX.<span style="color: #660066;">tx</span><span style="color: #339933;">;</span>
								<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>getIsWholeInt<span style="color: #009900;">&#40;</span>x<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
								<span style="color: #009900;">&#123;</span>
									matX.<span style="color: #660066;">tx</span> <span style="color: #339933;">=</span> round<span style="color: #009900;">&#40;</span>x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
									elems<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">matrix</span> <span style="color: #339933;">=</span> matX<span style="color: #339933;">;</span>
								<span style="color: #009900;">&#125;</span>
&nbsp;
								<span style="color: #003366; font-weight: bold;">var</span> matY <span style="color: #339933;">=</span> elems<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">matrix</span><span style="color: #339933;">;</span>
								<span style="color: #003366; font-weight: bold;">var</span> y <span style="color: #339933;">=</span> matY.<span style="color: #660066;">ty</span><span style="color: #339933;">;</span>
								<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>getIsWholeInt<span style="color: #009900;">&#40;</span>y<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
								<span style="color: #009900;">&#123;</span>
									matY.<span style="color: #660066;">ty</span> <span style="color: #339933;">=</span> round<span style="color: #009900;">&#40;</span>y<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
									elems<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">matrix</span> <span style="color: #339933;">=</span> matY<span style="color: #339933;">;</span>
								<span style="color: #009900;">&#125;</span>
&nbsp;
							<span style="color: #009900;">&#125;</span>
						<span style="color: #009900;">&#125;</span>
&nbsp;
					<span style="color: #009900;">&#125;</span>
&nbsp;
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://deleteaso.com/fix-textfields-jsfl/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

