<?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>cs5 &#8211; Software, Fitness, and Gaming &#8211; Jesse Warden</title>
	<atom:link href="https://jessewarden.com/tag/cs5/feed" rel="self" type="application/rss+xml" />
	<link>https://jessewarden.com</link>
	<description>Software &#124; Fitness &#124; Gaming</description>
	<lastBuildDate>Tue, 28 Dec 2010 19:02:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://jessewarden.com/wp-content/uploads/2016/08/cropped-Lambda2-32x32.png</url>
	<title>cs5 &#8211; Software, Fitness, and Gaming &#8211; Jesse Warden</title>
	<link>https://jessewarden.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>JSFL Script to Ensure Actual ActionScript Classes Exist for Symbols</title>
		<link>https://jessewarden.com/2010/12/jsfl-script-to-ensure-actual-actionscript-classes-exist-for-symbols.html</link>
					<comments>https://jessewarden.com/2010/12/jsfl-script-to-ensure-actual-actionscript-classes-exist-for-symbols.html#comments</comments>
		
		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Tue, 28 Dec 2010 18:50:26 +0000</pubDate>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[cs3]]></category>
		<category><![CDATA[cs4]]></category>
		<category><![CDATA[cs5]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jsfl]]></category>
		<guid isPermaLink="false">http://jessewarden.com/?p=2577</guid>

					<description><![CDATA[One way to design or skin ActionScript 3 projects is using the Flash IDE for graphical assets. Â You export your FLA as an SWC, and you can utilize those assets in your AS3 and/or Flex project. Â Flash CS3/CS4/CS5 have the ability to link to an ActionScript 3 class that represents the code behind the Symbol. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>One way to design or skin ActionScript 3 projects is using the <a href="http://adobe.com/products/flash/">Flash</a> IDE for graphical assets. Â You export your FLA as an SWC, and you can utilize those assets in your AS3 and/or Flex project. Â Flash CS3/CS4/CS5 have the ability to link to an ActionScript 3 class that represents the code behind the Symbol. Â If the Flash IDE doesn&#8217;t find the class in its source paths, it&#8217;ll create one for you.</p>
<p>The downside is, when you compile, you do not get errors if the Flash IDE didn&#8217;t find a class for a particular Symbol that&#8217;s set to have one. Â Maybe you mis-typed the package path or class name. Â Maybe you forgot to set the class path for the FLA. Â Maybe the FLA is in the wrong place. Â Whatever the reason, your code &#8220;won&#8217;t work&#8221; and you won&#8217;t know why. Â You may not get code hints in <a href="http://www.adobe.com/products/flashbuilder/">Flash Builder</a> / <a href="http://www.fdt.powerflasher.com/">FDT</a> / <a href="http://www.jetbrains.com/idea/">IntelliJ</a>, and certain other dependencies may be missing as well and you&#8217;ll be left wondering why.</p>
<p><span id="more-2577"></span><a href="http://jessewarden.com/archives/blogentryimages/check-class.jpg"><img decoding="async" style="padding-right: 4px; padding-bottom: 4px; width: 240px;" src="http://jessewarden.com/archives/blogentryimages/check-class.jpg" alt="Flash CS5 Check Class" width="240" align="left" /></a>The Flash IDE provides a check mark button next to the linkage class to allow you to confirm or deny Flash can find the class. Â In a quick scan of the <a href="http://help.adobe.com/en_US/flash/cs/extend/index.html">JavaScript for Flash docs</a>, I could not find a way to use this button&#8217;s functionality in JSFL. Â So, I wrote a quick script that does.</p>
<p><strong>NOTE</strong>: I do not take source paths into account; I assume that the classes are in the same directory as the FLA&#8217;s. Â You can easily change this by querying <a href="http://help.adobe.com/en_US/flash/cs/extend/WS5A00B146-30BC-4841-A27F-325968E8084B.html">fl.getDocumentDOM().sourcePath</a>, or just hardcoding your known path.</p>
<pre lang="Javascript">fl.outputPanel.clear();
fl.trace("*** Checking for un-found classes... ***");
var totalNotFound = 0;

var doc = fl.getDocumentDOM();
var lib = doc.library;
var items = lib.items;

var itemsLen = items.length;

for(var i = 0; i &lt; itemsLen; i++)
{

	var item = items[i];
	/*
	fl.trace("--------------");
	for(var prop in item)
	{
		fl.trace(prop + "::" + item[prop]);
	}
	*/

	if(item.linkageExportForAS)
	{
		var className = item.linkageClassName;
		var classPath = className.split(".").join("/");
		var exists = doesClassExistOnDisk(classPath);
		if(exists == false)
		{
			totalNotFound++;
			fl.trace("Couldn't find class for '" + item.name + "', class: " + className);
		}
	}

}

if(totalNotFound == 0)
{
	fl.trace("*** DONE. All classes found.");
}
else
{
	fl.trace("*** DONE. " + totalNotFound + " classes not found.");
}

function doesClassExistOnDisk(classPath)
{
	var filename = classPath + ".as";
	var doc = fl.getDocumentDOM();
	var currentFolder = doc.pathURI.split(doc.name).join("");
	var fullURI = currentFolder + filename;
	//fl.trace("fullURI: " + fullURI);
	return FLfile.exists(fullURI);
}</pre>
<p>On a side note, <a href="http://summitprojectsflashblog.wordpress.com/">Dru Kepple has a lot of wonderful JSFL classes</a> to help working with ActionScript in the Flash IDE, specifically <a href="http://summitprojectsflashblog.wordpress.com/2010/11/29/jsfl-get-notifications-on-a-bad-document-class/">the Document class.</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessewarden.com/2010/12/jsfl-script-to-ensure-actual-actionscript-classes-exist-for-symbols.html/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
