<?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"
	>

<channel>
	<title>Keith Hair</title>
	<atom:link href="http://keith-hair.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://keith-hair.net/blog</link>
	<description>Scripting is fun like any other hobby</description>
	<pubDate>Thu, 16 Oct 2008 01:36:19 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Cylons vs Terminators</title>
		<link>http://keith-hair.net/blog/2008/10/15/cylons-vs-terminators/</link>
		<comments>http://keith-hair.net/blog/2008/10/15/cylons-vs-terminators/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 01:36:19 +0000</pubDate>
		<dc:creator>Keith H</dc:creator>
		
		<category><![CDATA[SciFi]]></category>

		<category><![CDATA[Cylons]]></category>

		<category><![CDATA[polls]]></category>

		<category><![CDATA[Terminator]]></category>

		<guid isPermaLink="false">http://keith-hair.net/blog/?p=26</guid>
		<description><![CDATA[ Judging by intelligence and strength, which robot life form would win in a battle to extinction?    (  polls)Both machines have demonstrated creative uses of intelligent strategy and brute force in various movies and TV shows.
All specs and info from movies and literature is fair game...so who do you'd think would [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" language="javascript" src="http://s3.polldaddy.com/p/1000117.js"></script><noscript> <a href ="http://answers.polldaddy.com/poll/1000117/" >Judging by intelligence and strength, which robot life form would win in a battle to extinction?</a>  <br/> <span style="font-size:9px;"> (<a href ="http://www.polldaddy.com">  polls</a>)</span></noscript>Both machines have demonstrated creative uses of intelligent strategy and brute force in various movies and TV shows.<br />
All specs and info from movies and literature is fair game...so who do you'd think would win and why.</p>
]]></content:encoded>
			<wfw:commentRss>http://keith-hair.net/blog/2008/10/15/cylons-vs-terminators/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Resizing width and height proportionately</title>
		<link>http://keith-hair.net/blog/2008/10/13/resizing-width-and-height-proportionately/</link>
		<comments>http://keith-hair.net/blog/2008/10/13/resizing-width-and-height-proportionately/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 06:06:36 +0000</pubDate>
		<dc:creator>Keith H</dc:creator>
		
		<category><![CDATA[ActionScript 3]]></category>

		<category><![CDATA[Contrain Proportions]]></category>

		<category><![CDATA[Porportional]]></category>

		<category><![CDATA[Resize]]></category>

		<guid isPermaLink="false">http://keith-hair.net/blog/?p=25</guid>
		<description><![CDATA[If you use Photoshop you probably appreciate the "Constrain Proportions" checkbox found in some of the application's dialogs and menus.
I like to have this same ability when I'm writing ActionScript to resize objects proportionately too.
Here I use the functions to set the sizes so when I set width, height is changed accordingly.
The same for setting [...]]]></description>
			<content:encoded><![CDATA[<p>If you use Photoshop you probably appreciate the "Constrain Proportions" checkbox found in some of the application's dialogs and menus.</p>
<p>I like to have this same ability when I'm writing ActionScript to resize objects proportionately too.<br />
Here I use the functions to set the sizes so when I set width, height is changed accordingly.<br />
The same for setting height, the width is changed accordingly.</p>
<p><em>*Note: I set the inputs to limit the width and height to 500.</em><br />

<object	type="application/x-shockwave-flash"
			data="/blog/examples/sizing/constrain_size.swf"
			width="550"
			height="400">
	<param name="movie" value="/blog/examples/sizing/constrain_size.swf" />
</object>
<p>Here are two functions for performing proportional resizing by both width and height...<br />
<span id="more-25"></span></p>
<pre class="actionscript">&nbsp;
<span style="color: #808080; font-style: italic;">/*---------------------------------------------
Resize proportionately by width.
Returns an Object with new proportionate &quot;width&quot; and &quot;height&quot; properties.
After passing the current width, current height and  a new width.
-----------------------------------------------*/</span>
<span style="color: #000000; font-weight: bold;">function</span> constrainSizeToWidth<span style="color: #66cc66;">&#40;</span>oldW:<span style="color: #0066CC;">Number</span>,oldH:<span style="color: #0066CC;">Number</span>,newW:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Object</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">width</span>:newW,<span style="color: #0066CC;">height</span>:newW / oldW * oldH<span style="color: #66cc66;">&#125;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*---------------------------------------------
Resize proportionately by height.
Returns an Object with new proportionate &quot;width&quot; and &quot;height&quot; properties.
After passing the current width, current height and  a new height.
-----------------------------------------------*/</span>
<span style="color: #000000; font-weight: bold;">function</span> constrainSizeToHeight<span style="color: #66cc66;">&#40;</span>oldW:<span style="color: #0066CC;">Number</span>,oldH:<span style="color: #0066CC;">Number</span>,newH:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Object</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">width</span>:newH / oldH * oldW,<span style="color: #0066CC;">height</span>:newH<span style="color: #66cc66;">&#125;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://keith-hair.net/blog/2008/10/13/resizing-width-and-height-proportionately/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Line to Polygon intersection data</title>
		<link>http://keith-hair.net/blog/2008/08/08/line-to-polygon-intersection-data/</link>
		<comments>http://keith-hair.net/blog/2008/08/08/line-to-polygon-intersection-data/#comments</comments>
		<pubDate>Sat, 09 Aug 2008 03:59:24 +0000</pubDate>
		<dc:creator>Keith H</dc:creator>
		
		<category><![CDATA[ActionScript 3]]></category>

		<category><![CDATA[Intersection]]></category>

		<category><![CDATA[Line]]></category>

		<category><![CDATA[Point]]></category>

		<category><![CDATA[Polygon]]></category>

		<guid isPermaLink="false">http://keith-hair.com/blog/?p=24</guid>
		<description><![CDATA[This Actionscript 3 function returns some properties that are about a line-to-polygon intersection.
It's useful for knowing all intersection points of a segment intersecting with a polygon, and knowing if the end points of the segment are inside the polygon.

<object	type="application/x-shockwave-flash"
			data="/blog/examples/intersections/line_to_polygon_intersection.swf"
			width="550"
			height="400">
	<param name="movie" value="/blog/examples/intersections/line_to_polygon_intersection.swf" />
</object>

This uses the "lineIntersectLine" function of the earlier post.
&#160;
/*---------------------------------------------------------------------------
Returns an Object with the [...]]]></description>
			<content:encoded><![CDATA[<p>This Actionscript 3 function returns some properties that are about a line-to-polygon intersection.<br />
It's useful for knowing all intersection points of a segment intersecting with a polygon, and knowing if the end points of the segment are inside the polygon.</p>

<object	type="application/x-shockwave-flash"
			data="/blog/examples/intersections/line_to_polygon_intersection.swf"
			width="550"
			height="400">
	<param name="movie" value="/blog/examples/intersections/line_to_polygon_intersection.swf" />
</object>
<p><span id="more-24"></span></p>
<p>This uses the "<a href="http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/">lineIntersectLine</a>" function of the earlier post.</p>
<pre class="actionscript">&nbsp;
<span style="color: #808080; font-style: italic;">/*---------------------------------------------------------------------------
Returns an Object with the following properties:
intersects        -Boolean indicating if an intersection exists.
start_inside      -Boolean indicating if Point A is inside of the polygon.
end_inside       -Boolean indicating if Point B is inside of the polygon.
intersections    -Array of intersection Points along the polygon.
centroid          -A Point indicating &quot;center of mass&quot; of the polygon.
&nbsp;
&quot;pa&quot; is an Array of Points.
----------------------------------------------------------------------------*/</span>
<span style="color: #000000; font-weight: bold;">function</span> lineIntersectPoly<span style="color: #66cc66;">&#40;</span>A : Point, B : Point, pa:<span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Object</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> An:<span style="color: #0066CC;">int</span>=<span style="color: #cc66cc;">1</span>;
	<span style="color: #000000; font-weight: bold;">var</span> Bn:<span style="color: #0066CC;">int</span>=<span style="color: #cc66cc;">1</span>;
	<span style="color: #000000; font-weight: bold;">var</span> C:Point;
	<span style="color: #000000; font-weight: bold;">var</span> D:Point;
	<span style="color: #000000; font-weight: bold;">var</span> i:Point;
	<span style="color: #000000; font-weight: bold;">var</span> cx:<span style="color: #0066CC;">Number</span>=<span style="color: #cc66cc;">0</span>;
	<span style="color: #000000; font-weight: bold;">var</span> cy:<span style="color: #0066CC;">Number</span>=<span style="color: #cc66cc;">0</span>;
	<span style="color: #000000; font-weight: bold;">var</span> result:<span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	pa.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>pa<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
	result.<span style="color: #006600;">intersects</span> = <span style="color: #000000; font-weight: bold;">false</span>;
	result.<span style="color: #006600;">intersections</span>=<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
	result.<span style="color: #006600;">start_inside</span>=<span style="color: #000000; font-weight: bold;">false</span>;
	result.<span style="color: #006600;">end_inside</span>=<span style="color: #000000; font-weight: bold;">false</span>;
	<span style="color: #000000; font-weight: bold;">var</span> n:<span style="color: #0066CC;">int</span>=pa.<span style="color: #006600;">length</span><span style="color: #cc66cc;">-1</span>;
	<span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span>n &gt; <span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
		C=Point<span style="color: #66cc66;">&#40;</span>pa<span style="color: #66cc66;">&#91;</span>n<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>n &gt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
			cx+=C.<span style="color: #006600;">x</span>;
			cy+=C.<span style="color: #006600;">y</span>;
			D=Point<span style="color: #66cc66;">&#40;</span>pa<span style="color: #66cc66;">&#91;</span>n<span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>||Point<span style="color: #66cc66;">&#40;</span>pa<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
			i=lineIntersectLine<span style="color: #66cc66;">&#40;</span>A,B,C,D<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>i != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
				result.<span style="color: #006600;">intersections</span>.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>lineIntersectLine<span style="color: #66cc66;">&#40;</span>A,<span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span>C.<span style="color: #006600;">x</span>+D.<span style="color: #006600;">x</span>,A.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span>,C,D<span style="color: #66cc66;">&#41;</span> != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
				An++;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>lineIntersectLine<span style="color: #66cc66;">&#40;</span>B,<span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span>C.<span style="color: #006600;">x</span>+D.<span style="color: #006600;">x</span>,B.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span>,C,D<span style="color: #66cc66;">&#41;</span> != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
				Bn++;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
		n--;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>An % <span style="color: #cc66cc;">2</span> == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
		result.<span style="color: #006600;">start_inside</span>=<span style="color: #000000; font-weight: bold;">true</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>Bn % <span style="color: #cc66cc;">2</span> == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
		result.<span style="color: #006600;">end_inside</span>=<span style="color: #000000; font-weight: bold;">true</span>;
	<span style="color: #66cc66;">&#125;</span>
	result.<span style="color: #006600;">centroid</span>=<span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span>cx/<span style="color: #66cc66;">&#40;</span>pa.<span style="color: #006600;">length</span><span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#41;</span>,cy/<span style="color: #66cc66;">&#40;</span>pa.<span style="color: #006600;">length</span><span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	result.<span style="color: #006600;">intersects</span> = result.<span style="color: #006600;">intersections</span>.<span style="color: #0066CC;">length</span> &gt; <span style="color: #cc66cc;">0</span>;
	<span style="color: #b1b100;">return</span> result;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://keith-hair.net/blog/2008/08/08/line-to-polygon-intersection-data/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Line to Circle Intersection data</title>
		<link>http://keith-hair.net/blog/2008/08/05/line-to-circle-intersection-data/</link>
		<comments>http://keith-hair.net/blog/2008/08/05/line-to-circle-intersection-data/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 07:45:17 +0000</pubDate>
		<dc:creator>Keith H</dc:creator>
		
		<category><![CDATA[ActionScript 3]]></category>

		<category><![CDATA[Flash 9]]></category>

		<category><![CDATA[Circle]]></category>

		<category><![CDATA[Intersection]]></category>

		<category><![CDATA[Line]]></category>

		<guid isPermaLink="false">http://keith-hair.com/blog/?p=23</guid>
		<description><![CDATA[Here is an ActionScript 3 function that will return intersection information between a segment and circle.
It's useful to me to know if a segment is partially intersecting with a circle or going completely through.

<object	type="application/x-shockwave-flash"
			data="/blog/examples/intersections/line_to_circle_intersection.swf"
			width="550"
			height="400">
	<param name="movie" value="/blog/examples/intersections/line_to_circle_intersection.swf" />
</object>

&#160;
/*---------------------------------------------------------------------------
Returns an Object with the following properties:
	enter			-Intersection Point entering the circle.
	exit			-Intersection Point exiting the circle.
	inside			-Boolean indicating if the [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an ActionScript 3 function that will return intersection information between a segment and circle.<br />
It's useful to me to know if a segment is partially intersecting with a circle or going completely through.<br />

<object	type="application/x-shockwave-flash"
			data="/blog/examples/intersections/line_to_circle_intersection.swf"
			width="550"
			height="400">
	<param name="movie" value="/blog/examples/intersections/line_to_circle_intersection.swf" />
</object><br />
<span id="more-23"></span></p>
<pre class="actionscript">&nbsp;
<span style="color: #808080; font-style: italic;">/*---------------------------------------------------------------------------
Returns an Object with the following properties:
	enter			-Intersection Point entering the circle.
	exit			-Intersection Point exiting the circle.
	inside			-Boolean indicating if the points of the line are inside the circle.
	tangent		-Boolean indicating if line intersect at one point of the circle.
	intersects		-Boolean indicating if there is an intersection of the points and the circle.
&nbsp;
If both &quot;enter&quot; and &quot;exit&quot; are null, or &quot;intersects&quot; == false, it indicates there is no intersection.
&nbsp;
This is a customization of the intersectCircleLine Javascript function found here:
http://www.kevlindev.com/gui/index.htm
----------------------------------------------------------------------------*/</span>
<span style="color: #000000; font-weight: bold;">function</span> lineIntersectCircle<span style="color: #66cc66;">&#40;</span>A : Point, B : Point, C : Point, r : <span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Object</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> result : <span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	result.<span style="color: #006600;">inside</span> = <span style="color: #000000; font-weight: bold;">false</span>;
	result.<span style="color: #006600;">tangent</span> = <span style="color: #000000; font-weight: bold;">false</span>;
	result.<span style="color: #006600;">intersects</span> = <span style="color: #000000; font-weight: bold;">false</span>;
	result.<span style="color: #0066CC;">enter</span>=<span style="color: #000000; font-weight: bold;">null</span>;
	result.<span style="color: #006600;">exit</span>=<span style="color: #000000; font-weight: bold;">null</span>;
	<span style="color: #000000; font-weight: bold;">var</span> a : <span style="color: #0066CC;">Number</span> = <span style="color: #66cc66;">&#40;</span>B.<span style="color: #006600;">x</span> - A.<span style="color: #006600;">x</span><span style="color: #66cc66;">&#41;</span> * <span style="color: #66cc66;">&#40;</span>B.<span style="color: #006600;">x</span> - A.<span style="color: #006600;">x</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #66cc66;">&#40;</span>B.<span style="color: #006600;">y</span> - A.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span> * <span style="color: #66cc66;">&#40;</span>B.<span style="color: #006600;">y</span> - A.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> b : <span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">2</span> * <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>B.<span style="color: #006600;">x</span> - A.<span style="color: #006600;">x</span><span style="color: #66cc66;">&#41;</span> * <span style="color: #66cc66;">&#40;</span>A.<span style="color: #006600;">x</span> - C.<span style="color: #006600;">x</span><span style="color: #66cc66;">&#41;</span> +<span style="color: #66cc66;">&#40;</span>B.<span style="color: #006600;">y</span> - A.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span> * <span style="color: #66cc66;">&#40;</span>A.<span style="color: #006600;">y</span> - C.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> cc : <span style="color: #0066CC;">Number</span> = C.<span style="color: #006600;">x</span> * C.<span style="color: #006600;">x</span> + C.<span style="color: #006600;">y</span> * C.<span style="color: #006600;">y</span> + A.<span style="color: #006600;">x</span> * A.<span style="color: #006600;">x</span> + A.<span style="color: #006600;">y</span> * A.<span style="color: #006600;">y</span> - <span style="color: #cc66cc;">2</span> * <span style="color: #66cc66;">&#40;</span>C.<span style="color: #006600;">x</span> * A.<span style="color: #006600;">x</span> + C.<span style="color: #006600;">y</span> * A.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span> - r * r;
	<span style="color: #000000; font-weight: bold;">var</span> deter : <span style="color: #0066CC;">Number</span> = b * b - <span style="color: #cc66cc;">4</span> * a * cc;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>deter &lt;= <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		result.<span style="color: #006600;">inside</span> = <span style="color: #000000; font-weight: bold;">false</span>;
	<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">e</span> : <span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">sqrt</span> <span style="color: #66cc66;">&#40;</span>deter<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #000000; font-weight: bold;">var</span> u1 : <span style="color: #0066CC;">Number</span> = <span style="color: #66cc66;">&#40;</span> - b + <span style="color: #0066CC;">e</span> <span style="color: #66cc66;">&#41;</span> / <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span> * a <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #000000; font-weight: bold;">var</span> u2 : <span style="color: #0066CC;">Number</span> = <span style="color: #66cc66;">&#40;</span> - b - <span style="color: #0066CC;">e</span> <span style="color: #66cc66;">&#41;</span> / <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span> * a <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>u1 &lt; <span style="color: #cc66cc;">0</span> || u1 &gt; <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> &amp;&amp; <span style="color: #66cc66;">&#40;</span>u2 &lt; <span style="color: #cc66cc;">0</span> || u2 &gt; <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>u1 &lt; <span style="color: #cc66cc;">0</span> &amp;&amp; u2 &lt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> || <span style="color: #66cc66;">&#40;</span>u1 &gt; <span style="color: #cc66cc;">1</span> &amp;&amp; u2 &gt; <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				result.<span style="color: #006600;">inside</span> = <span style="color: #000000; font-weight: bold;">false</span>;
			<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
				result.<span style="color: #006600;">inside</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span> &lt;= u2 &amp;&amp; u2 &lt;= <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				result.<span style="color: #0066CC;">enter</span>=Point.<span style="color: #006600;">interpolate</span> <span style="color: #66cc66;">&#40;</span>A, B, <span style="color: #cc66cc;">1</span> - u2<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span> &lt;= u1 &amp;&amp; u1 &lt;= <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				result.<span style="color: #006600;">exit</span>=Point.<span style="color: #006600;">interpolate</span> <span style="color: #66cc66;">&#40;</span>A, B, <span style="color: #cc66cc;">1</span> - u1<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			result.<span style="color: #006600;">intersects</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>result.<span style="color: #006600;">exit</span> != <span style="color: #000000; font-weight: bold;">null</span> &amp;&amp; result.<span style="color: #0066CC;">enter</span> != <span style="color: #000000; font-weight: bold;">null</span> &amp;&amp; result.<span style="color: #006600;">exit</span>.<span style="color: #006600;">equals</span> <span style="color: #66cc66;">&#40;</span>result.<span style="color: #0066CC;">enter</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				result.<span style="color: #006600;">tangent</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">return</span> result;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://keith-hair.net/blog/2008/08/05/line-to-circle-intersection-data/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Find Intersection Point of two lines in AS3</title>
		<link>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/</link>
		<comments>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 04:07:43 +0000</pubDate>
		<dc:creator>Keith H</dc:creator>
		
		<category><![CDATA[ActionScript 3]]></category>

		<category><![CDATA[Flash 9]]></category>

		<category><![CDATA[Intersection]]></category>

		<guid isPermaLink="false">http://keith-hair.com/blog/?p=22</guid>
		<description><![CDATA[The intersection Point of two lines is useful to know. This is a function to find it in AS3.

<object	type="application/x-shockwave-flash"
			data="/blog/examples/intersections/line_to_line_intersection.swf"
			width="550"
			height="550">
	<param name="movie" value="/blog/examples/intersections/line_to_line_intersection.swf" />
</object>

//---------------------------------------------------------------
//Checks for intersection of Segment if as_seg is true.
//Checks for intersection of Line if as_seg is false.
//Return intersection of Segment &#34;AB&#34; and Segment &#34;EF&#34; as a Point
//Return null if there is no intersection
//---------------------------------------------------------------
function [...]]]></description>
			<content:encoded><![CDATA[<p>The intersection Point of two lines is useful to know. This is a function to find it in AS3.</p>
<p style="text-align: center;">
<object	type="application/x-shockwave-flash"
			data="/blog/examples/intersections/line_to_line_intersection.swf"
			width="550"
			height="550">
	<param name="movie" value="/blog/examples/intersections/line_to_line_intersection.swf" />
</object><br />
<span id="more-22"></span></p>
<pre class="actionscript"><span style="color: #808080; font-style: italic;">//---------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">//Checks for intersection of Segment if as_seg is true.</span>
<span style="color: #808080; font-style: italic;">//Checks for intersection of Line if as_seg is false.</span>
<span style="color: #808080; font-style: italic;">//Return intersection of Segment &quot;AB&quot; and Segment &quot;EF&quot; as a Point</span>
<span style="color: #808080; font-style: italic;">//Return null if there is no intersection</span>
<span style="color: #808080; font-style: italic;">//---------------------------------------------------------------</span>
<span style="color: #000000; font-weight: bold;">function</span> lineIntersectLine<span style="color: #66cc66;">&#40;</span>A:Point,B:Point,<span style="color: #0066CC;">E</span>:Point,F:Point,as_seg:<span style="color: #0066CC;">Boolean</span>=<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>:Point
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> ip:Point;
	<span style="color: #000000; font-weight: bold;">var</span> a1:<span style="color: #0066CC;">Number</span>;
	<span style="color: #000000; font-weight: bold;">var</span> a2:<span style="color: #0066CC;">Number</span>;
	<span style="color: #000000; font-weight: bold;">var</span> b1:<span style="color: #0066CC;">Number</span>;
	<span style="color: #000000; font-weight: bold;">var</span> b2:<span style="color: #0066CC;">Number</span>;
	<span style="color: #000000; font-weight: bold;">var</span> c1:<span style="color: #0066CC;">Number</span>;
	<span style="color: #000000; font-weight: bold;">var</span> c2:<span style="color: #0066CC;">Number</span>;
&nbsp;
	a1= B.<span style="color: #006600;">y</span>-A.<span style="color: #006600;">y</span>;
	b1= A.<span style="color: #006600;">x</span>-B.<span style="color: #006600;">x</span>;
	c1= B.<span style="color: #006600;">x*A</span>.<span style="color: #006600;">y</span> - A.<span style="color: #006600;">x*B</span>.<span style="color: #006600;">y</span>;
	a2= F.<span style="color: #006600;">y</span>-<span style="color: #0066CC;">E</span>.<span style="color: #006600;">y</span>;
	b2= <span style="color: #0066CC;">E</span>.<span style="color: #006600;">x</span>-F.<span style="color: #006600;">x</span>;
	c2= F.<span style="color: #006600;">x*</span><span style="color: #0066CC;">E</span>.<span style="color: #006600;">y</span> - <span style="color: #0066CC;">E</span>.<span style="color: #006600;">x*F</span>.<span style="color: #006600;">y</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> denom:<span style="color: #0066CC;">Number</span>=a1*b2 - a2*b1;
	<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>denom == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">null</span>;
	<span style="color: #66cc66;">&#125;</span>
	ip=<span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	ip.<span style="color: #006600;">x</span>=<span style="color: #66cc66;">&#40;</span>b1*c2 - b2*c1<span style="color: #66cc66;">&#41;</span>/denom;
	ip.<span style="color: #006600;">y</span>=<span style="color: #66cc66;">&#40;</span>a2*c1 - a1*c2<span style="color: #66cc66;">&#41;</span>/denom;
&nbsp;
	<span style="color: #808080; font-style: italic;">//---------------------------------------------------</span>
	<span style="color: #808080; font-style: italic;">//Do checks to see if intersection to endpoints</span>
	<span style="color: #808080; font-style: italic;">//distance is longer than actual Segments.</span>
	<span style="color: #808080; font-style: italic;">//Return null if it is with any.</span>
	<span style="color: #808080; font-style: italic;">//---------------------------------------------------</span>
	<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>as_seg<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>Point.<span style="color: #006600;">distance</span><span style="color: #66cc66;">&#40;</span>ip,B<span style="color: #66cc66;">&#41;</span> &gt; Point.<span style="color: #006600;">distance</span><span style="color: #66cc66;">&#40;</span>A,B<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">null</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>Point.<span style="color: #006600;">distance</span><span style="color: #66cc66;">&#40;</span>ip,A<span style="color: #66cc66;">&#41;</span> &gt; Point.<span style="color: #006600;">distance</span><span style="color: #66cc66;">&#40;</span>A,B<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">null</span>;
		<span style="color: #66cc66;">&#125;</span>	
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>Point.<span style="color: #006600;">distance</span><span style="color: #66cc66;">&#40;</span>ip,F<span style="color: #66cc66;">&#41;</span> &gt; Point.<span style="color: #006600;">distance</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">E</span>,F<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">null</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>Point.<span style="color: #006600;">distance</span><span style="color: #66cc66;">&#40;</span>ip,<span style="color: #0066CC;">E</span><span style="color: #66cc66;">&#41;</span> &gt; Point.<span style="color: #006600;">distance</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">E</span>,F<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">null</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">return</span> ip;
<span style="color: #66cc66;">&#125;</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://keith-hair.net/blog/2008/08/04/find-intersection-point-of-two-lines-in-as3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>USB Flash out of the Washer and into the Dryer</title>
		<link>http://keith-hair.net/blog/2008/08/03/usb-flash-out-of-the-washer-and-into-the-dryer/</link>
		<comments>http://keith-hair.net/blog/2008/08/03/usb-flash-out-of-the-washer-and-into-the-dryer/#comments</comments>
		<pubDate>Sun, 03 Aug 2008 23:53:04 +0000</pubDate>
		<dc:creator>Keith H</dc:creator>
		
		<category><![CDATA[general]]></category>

		<category><![CDATA[Accidents]]></category>

		<category><![CDATA[Flash Drives]]></category>

		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://keith-hair.com/blog/?p=21</guid>
		<description><![CDATA[One year ago I accidently left this particular  USB Flash Drive in my pants pocket and washed it in my washing machine for an 18 minute hot/cold water cycle...and it still works like new.

Today I accidentally left this same model in my pants and washed it on that same cycle...plus dried it it for 40 [...]]]></description>
			<content:encoded><![CDATA[<p>One year ago I accidently left <a href="http://www.sandisk.com/Products/Item(1925)-SDCZ6-4096-A11-SanDisk_Cruzer_Micro_4GB_Black.aspx" target="_blank">this particular  USB Flash Drive</a> in my pants pocket and washed it in my washing machine for an 18 minute hot/cold water cycle...and it still works like new.</p>
<p style="text-align: center;"><img class="aligncenter" src="/blog/images/M24GBblk_front_130_angle.gif" alt="One of my USB Flash Drives" width="130" height="111" /></p>
<p>Today I accidentally left this same model in my pants and washed it on that same cycle...plus dried it it for 40 minutes on HOT in a  dryer machine...and it still works like new.</p>
<p>That's so awesome!</p>
]]></content:encoded>
			<wfw:commentRss>http://keith-hair.net/blog/2008/08/03/usb-flash-out-of-the-washer-and-into-the-dryer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Nice Knobs &#8230;for Flex</title>
		<link>http://keith-hair.net/blog/2008/07/25/nice-knobs/</link>
		<comments>http://keith-hair.net/blog/2008/07/25/nice-knobs/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 09:31:06 +0000</pubDate>
		<dc:creator>Keith H</dc:creator>
		
		<category><![CDATA[ActionScript 3]]></category>

		<category><![CDATA[Components]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[dial]]></category>

		<category><![CDATA[gauge]]></category>

		<category><![CDATA[knob]]></category>

		<category><![CDATA[rotary]]></category>

		<guid isPermaLink="false">http://keith-hair.com/blog/?p=20</guid>
		<description><![CDATA[Here is a Flex UI component I've been writing. Click the image to play with what I have made so far.
You can change a variety of properties. The dial and mark are runtime skinnable by setting its "dialBackgroundSkin" or "dialMarkSkin" property to a url with an image. 
Knobs and dials just look cool...I don't know anything [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a <a href="/blog/examples/niceknobs" target="_blank">Flex UI component</a> I've been writing. Click the image to play with what I have made so far.<br />
You can change a variety of properties. The dial and mark are runtime skinnable by setting its "dialBackgroundSkin" or "dialMarkSkin" property to a url with an image. <strong></strong></p>
<p>Knobs and dials just look cool...I don't know anything about audio editing but I like the site of a sound studio. This is the "<a href="http://www.propellerheads.se/">Reason</a>" I decided to make a knob component.</p>
<p style="text-align: center;"><a href="http:/blog/examples/niceknobs" target="_blank"><img class="alignnone aligncenter" src="/blog/examples/niceknobs/niceknobs.jpg" alt="Nice Knobs" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://keith-hair.net/blog/2008/07/25/nice-knobs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Superman flash test</title>
		<link>http://keith-hair.net/blog/2008/07/17/superman-flash-test/</link>
		<comments>http://keith-hair.net/blog/2008/07/17/superman-flash-test/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 05:05:04 +0000</pubDate>
		<dc:creator>Keith H</dc:creator>
		
		<category><![CDATA[ActionScript 3]]></category>

		<category><![CDATA[Flash 9]]></category>

		<guid isPermaLink="false">http://keith-hair.com/blog/?p=19</guid>
		<description><![CDATA[Here is a scrolling background and keyboard control test for some AS3 classes I been working on. I used the image of superman from some sprite graphics I found on the web. The images for his flight positions are loaded dynamically. This is for allowing me to load other images for different characters without changing [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a scrolling background and keyboard control test for some AS3 classes I been working on. I used the image of superman from some sprite graphics I <a href="http://spritedatabase.net/">found</a> on the web. The images for his flight positions are loaded dynamically. This is for allowing me to load other images for different characters without changing too much script.</p>
<p><a href="/blog/examples/superman"><img src="/blog/examples/superman/superman.jpg" alt="Superman Flash test" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://keith-hair.net/blog/2008/07/17/superman-flash-test/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rename all instances with their library names</title>
		<link>http://keith-hair.net/blog/2008/07/08/rename-all-instances-with-their-library-names/</link>
		<comments>http://keith-hair.net/blog/2008/07/08/rename-all-instances-with-their-library-names/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 02:19:40 +0000</pubDate>
		<dc:creator>Keith H</dc:creator>
		
		<category><![CDATA[JSFL]]></category>

		<guid isPermaLink="false">http://keith-hair.com/blog/?p=13</guid>
		<description><![CDATA[When creating a new symbol for MovieClips and other instances you must give them a name a second time again in the Properties panel. For me this can be annoying sometimes. (I name my instances the name I plan to later identify them with actionscript.) 
Here is a modification of the "findObjects" I posted earlier. [...]]]></description>
			<content:encoded><![CDATA[<p>When creating a new symbol for MovieClips and other instances you must give them a name a second time again in the Properties panel. For me this can be annoying sometimes. (I name my instances the name I plan to later identify them with actionscript.) </p>
<p>Here is a modification of the "<a href="http://keith-hair.com/blog/2008/06/05/finding-elements-with-jsfl/">findObjects</a>" I posted earlier. This is handy if you are the type of person that names your symbol items with names you intend to use as their instance name as well. </p>
<p>Maybe you will find this useful or know improvements, either way let me know your thoughts.<br />
<span id="more-13"></span></p>
<pre class="actionscript">&nbsp;
<span style="color: #808080; font-style: italic;">/*========================================================================
selfNameAllInstances(true)
&nbsp;
Renames all symbol instance names on the stage of in FLA document with
the symbol's library Name.
&nbsp;
Instances that already have a name will be skipped...
If the argument &quot;force_rename&quot; is true, the element will be renamed
regardless if it already had a instance name or not.
&nbsp;
The renaming process is recursive to each
for each MovieClip's timeline as well.
&nbsp;
(Unfortunately symbols that are grouped are ignored.)
=========================================================================*/</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> selfNameAllInstances <span style="color: #66cc66;">&#40;</span>force_rename<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	fl.<span style="color: #006600;">outputPanel</span>.<span style="color: #0066CC;">clear</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> instanceName;
	<span style="color: #000000; font-weight: bold;">var</span> inInstance;
	<span style="color: #000000; font-weight: bold;">var</span> instances = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> cnt=<span style="color: #cc66cc;">0</span>;
	<span style="color: #000000; font-weight: bold;">var</span> findObjectInTimeline = <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span>instance, <span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> timeline;
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>instance.<span style="color: #0066CC;">toString</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">&quot;[object SymbolInstance]&quot;</span> || instance.<span style="color: #0066CC;">toString</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">&quot;[object Frame]&quot;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			timeline = instance.<span style="color: #006600;">timeline</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>instance.<span style="color: #0066CC;">toString</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">&quot;[object Document]&quot;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			timeline = instance;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>instance.<span style="color: #0066CC;">toString</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">&quot;[object Timeline]&quot;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			timeline = instance;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>instance == fl.<span style="color: #006600;">getDocumentDOM</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			timeline = instance.<span style="color: #006600;">getTimeline</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>timeline == <span style="color: #0066CC;">undefined</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">null</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #000000; font-weight: bold;">var</span> checked = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #000000; font-weight: bold;">var</span> currentLayers = timeline.<span style="color: #006600;">layers</span>;
		<span style="color: #000000; font-weight: bold;">var</span> layObj;
		<span style="color: #000000; font-weight: bold;">var</span> frm;
		<span style="color: #000000; font-weight: bold;">var</span> found;
		<span style="color: #000000; font-weight: bold;">var</span> i = <span style="color: #cc66cc;">0</span>;
&nbsp;
		<span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span>i &lt; currentLayers.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> layObj = currentLayers <span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> frms = layObj.<span style="color: #006600;">frames</span>;
			<span style="color: #000000; font-weight: bold;">var</span> k = <span style="color: #cc66cc;">0</span>;
			<span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span>k &lt; frms.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">var</span> selArry = frms <span style="color: #66cc66;">&#91;</span>k<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">elements</span>;
				<span style="color: #000000; font-weight: bold;">var</span> n = <span style="color: #cc66cc;">0</span>;
				<span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span>n &lt; selArry.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#41;</span>
				<span style="color: #66cc66;">&#123;</span>
					<span style="color: #000000; font-weight: bold;">var</span> obj = selArry <span style="color: #66cc66;">&#91;</span>n<span style="color: #66cc66;">&#93;</span>;
<span style="color: #808080; font-style: italic;">//=================================================================================</span>
<span style="color: #808080; font-style: italic;">//IF THE OBJECT HAS A &quot;name&quot; PROPERTY, ASSIGN IT TO &quot;found&quot; VARIABLE.</span>
<span style="color: #808080; font-style: italic;">//&quot;found&quot; VARIABLE will be returned from this recusive function.</span>
<span style="color: #808080; font-style: italic;">//---------------------------------------------------------------------------------</span>
					<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>obj.<span style="color: #0066CC;">name</span> != <span style="color: #ff0000;">&quot;undefined&quot;</span><span style="color: #66cc66;">&#41;</span>
					<span style="color: #66cc66;">&#123;</span>
						found = obj;
						instances.<span style="color: #0066CC;">push</span> <span style="color: #66cc66;">&#40;</span>obj<span style="color: #66cc66;">&#41;</span>;
					<span style="color: #66cc66;">&#125;</span>
					<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>obj.<span style="color: #006600;">libraryItem</span> != <span style="color: #0066CC;">undefined</span><span style="color: #66cc66;">&#41;</span>
					<span style="color: #66cc66;">&#123;</span>
						<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>obj.<span style="color: #006600;">libraryItem</span>.<span style="color: #0066CC;">name</span> != <span style="color: #0066CC;">undefined</span><span style="color: #66cc66;">&#41;</span>
						<span style="color: #66cc66;">&#123;</span>
							<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>checked <span style="color: #66cc66;">&#91;</span>obj.<span style="color: #006600;">libraryItem</span>.<span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
							<span style="color: #66cc66;">&#123;</span>
								n ++;
								<span style="color: #b1b100;">continue</span>;
							<span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span>
							<span style="color: #66cc66;">&#123;</span>
								checked <span style="color: #66cc66;">&#91;</span>obj.<span style="color: #006600;">libraryItem</span>.<span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">true</span>;
							<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">//=================================================================================</span>
<span style="color: #808080; font-style: italic;">//RENAME INSTANCE ON STAGE WITH IT'S LIBRARY NAME</span>
<span style="color: #808080; font-style: italic;">//...also take of &quot;slashes&quot; in path.</span>
<span style="color: #808080; font-style: italic;">//---------------------------------------------------------------------------------</span>
<span style="color: #000000; font-weight: bold;">var</span> CHANGE_NAME=obj.<span style="color: #006600;">libraryItem</span>.<span style="color: #0066CC;">name</span>;
<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>obj.<span style="color: #0066CC;">name</span>==<span style="color: #ff0000;">&quot;&quot;</span> || force_rename<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
	CHANGE_NAME=CHANGE_NAME.<span style="color: #0066CC;">substr</span><span style="color: #66cc66;">&#40;</span>CHANGE_NAME.<span style="color: #0066CC;">lastIndexOf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #cc66cc;">+1</span>,CHANGE_NAME.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#41;</span>;
	obj.<span style="color: #0066CC;">name</span>=CHANGE_NAME;
	cnt++;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">//=================================================================================</span>
						<span style="color: #66cc66;">&#125;</span>
						obj = findObjectInTimeline <span style="color: #66cc66;">&#40;</span>obj.<span style="color: #006600;">libraryItem</span>, <span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#41;</span>;
						<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>obj != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
						<span style="color: #66cc66;">&#123;</span>
							found = obj
						<span style="color: #66cc66;">&#125;</span>
						obj = selArry <span style="color: #66cc66;">&#91;</span>n<span style="color: #66cc66;">&#93;</span>;
						<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>obj.<span style="color: #006600;">libraryItem</span>.<span style="color: #006600;">timeline</span> != <span style="color: #0066CC;">undefined</span><span style="color: #66cc66;">&#41;</span>
						<span style="color: #66cc66;">&#123;</span>
							obj = findObjectInTimeline <span style="color: #66cc66;">&#40;</span>obj.<span style="color: #006600;">libraryItem</span>.<span style="color: #006600;">timeline</span>, <span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#41;</span>;
							<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>obj != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
							<span style="color: #66cc66;">&#123;</span>
								found = obj
							<span style="color: #66cc66;">&#125;</span>
						<span style="color: #66cc66;">&#125;</span>
					<span style="color: #66cc66;">&#125;</span>
					n ++;
				<span style="color: #66cc66;">&#125;</span>
				k ++;
			<span style="color: #66cc66;">&#125;</span>
			i ++;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #b1b100;">return</span> found;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>inInstance == <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		inInstance = fl.<span style="color: #006600;">getDocumentDOM</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	findObjectInTimeline <span style="color: #66cc66;">&#40;</span>inInstance, instanceName<span style="color: #66cc66;">&#41;</span>;
	alert<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Renamed &quot;</span>+cnt+<span style="color: #ff0000;">&quot; symbols.&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://keith-hair.net/blog/2008/07/08/rename-all-instances-with-their-library-names/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Finding elements with JSFL</title>
		<link>http://keith-hair.net/blog/2008/06/05/finding-elements-with-jsfl/</link>
		<comments>http://keith-hair.net/blog/2008/06/05/finding-elements-with-jsfl/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 18:31:03 +0000</pubDate>
		<dc:creator>Keith H</dc:creator>
		
		<category><![CDATA[JSFL]]></category>

		<category><![CDATA[CS3]]></category>

		<category><![CDATA[Flash 8]]></category>

		<guid isPermaLink="false">http://keith-hair.com/blog/?p=11</guid>
		<description><![CDATA[Here's a JSFL function for returning an Array of all elements with a given instance name in whole Flash Document.
I was trying to make something like JavaScript's "getElementsById()" method.
My intent was to make this compatible with both Flash 8 and CS3 IDEs.
Note: Unfortunately, this method will not find elements that are grouped.
Let me know if [...]]]></description>
			<content:encoded><![CDATA[<p>Here's a JSFL function for returning an Array of all elements with a given instance name in whole Flash Document.<br />
I was trying to make something like JavaScript's "getElementsById()" method.<br />
My intent was to make this compatible with both Flash 8 and CS3 IDEs.</p>
<p><em>Note: Unfortunately, this method will not find elements that are grouped.</em><br />
Let me know if this is helpful or if there is a better way to do this.</p>
<p>Example:</p>
<pre class="javascript">&nbsp;
fl.<span style="color: #006600;">outputPanel</span>.<span style="color: #006600;">clear</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #003366; font-weight: bold;">var</span> items=findObjects<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;mybox&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #003366; font-weight: bold;">var</span> n=<span style="color: #CC0000;">0</span>;
<span style="color: #000066; font-weight: bold;">while</span><span style="color: #66cc66;">&#40;</span>n &lt; items.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
	items<span style="color: #66cc66;">&#91;</span>n<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">rotation</span>=<span style="color: #CC0000;">45</span>;
	n++;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Found &quot;</span>+items.<span style="color: #006600;">length</span>+<span style="color: #3366CC;">&quot; items.&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
<p><span id="more-11"></span></p>
<pre class="javascript">&nbsp;
<span style="color: #009900; font-style: italic;">/*-------------------------------------------------------------------
findObjects
&nbsp;
Returns an Array of elements in FLA document that match instanceName.
If nothing matches instanceName, an Array with a length of 0 is returned.
--------------------------------------------------------------------*/</span>
<span style="color: #003366; font-weight: bold;">function</span> findObjects <span style="color: #66cc66;">&#40;</span>instanceName, inInstance<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> instances = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
	<span style="color: #003366; font-weight: bold;">var</span> groups = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
	<span style="color: #003366; font-weight: bold;">var</span> findObjectInTimeline = <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span>instance, <span style="color: #000066;">name</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> timeline;
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>instance.<span style="color: #006600;">toString</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #3366CC;">&quot;[object SymbolInstance]&quot;</span> || instance.<span style="color: #006600;">toString</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #3366CC;">&quot;[object Frame]&quot;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			timeline = instance.<span style="color: #006600;">timeline</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>instance.<span style="color: #006600;">toString</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #3366CC;">&quot;[object Document]&quot;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			timeline = instance;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>instance.<span style="color: #006600;">toString</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #3366CC;">&quot;[object Timeline]&quot;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			timeline = instance;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>instance == fl.<span style="color: #006600;">getDocumentDOM</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			timeline = instance.<span style="color: #006600;">getTimeline</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>timeline == undefined<span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">null</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #003366; font-weight: bold;">var</span> checked = <span style="color: #003366; font-weight: bold;">new</span> Object <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #003366; font-weight: bold;">var</span> currentLayers = timeline.<span style="color: #006600;">layers</span>;
		<span style="color: #003366; font-weight: bold;">var</span> layObj;
		<span style="color: #003366; font-weight: bold;">var</span> frm;
		<span style="color: #003366; font-weight: bold;">var</span> found;
		<span style="color: #003366; font-weight: bold;">var</span> i = <span style="color: #CC0000;">0</span>;
&nbsp;
		<span style="color: #000066; font-weight: bold;">while</span> <span style="color: #66cc66;">&#40;</span>i &lt; currentLayers.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> layObj = currentLayers <span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
			<span style="color: #003366; font-weight: bold;">var</span> frms = layObj.<span style="color: #006600;">frames</span>;
			<span style="color: #003366; font-weight: bold;">var</span> k = <span style="color: #CC0000;">0</span>;
			<span style="color: #000066; font-weight: bold;">while</span> <span style="color: #66cc66;">&#40;</span>k &lt; frms.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #003366; font-weight: bold;">var</span> selArry = frms <span style="color: #66cc66;">&#91;</span>k<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">elements</span>;
				<span style="color: #003366; font-weight: bold;">var</span> n = <span style="color: #CC0000;">0</span>;
				<span style="color: #000066; font-weight: bold;">while</span> <span style="color: #66cc66;">&#40;</span>n &lt; selArry.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#41;</span>
				<span style="color: #66cc66;">&#123;</span>
					<span style="color: #003366; font-weight: bold;">var</span> obj = selArry <span style="color: #66cc66;">&#91;</span>n<span style="color: #66cc66;">&#93;</span>;
					<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>obj.<span style="color: #000066;">name</span> == <span style="color: #000066;">name</span><span style="color: #66cc66;">&#41;</span>
					<span style="color: #66cc66;">&#123;</span>
						found = obj;
						instances.<span style="color: #006600;">push</span> <span style="color: #66cc66;">&#40;</span>obj<span style="color: #66cc66;">&#41;</span>;
					<span style="color: #66cc66;">&#125;</span>
					<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>obj.<span style="color: #006600;">libraryItem</span> != undefined<span style="color: #66cc66;">&#41;</span>
					<span style="color: #66cc66;">&#123;</span>
						<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>obj.<span style="color: #006600;">libraryItem</span>.<span style="color: #000066;">name</span> != undefined<span style="color: #66cc66;">&#41;</span>
						<span style="color: #66cc66;">&#123;</span>
							<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>checked <span style="color: #66cc66;">&#91;</span>obj.<span style="color: #006600;">libraryItem</span>.<span style="color: #000066;">name</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
							<span style="color: #66cc66;">&#123;</span>
								n ++;
								<span style="color: #000066; font-weight: bold;">continue</span>;
							<span style="color: #66cc66;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span>
							<span style="color: #66cc66;">&#123;</span>
								checked <span style="color: #66cc66;">&#91;</span>obj.<span style="color: #006600;">libraryItem</span>.<span style="color: #000066;">name</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #003366; font-weight: bold;">true</span>;
							<span style="color: #66cc66;">&#125;</span>
						<span style="color: #66cc66;">&#125;</span>
						obj = findObjectInTimeline <span style="color: #66cc66;">&#40;</span>obj.<span style="color: #006600;">libraryItem</span>, <span style="color: #000066;">name</span><span style="color: #66cc66;">&#41;</span>;
						<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>obj != <span style="color: #003366; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
						<span style="color: #66cc66;">&#123;</span>
							found = obj
						<span style="color: #66cc66;">&#125;</span>
						obj = selArry <span style="color: #66cc66;">&#91;</span>n<span style="color: #66cc66;">&#93;</span>;
						<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>obj.<span style="color: #006600;">libraryItem</span>.<span style="color: #006600;">timeline</span> != undefined<span style="color: #66cc66;">&#41;</span>
						<span style="color: #66cc66;">&#123;</span>
							obj = findObjectInTimeline <span style="color: #66cc66;">&#40;</span>obj.<span style="color: #006600;">libraryItem</span>.<span style="color: #006600;">timeline</span>, <span style="color: #000066;">name</span><span style="color: #66cc66;">&#41;</span>;
							<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>obj != <span style="color: #003366; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
							<span style="color: #66cc66;">&#123;</span>
								found = obj
							<span style="color: #66cc66;">&#125;</span>
						<span style="color: #66cc66;">&#125;</span>
					<span style="color: #66cc66;">&#125;</span>
					n ++;
				<span style="color: #66cc66;">&#125;</span>
				k ++;
			<span style="color: #66cc66;">&#125;</span>
			i ++;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #000066; font-weight: bold;">return</span> found;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>inInstance == <span style="color: #003366; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		inInstance = fl.<span style="color: #006600;">getDocumentDOM</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	findObjectInTimeline <span style="color: #66cc66;">&#40;</span>inInstance, instanceName<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000066; font-weight: bold;">return</span> instances;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://keith-hair.net/blog/2008/06/05/finding-elements-with-jsfl/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
