<?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>tweenOut &#187; ActioinScript 3</title>
	<atom:link href="http://www.blog.tweenout.com/category/actioinscript-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.tweenout.com</link>
	<description>Flash &#38; Flex Stuff</description>
	<lastBuildDate>Mon, 16 Aug 2010 18:12:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>setTimeout function. Nice little treat</title>
		<link>http://www.blog.tweenout.com/settimeout-function-nice-little-treat/</link>
		<comments>http://www.blog.tweenout.com/settimeout-function-nice-little-treat/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 18:46:04 +0000</pubDate>
		<dc:creator>Todd Shelton</dc:creator>
				<category><![CDATA[ActioinScript 3]]></category>
		<category><![CDATA[AS 3 delay]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[setTimeout]]></category>

		<guid isPermaLink="false">http://www.tshelton.com/blog/?p=229</guid>
		<description><![CDATA[setTimeout function that makes a one time delay call. ]]></description>
			<content:encoded><![CDATA[<p>Have you ever been working on a project and get to a spot where you need to call a function but need it to wait a few seconds before it calls it? Oh yeah, you could always use a tween engine like GreenSock to do it, like</p>
<p>TweenLite.to(this, secondsToWait, {onComplete:functionCalled});</p>
<p>but that is a little clunky and not the best way to do things. </p>
<p>So to answer my question above there is a function in AS that will do this for you and it is called setTimeout().  I&#8217;m sure a lot of you know about this, but a lot of people don&#8217;t. </p>
<p>This is a function for a one time timer, or a one time delay if you will. The way you use it is first import it. </p>
<p>import flash.utils.setTimeout;</p>
<p>then you will want to call it when you need it like this:</p>
<p>setTimeout(functionToCall, delayInMilliseconds or 2000, parameter, parameter);</p>
<p>You do not need to pass any parameters to it but if the function you are calling needs them that is where you would place them. </p>
<p>This little snippet will save you a little time and headaches later. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.tweenout.com/settimeout-function-nice-little-treat/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TextField Hand Cursor Issues</title>
		<link>http://www.blog.tweenout.com/textfield-hand-cursor-issues/</link>
		<comments>http://www.blog.tweenout.com/textfield-hand-cursor-issues/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 02:40:56 +0000</pubDate>
		<dc:creator>Todd Shelton</dc:creator>
				<category><![CDATA[ActioinScript 3]]></category>
		<category><![CDATA[ActionScript 3 TextField]]></category>
		<category><![CDATA[TextField]]></category>
		<category><![CDATA[useHandCursor]]></category>

		<guid isPermaLink="false">http://www.tshelton.com/blog/textfield-hand-cursor-issues/</guid>
		<description><![CDATA[Here is a little issue I ran into the other day and couldn&#8217;t figure it out for about an hour. I was creating a TextField and putting the textfield into a movie clip so I could add listeners to it. So after I put the listeners on the movieClip I still couldn&#8217;t get the hand [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a little issue I ran into the other day and couldn&#8217;t figure it out for about an hour. I was creating a TextField and putting the textfield into a movie clip so I could add listeners to it. So after I put the listeners on the movieClip I still couldn&#8217;t get the hand to appear when you moused over it. I even tried the </p>
<p>buttonMode = true;<br />
useHandCursor = true;</p>
<p>Neither one of those worked and it drove me crazy. </p>
<p>Well after some google searching and some playing around I realized that I needed to put </p>
<p>mouseEnabled = false; </p>
<p>on the textField. I never would have thought that you have to actually put that on the textField, but heck it works.</p>
<p>So if you can&#8217;t get the hand cursor to show up, try setting mouseEnabled = false on the textField. I hope this helps and saves you time. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.tweenout.com/textfield-hand-cursor-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parsing XML with ActionScript 3</title>
		<link>http://www.blog.tweenout.com/parsing-xml-with-actionscript-3/</link>
		<comments>http://www.blog.tweenout.com/parsing-xml-with-actionscript-3/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 03:28:29 +0000</pubDate>
		<dc:creator>Todd Shelton</dc:creator>
				<category><![CDATA[ActioinScript 3]]></category>
		<category><![CDATA[parse XML]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XML ActionScript 3]]></category>
		<category><![CDATA[XML AS3]]></category>
		<category><![CDATA[XML Parsing]]></category>

		<guid isPermaLink="false">http://www.tshelton.com/blog/?p=144</guid>
		<description><![CDATA[Learn How to parse XML.]]></description>
			<content:encoded><![CDATA[<p>I just want to cover some of the basics to reading XML with AS3. I have learned that if you are going to be doing anything dynamically with AS3 you will have to know how to write and parse XML. Let’s get started.</p>
<p>First we look at writing the XML, here I have made an XML called namesList.xml.</p>

<div class="wp_codebox"><table><tr id="p1441"><td class="code" id="p144code1"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&lt;</span>namesList<span style="color: #66cc66;">&gt;</span>
  	 <span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;John&quot;</span><span style="color: #66cc66;">&gt;</span>John<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
 	<span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;Mike&quot;</span><span style="color: #66cc66;">&gt;</span>Mike<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
 	<span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;Pete&quot;</span><span style="color: #66cc66;">&gt;</span>Pete<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
 	<span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;Paul&quot;</span><span style="color: #66cc66;">&gt;</span>Paul<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
 	<span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;Mark&quot;</span><span style="color: #66cc66;">&gt;</span>Mark<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;/</span>namesList<span style="color: #66cc66;">&gt;</span></pre></td></tr></table></div>

<p>As you can see in this example this xml has five elements, namesList, name * 4.  The namesList is surrounding the name elements, which means that the element namesList holds those five names. You could have several more namesList that will hope more names but for this example we are keeping it simple.  There are a couple of different ways to write the element. You can write it with no content like.</p>

<div class="wp_codebox"><table><tr id="p1442"><td class="code" id="p144code2"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>John<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>      or like this
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;John&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>

<p>Either way will get us the same result. How you write it here determines how you write the code to read it. I prefer the second way because you can add a lot of content to just one line. For example:</p>

<div class="wp_codebox"><table><tr id="p1443"><td class="code" id="p144code3"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name</span> <span style="color: #000066;">id</span>=”John” <span style="color: #000066;">lastname</span>=”Smith” <span style="color: #000066;">age</span>=”35” <span style="color: #000066;">status</span>=”single” <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>

<p>Now this one element holds all that data without having to create a lot of elements. </p>
<p>All right now lets write some code. I am using Flex and I have created a new ActionScript project so this may look a little different than if you doing it in the Flash IDE. The first things you need to do create are URLLoader, URLRequest and add a listener to the loader then load the request. The entire code looks like this. Oh by the way in the constructor I always pass this off to another function right away usually init(); Also make sure you import flash.net.URLLoader and import flash.net.URLRequest;</p>
<p>This creates a new URLLoader: this is the loader that will handle the xml</p>

<div class="wp_codebox"><table><tr id="p1444"><td class="code" id="p144code4"><pre class="xml" style="font-family:monospace;">var ldr:URLLoader = new URLLoader();</pre></td></tr></table></div>

<p>This creates a new URLRequest: this is what gets the url or path to xml<br />
< pre lang="xml" line="n" >var req:URLRequest = new URLRequest();</pre >
<p>This is the line that puts the url into the URLRequest: here I have a variable named xmlURL that holds the string to the xml path.</p>

<div class="wp_codebox"><table><tr id="p1445"><td class="code" id="p144code5"><pre class="xml" style="font-family:monospace;">req.url = xmlURL;</pre></td></tr></table></div>

<p>Here you add a listener that listens to when the xml has completed loading and then calls a function to handle the xml. In this case I named the function onCompleteHandler.</p>

<div class="wp_codebox"><table><tr id="p1446"><td class="code" id="p144code6"><pre class="xml" style="font-family:monospace;">ldr.addEventListener(Event.COMPLETE, onCompleteHandler);</pre></td></tr></table></div>

<p>Then finally the loader loads the request.</p>

<div class="wp_codebox"><table><tr id="p1447"><td class="code" id="p144code7"><pre class="xml" style="font-family:monospace;">ldr.load(req);</pre></td></tr></table></div>

<p>Now that it has loaded the function onCompleteHandler will process the XML.<br />
Make sure you import flash.events.Event, or you will get an error.<br />
Here “e” is the event and it holds the entire xml so we need to get that out of there.</p>

<div class="wp_codebox"><table><tr id="p1448"><td class="code" id="p144code8"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onCompleteHandler<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			here we create a <span style="color: #0066CC;">variable</span> that holds the <span style="color: #0066CC;">xml</span>
			<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">xml</span>:<span style="color: #0066CC;">XML</span> = <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">target</span>.<span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#41;</span>;
			then we <span style="color: #0066CC;">trace</span> the <span style="color: #0066CC;">xml</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'xml '</span> + <span style="color: #0066CC;">xml</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">trace</span>” <span style="color: #0066CC;">xml</span>
 <span style="color: #66cc66;">&lt;</span>namesList<span style="color: #66cc66;">&gt;</span>
  					 <span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;John&quot;</span><span style="color: #66cc66;">&gt;</span>John<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
 	<span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;Mike&quot;</span><span style="color: #66cc66;">&gt;</span>Mike<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
 	<span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;Pete&quot;</span><span style="color: #66cc66;">&gt;</span>Pete<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
 	<span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;Paul&quot;</span><span style="color: #66cc66;">&gt;</span>Paul<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
 	<span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;Mark&quot;</span><span style="color: #66cc66;">&gt;</span>Mark<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;/</span>namesList<span style="color: #66cc66;">&gt;</span>”
&nbsp;
&nbsp;
<span style="color: #808080; font-style: italic;">//now we create the XMLList that holds all the names.</span>
<span style="color: #808080; font-style: italic;">//You have to include the .@ to get down to </span>
<span style="color: #808080; font-style: italic;">//the id part of the element.  </span>
			<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">list</span>:XMLList = <span style="color: #0066CC;">xml</span>.<span style="color: #0066CC;">name</span>.<span style="color: #66cc66;">@</span>id;
			<span style="color: #808080; font-style: italic;">//now we trace the list </span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'list '</span> + <span style="color: #0066CC;">list</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">trace</span>” <span style="color: #0066CC;">list</span> 
<span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;John&quot;</span><span style="color: #66cc66;">&gt;</span>John<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;Mike&quot;</span><span style="color: #66cc66;">&gt;</span>Mike<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;Pete&quot;</span><span style="color: #66cc66;">&gt;</span>Pete<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;Paul&quot;</span><span style="color: #66cc66;">&gt;</span>Paul<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>name id=<span style="color: #ff0000;">&quot;Mark&quot;</span><span style="color: #66cc66;">&gt;</span>Mark<span style="color: #66cc66;">&lt;/</span>name<span style="color: #66cc66;">&gt;</span>”
&nbsp;
&nbsp;
			<span style="color: #808080; font-style: italic;">//now this is the loop that gets all of the names out. </span>
			<span style="color: #808080; font-style: italic;">//x holds each name and then we trace x.  </span>
			<span style="color: #b1b100;">for</span> <span style="color: #b1b100;">each</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> x:<span style="color: #0066CC;">XML</span> <span style="color: #b1b100;">in</span> <span style="color: #0066CC;">list</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'x '</span> + x<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #0066CC;">trace</span>” John Mike Pete Paul Mark”
		<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>You can download for files here for further reference. I hope this helps you in parsing xml. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.tweenout.com/parsing-xml-with-actionscript-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting cuePoints using ActionScript 3</title>
		<link>http://www.blog.tweenout.com/setting-cuepoints-using-actionscript-3/</link>
		<comments>http://www.blog.tweenout.com/setting-cuepoints-using-actionscript-3/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 04:15:21 +0000</pubDate>
		<dc:creator>Todd Shelton</dc:creator>
				<category><![CDATA[ActioinScript 3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[addASCuePoint]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[cuePoints]]></category>
		<category><![CDATA[FLVPlayback]]></category>

		<guid isPermaLink="false">http://www.tshelton.com/blog/?p=130</guid>
		<description><![CDATA[I was working on a project for class where I have to set cuePoints on an FLVPlayback timeline. The way my project is setup, I am grabbing several stop times from an XML and then I’m using the number that I get out of the XML as cuePoints. Here is my XML: cuePoints cuePoint stopTime=”15” [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on a project for class where I have to set cuePoints on an FLVPlayback timeline.  The way my project is setup, I am grabbing several stop times from an XML and then I’m using the number that I get out of the XML as cuePoints. Here is my XML:<br />
<code><br />
cuePoints<br />
     cuePoint stopTime=”15” id=”firstStop”<br />
     cuePoint stopTime=”30” id=”secondStop”<br />
     cuePoint stopTime=”45” id=”thirdStop”<br />
cuePoints<br />
</code><br />
There is a lot more cuePoints but I didn’t want to bore you with the extras. Then in my .as file I grabbed my XML and then called the onComplete function. I’m assuming here that you know how to bring in the xml using a URLLoader with an eventListener on it. Now make sure you create your FLVPlayer and put an eventListener for READY and CUEPOINT. These are the events that will set your cuePoints and listen for them. Here is an example of the two functions.<br />
<code><br />
player.addEventListener(VideoEvent.READY, setCuePoints);<br />
player.addEventListener(MetadataEvent.CUE_POINT, onCuePoint);<br />
</code><br />
The top one sets the cuePoints and the second listens too them. This is where I was having some trouble but finally with some help from my mentor I figured it out.</p>
<p>In the setCuePoints function I was setting all the cuePoints like this.<br />
<code><br />
private function setCuePoints(e:VideoEvent):void<br />
{<br />
var list:XMLList = xml.cuePoints.cuePoint.@stopTime;</code><br />
<code><br />
for each(var x:XML in list)<br />
{<br />
flvPlayer.addASCuePoint(x, 'stop');<br />
}<br />
}<br />
</code><br />
This looked right and if you traced x it would list all the cuePoint times but it would only stop at the last one. The method addASCuePoint ask for an Object for the stop time. I was passing in the number that I was getting from the xml, or was I? I tried everything even the .toString(), and that would not work. I could hard code the times in and that would work fine but for some reason it didn’t like my number (x).</p>
<p>So here is the fix. Replace the line.<br />
<code><br />
flvPlayer.addASCuePoint(x, 'stop');</code><br />
with<code><br />
flvPlayer.addASCuePoint(Number(x), 'stop');</code></p>
<p>We need to cast the xml number we are getting as an actual number. This will work every time and you can set as many cuePoints as you want on the time line.</p>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.tweenout.com/setting-cuepoints-using-actionscript-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ASDocs External Tool in Flex or the Flex Plugin for Eclipse</title>
		<link>http://www.blog.tweenout.com/asdocs-external-tool-in-flex-or-the-flex-plugin-for-eclipse/</link>
		<comments>http://www.blog.tweenout.com/asdocs-external-tool-in-flex-or-the-flex-plugin-for-eclipse/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 02:13:57 +0000</pubDate>
		<dc:creator>Todd Shelton</dc:creator>
				<category><![CDATA[ActioinScript 3]]></category>
		<category><![CDATA[ASDoc]]></category>
		<category><![CDATA[ASDocs]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex Documentation]]></category>
		<category><![CDATA[Flex External Tools]]></category>

		<guid isPermaLink="false">http://www.tshelton.com/blog/?p=107</guid>
		<description><![CDATA[All right so at work, ickydime has built a nice library of classes, which hopefully I will be able to add to soon, that we use all the time. It is getting to the point that we needed to start commenting the classes and have some documentation for each class so we didn&#8217;t need to [...]]]></description>
			<content:encoded><![CDATA[<p>All right so at work, <a title="ickydime blog" href="http://blog.ickydime.com/" target="_blank">ickydime</a> has built a nice library of classes, which hopefully I will be able to add to soon, that we use all the time. It is getting to the point that we needed to start commenting the classes and have some documentation for each class so we didn&#8217;t need to explain it all the time. That is where I came in.</p>
<p>I have ran the ASDocs tool before but only on one folder and now I needed to run it against an entire library of folders and classes as well as adding library paths. I found a lot of information out there about running the ASDoc tool but usually it was doing it on one folder and that is it. So I spent about 10 hours trying to get this to work and I finally figured it out.</p>
<p>I&#8217;m posting my code and some screen shots so I hope this helps.</p>
<p>First if you don&#8217;t know where this tool is at it is located in Flex, or in my case Eclipse with the Flex plugin, on the top tool bar. It looks like a play arrow with a tool box under it.</p>
<p style="text-align: center;"><img class="size-medium wp-image-11 aligncenter" title="Top Bar" src="http://www.tshelton.com/blog/wp-content/uploads/2009/06/topBar.jpg" alt="Top Bar" width="180" height="84" /></p>
<p>Make sure you have the folder selected in your Project menu on the left side of the screen when you start this process. This is not a requirement but it will make sure you run the tool on the right folder. Now that you know where the tool is click the black arrow on the right side of the button and a drop down will pull up.</p>
<p style="text-align: center;"><img class="size-medium wp-image-11 aligncenter" title="Top Bar" src="http://www.tshelton.com/blog/wp-content/uploads/2009/06/dropDown.jpg" alt="Top Bar" width="216" height="150" /></p>
<p>When the drop down comes out you will want to click on the “External Tools Configurations” button. Once you click on this it will launch a new window that looks like this.</p>
<p style="text-align: center;"><img class="size-medium wp-image-11 aligncenter" title="Top Bar" src="http://www.tshelton.com/blog/wp-content/uploads/2009/06/toolWindow.jpg" alt="Top Bar" width="300" height="225" /></p>
<p>Now it is time to fill it out so you can run the script. On the left hand side of the window click on  “Program” and then click on the paper with the “+” sign on it. </p>
<p style="text-align: center;"><img class="size-medium wp-image-11 aligncenter" title="Top Bar" src="http://www.tshelton.com/blog/wp-content/uploads/2009/06/add.jpg" alt="Top Bar" width="130" height="125" /></p>
<p>Once you do that a new configuration task will be added to your toolbox. Now you will fill it out. In the middle of the window the first thing you see is Name: This is where you will put the name of the tool you want to run. I used the  name of our library and then put ASDocs after it. You don&#8217;t have to do this but it will be helpful if you have a lot of libraries and then you can just pick the one you want to run and run it. </p>
<p>You WILL NOT BE CHANGING TABS so make sure you leave it on the Main tab. The next thing you want to fill out is the Location of the asdoc.exe(pc) or asdoc(mac). Mine was located here “C:\Program Files (x86)\Adobe\Flex Builder 3 Plug-in\sdks\3.2.0\bin\asdoc.exe” but that is on a PC. It should be the same on a Mac because they are both within the Flex folder structure.</p>
<p>The next line you will fill out is the “Working Directory”. This is the project that you are going to be running the tool on. You can search for it in the File structure or the workspace. I found it easier using the workspace. If you use the Browse Workspace to find your project it will look something like this, <code>${workspace_loc:/basement_core/classes/basement_core}</code>. Just make sure you have the top folder listed here so you will get all your folders and classes. If you go down to far you will miss some folders and classes. The image below should show you what you should have at this point</p>
<p style="text-align: center;"><img class="size-medium wp-image-11 aligncenter" title="Top Bar" src="http://www.tshelton.com/blog/wp-content/uploads/2009/06/topexternalTools.jpg" alt="Top Bar" width="300" height="200" /></p>
<p>The top part is easy and now comes the good stuff. The big text box at the bottom is where all your arguments come into play. </p>
<p style="text-align: center;"><img class="size-medium wp-image-11 aligncenter" title="Top Bar" src="http://www.tshelton.com/blog/wp-content/uploads/2009/06/bottomExternalTools.jpg" alt="Top Bar" width="300" height="200" /></p>
<p>As you can see there are a few arguments that we need to put in to get all the classes covered.<br />
Here is the enitre code:<br />
<code><br />
-doc-sources .<br />
-doc-namespaces<br />
-library-path "C:\Program Files (x86)\Adobe\Adobe Flash CS4\Common\Configuration\Components\Video"<br />
-library-path "C:\Workspace\AS3 Workspace\SoundSync\bin"<br />
-library-path "C:\Workspace\AS3 Workspace\GreenSock\bin"<br />
-library-path "C:\Workspace\AS3 Workspace\Tweener\bin"<br />
-output docs<br />
-main-title "Basement Core Documentation"<br />
-window-title "Basement Core Documentation"<br />
-footer "2009 Copyright of The Basement Design + Motion"<br />
</code><br />
I will start will line one and go through each one. </p>
<p><code>-doc-sources .</code> (You have to make sure the period is at the end with a space after the sources. This is the statement that tells the compiler where all your classes are located. Since you already had the folder selected above basically we are just saying get all the classes. The period is like a wild card and tells the compiler to search in all folders.)</p>
<p><code>-doc-namespaces</code> (This will handle all the classes that refer to other classes inside the folder structure. This is the one that had me stump for so long)</p>
<p><code>-library-path "C:\Program Files (x86)\Adobe\Adobe Flash CS4\Common\Configuration\Components\Video" </code>    (this is a library path of outside classes and swc. If you open up the .actionScriptProperties in your project you will see all of the library paths, that is if you have them. This path was bringing in the FLVPlaybackAS3.swc. I was getting an error here because the AS2 playback was in there as well. I removed the AS2 version and it worked fine. Of course you could have excluded the swc but that is whole other can of worms. You do have to include the <code>“”</code> around the path like it is shown)</p>
<p><code> -library-path "C:\Workspace\AS3 Workspace\SoundSync\bin" </code>       (here is another library path that goes to the SoundSync.swc)</p>
<p>There are two other classes that I included I&#8217;m going to skip them for time sake but make sure you put all your library paths in there or you will get an error.</p>
<p><code>-output docs</code>   (This line is going to create a folder named docs in the same folder that your running your external tool on. It will produce all the HTML files that are needed for you docs.)</p>
<p>These last three are optional but they will personalize your ASDocs a little more. </p>
<p><code>-main-title "Basement Core Documentation"</code>   (This will create a Header basically for your docs and you have to put the &#8220;&#8221; around the title)</p>
<p><code>-window-title "Basement Core Documentation"</code>  (This line will put whatever is in the &#8220;&#8221; into the title bar of the web browser)</p>
<p><code>-footer "2009 Copyright of The Basement Design + Motion"</code> (Here is the last line and this will put a footer at the bottom of your doc files)</p>
<p>After all of the code is entered press the Apply button and then the run button and wait. It usually takes a couple of minutes to finish. </p>
<p>I hope this tutorial helped and saved you some time. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.tweenout.com/asdocs-external-tool-in-flex-or-the-flex-plugin-for-eclipse/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
