﻿<?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>Keith Hair &#187; editor</title>
	<atom:link href="http://keith-hair.net/blog/tag/editor/feed/" rel="self" type="application/rss+xml" />
	<link>http://keith-hair.net/blog</link>
	<description>Scripting is fun like any other hobby</description>
	<lastBuildDate>Sat, 28 Jan 2012 05:04:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Is application ran from editor or online?</title>
		<link>http://keith-hair.net/blog/2011/01/20/is-application-ran-from-editor-or-online/</link>
		<comments>http://keith-hair.net/blog/2011/01/20/is-application-ran-from-editor-or-online/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 06:17:06 +0000</pubDate>
		<dc:creator>Keith H</dc:creator>
				<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[Regular Expressions]]></category>

		<guid isPermaLink="false">http://keith-hair.net/blog/?p=275</guid>
		<description><![CDATA[For most situations when I want to only execute code of an application running from the editor, I use regular expressions to check the application's url. You could use other regular expressions for your own situation. In Flash Builder 4 &#160; &#160; public static function isDevEnvironment&#40;&#41;:Boolean &#123; return mx.core.FlexGlobals.topLevelApplication.url.search&#40;/^file&#124;^\w:\\ig/&#41; != -1; &#125; &#160; In Flex [...]]]></description>
			<content:encoded><![CDATA[<p>For most situations when I want to only execute code of an application running from the editor, I use regular expressions to check the application's url.<br />
You could use other regular expressions for your own situation.</p>
<p><strong>In Flash Builder 4</strong></p>
<pre class="actionscript">&nbsp;
&nbsp;
                        <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> isDevEnvironment<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">return</span> mx.<span style="color: #006600;">core</span>.<span style="color: #006600;">FlexGlobals</span>.<span style="color: #006600;">topLevelApplication</span>.<span style="color: #0066CC;">url</span>.<span style="color: #006600;">search</span><span style="color: #66cc66;">&#40;</span>/^file|^\w:\\ig/<span style="color: #66cc66;">&#41;</span> != <span style="color: #cc66cc;">-1</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p><strong>In Flex Builder 3</strong></p>
<pre class="actionscript">&nbsp;
			<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> isDevEnvironment<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">return</span> mx.<span style="color: #006600;">core</span>.<span style="color: #006600;">Application</span>.<span style="color: #006600;">application</span>.<span style="color: #0066CC;">url</span>.<span style="color: #006600;">search</span><span style="color: #66cc66;">&#40;</span>/^file|^\w:\\ig/<span style="color: #66cc66;">&#41;</span> != <span style="color: #cc66cc;">-1</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<a href='http://www.hexosearch.com/se/submit.aspx?zlvz=&zqz=&zurlz=http://keith-hair.net/blog/2011/01/20/is-application-ran-from-editor-or-online/&ztz=Is application ran from editor or online?'><img src='http://keith-hair.net/blog/wp-content/plugins/hexosearch-button/logo16x16.png' width='16' height='16' border='0' style='vertical-align:middle' alt='Vote in HexoSearch' title='Vote in HexoSearch' /></a>]]></content:encoded>
			<wfw:commentRss>http://keith-hair.net/blog/2011/01/20/is-application-ran-from-editor-or-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m Testing Foam physics in Flex</title>
		<link>http://keith-hair.net/blog/2009/08/01/im-testing-foam-physics-in-flex/</link>
		<comments>http://keith-hair.net/blog/2009/08/01/im-testing-foam-physics-in-flex/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 05:49:35 +0000</pubDate>
		<dc:creator>Keith H</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[Foam]]></category>
		<category><![CDATA[Physics Engine]]></category>
		<category><![CDATA[Polygons]]></category>

		<guid isPermaLink="false">http://keith-hair.net/blog/?p=105</guid>
		<description><![CDATA[There are a lot of Flash physics engines available to use. I've only tried Box2D, APE, and Foam. Foam is my favorite so far. I actually like the options of Box2D better but it's just not as ActionScript-friendly as Foam. Foam sets up the easiest of these 3 engines for an ActionScript only project...In my [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lot of Flash physics engines available to use. I've only tried Box2D, APE, and Foam.<br />
<a href="http://drawlogic.com/2007/11/07/as3-foam-2d-physics-engine/">Foam </a>is my favorite so far. I actually like the options of Box2D better but it's just not as ActionScript-friendly as Foam. </p>
<p>Foam sets up the easiest of these 3 engines for an ActionScript only project...In my opinion, setting it up to use in my Flex projects takes a little more work depending on what I use it for. Seeing the end result of it is fun to watch.</p>
<p>Below I'm currently using my <a href="/blog/examples/polygon_physics/">polygon editor</a> to test Foam out in Flex.</p>
<p><a href="http://keith-hair.net/blog/examples/polygon_physics/"><img src="/blog/examples/polygon_physics/physics_polygons.jpg" alt="Click to view example" /></a></p>
<a href='http://www.hexosearch.com/se/submit.aspx?zlvz=&zqz=&zurlz=http://keith-hair.net/blog/2009/08/01/im-testing-foam-physics-in-flex/&ztz=I\'m Testing Foam physics in Flex'><img src='http://keith-hair.net/blog/wp-content/plugins/hexosearch-button/logo16x16.png' width='16' height='16' border='0' style='vertical-align:middle' alt='Vote in HexoSearch' title='Vote in HexoSearch' /></a>]]></content:encoded>
			<wfw:commentRss>http://keith-hair.net/blog/2009/08/01/im-testing-foam-physics-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

