





<?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>xJSFL</title>
	<atom:link href="http://www.xjsfl.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.xjsfl.com</link>
	<description>The rapid development framework for extending Adobe Flash</description>
	<lastBuildDate>Sun, 07 Apr 2013 22:30:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Custom Icons in Snippets panel</title>
		<link>http://www.xjsfl.com/blog/custom-icons-in-snippets-panel</link>
		<comments>http://www.xjsfl.com/blog/custom-icons-in-snippets-panel#comments</comments>
		<pubDate>Sat, 23 Mar 2013 21:12:57 +0000</pubDate>
		<dc:creator>Dave Stewart</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.xjsfl.com/?p=1009</guid>
		<description><![CDATA[The Snippets panel does a great job at organising your JSFL scripts, but there's still a few things incomplete and/or missing. File-based icons One of these things is custom icons. Whilst the supplied FamFam icon set is pretty good, often there's no icon that's "just right". The solution to this up until now has been [...]]]></description>
			<content:encoded><![CDATA[<p>The Snippets panel does a great job at organising your JSFL scripts, but there's still a few things incomplete and/or missing.</p>
<h3>File-based icons</h3>
<p>One of these things is custom icons. Whilst the supplied FamFam icon set is pretty good, often there's no icon that's "just right". The solution to this up until now has been to simply supply an alternative URL:</p>
<pre>/**
 * My awesome snippet
 * @icon {user}assets/icons/awesome.png
 */</pre>
<p>This is great when you're just using the snippet yourself, but not so convenient when you need to distribute scripts amongst your co-workers or such like.</p>
<h3>Text-based icons</h3>
<p>The next release of the Snippets panel supports encoding of icon data into the snippet DocComment itself, by way of a Base64-encoded string.</p>
<pre>/**
 * This file demonstrates using a custom icon
 * @icon data:AAAAAAAAAAAAAAAAggAAAKoAAAAqAAAAAAAAAAAAAAAAAAAAAAAAACoAAACrAAAAggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG4AAACAAAAAKgAAAAAAAAAAAAAAAAAAAAAAAAArAAAAgQAAAG4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKwAAAKgAAAB8AAAAAAAAAAAAAAB9AAAAqQAAACsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsAAACpAAAAfQAAAAAAAAAAAAAAfQAAAKoAAAArAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIUAAACuAAAAqgAAAKgAAACmAAAApwAAAKgAAACrAAAArwAAAIYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACGAAAAsAAAAKwAAACpAAAApwAAAKgAAACqAAAArQAAALAAAACHAAAAAAAAAAAAAAAAAAAAAAAAAHEAAAC5AAAAtQAAAFkAAAAAAAAAfwAAAKgAAACpAAAAgAAAAAAAAABaAAAAtgAAALkAAABxAAAAAAAAAAAAAAByAAAAuwAAALYAAABaAAAAAAAAAIEAAACqAAAAqwAAAIEAAAAAAAAAWgAAALcAAAC7AAAAcgAAAAAAAADDAAAAwAAAAL0AAAC4AAAAtAAAALAAAACtAAAAqwAAAKwAAACuAAAAsQAAALUAAAC5AAAAvQAAAMAAAADDAAAAxQAAAKoAAACOAAAAogAAALUAAACyAAAArwAAAK0AAACuAAAAsAAAALMAAAC2AAAAogAAAI4AAACqAAAAxQAAAMYAAABiAAAAAAAAAIwAAAC3AAAAswAAALAAAACuAAAArwAAALEAAAC0AAAAuAAAAI0AAAAAAAAAYgAAAMYAAADIAAAAYwAAAAAAAACNAAAAuAAAAC4AAAAAAAAAAAAAAAAAAAAAAAAALgAAALkAAACOAAAAAAAAAGMAAADIAAAAAAAAAAAAAAAAAAAAjgAAALoAAAAuAAAAAAAAAAAAAAAAAAAAAAAAAC4AAAC7AAAAjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvAAAAtwAAAIcAAAAAAAAAAAAAAIgAAAC4AAAALwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAUAAAAKAAAAOQAAALgAAACMAAAAGgAAABoAAACMAAAAuQAAADkAAAAKAAAABQAAAAEAAAAAAAAAAAAAAAEAAAAFAAAACgAAABAAAAAVAAAAGQAAABoAAAAaAAAAGQAAABUAAAAQAAAACgAAAAUAAAABAAAAAAAAAA==
 */</pre>
<p>The result of this 1.3K string is a completely custom icon in the Snippets panel, which will go wherever the snippet goes:</p>
<p><img title="snippets-custom-icons" src="http://www.xjsfl.com/wp-content/uploads/snippets-custom-icons.png" alt="" width="429" height="194" /></p>
<p>The new Snippets panel will also finally have an icon chooser, as well as a conversion tool to convert any image you pick from your hard drive into the Base64-encoded string.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xjsfl.com/blog/custom-icons-in-snippets-panel/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Publish Hooks library for Flash</title>
		<link>http://www.xjsfl.com/blog/publish-hooks-library-for-flash</link>
		<comments>http://www.xjsfl.com/blog/publish-hooks-library-for-flash#comments</comments>
		<pubDate>Sat, 12 Jan 2013 04:10:01 +0000</pubDate>
		<dc:creator>Dave Stewart</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.xjsfl.com/?p=1000</guid>
		<description><![CDATA[A topic came up in the CS7 Beta pre-release channel yesterday about adding a new feature to Flash, Publishing Hooks. The idea was that 2 new file pickers would be added to the Publish Settings dialog: Execute before publish Execute after publish This would allow the user to do some pre-publish cleanup, or some post-publish [...]]]></description>
			<content:encoded><![CDATA[<p>A topic came up in the CS7 Beta pre-release channel yesterday about adding a new feature to Flash, Publishing Hooks. The idea was that 2 new file pickers would be added to the Publish Settings dialog:</p>
<ul>
<li>Execute before publish</li>
<li>Execute after publish</li>
</ul>
<p>This would allow the user to do some pre-publish cleanup, or some post-publish action, such a uploading a file.</p>
<p>The thing is, however, we can do this right now inside of Flash with Events!</p>
<p>It took me about 10 minutes to whip up some proof-of-concept code, another 5 to add an interface, then another 5 or so to ensure the UI saved and loaded settings, then about an hour or so to create a class out of this lot, add in some extra flexibility, some comments, and say "That'll do".</p>
<p>You can take a look at the source code as a gist on <a href="https://gist.github.com/4516020">GitHub</a>.</p>
<p>Here's the UI written in one line of code (including populating already-defined values) using xJSFL's <a href="http://www.xjsfl.com/support/api/ui/xul">XUL</a> class:</p>
<p style="text-align: center;"><img class="aligncenter size-full" title="publish-hooks-ui" src="http://www.xjsfl.com/wp-content/uploads/publish-hooks-ui.png" alt="" /></p>
<p>Compare that to the amount of time it would take to request the feature, have it accepted, implement it in C++, along with any QA and the rest, plus the fact that once it's in, there's no flexibility - and I think you can see you have a pretty powerful argument for implementing <em>some</em> things in JSFL.</p>
<p>The final class does the following:</p>
<ul>
<li>Runs pre and post publish hooks (any file on your hard drive, even other JSFL scripts)</li>
<li>Has a simple XUL UI to browse for files</li>
<li>Can load and save different profiles, say one for games, one for web</li>
<li>Stores setting in an XML config file (but could just as easily store those settings per document using document data)</li>
<li>Can be set as Active or Inactive should you decide you need to disable it</li>
</ul>
<p>It's instantiated as simply as possible, like so:</p>
<pre lang="javascript">// instantiate a "games" profile
    var hooks = new PublishHooks('games');

// bring up the ui
    hooks.edit();</pre>
<p>The config for all profiles is managed by the <a href="http://www.xjsfl.com/support/api/framework/config">Config</a> class, and stored in a single file in the <strong>xJSFL/user/config</strong> folder:</p>
<pre lang="xml">&lt;config&gt;
    &lt;default&gt;
        &lt;active&gt;false&lt;/active&gt;
        &lt;pre&gt;file:///F|/Users/Dave%20Stewart/Desktop/test.swf&lt;/pre&gt;
        &lt;post&gt;file:///F|/Users/Dave%20Stewart/Desktop/somefile.exe&lt;/post&gt;
    &lt;/default&gt;
    &lt;games&gt;
        &lt;active&gt;true&lt;/active&gt;
        &lt;pre&gt;file:///E|/Projects/xJSFL/user/jsfl/hooks/pre.jsfl&lt;/pre&gt;
        &lt;post&gt;file:///E|PProjects/xJSFL/user/jsfl/hooks/post.jsfl&lt;/post&gt;
    &lt;/games&gt;
&lt;/config&gt;</pre>
<p>And here's a quick screenshot of a basic JSFL script being run right after publishing:</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid #cccccc;" title="publish-hooks" src="http://www.xjsfl.com/wp-content/uploads/publish-hooks.png" alt="" width="565" height="445" /></p>
<p>If you want to use the class, ensure you have the <a href="https://github.com/davestewart/xJSFL">latest xJSFL</a> from the repo (as the <a href="http://www.xjsfl.com/support/api/flash/events#event-types">Event types</a> have been updated) and download <a href="http://www.xjsfl.com/wp-content/uploads/PublishHooks.zip">PublishHooks.zip</a>.</p>
<p>The file contains both the class (save to your <strong>xJSFL/user/jsfl/libraries</strong> folder to run at startup) and a script to pop up the editing UI, which you can run as a Command from the Flash Commands folder or as a <a href="http://www.xjsfl.com/feature/snippets-panel">Snippet</a> from the xJSFL Snippets folder.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xjsfl.com/blog/publish-hooks-library-for-flash/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Managing code</title>
		<link>http://www.xjsfl.com/support/tutorials/workflow/managing-code</link>
		<comments>http://www.xjsfl.com/support/tutorials/workflow/managing-code#comments</comments>
		<pubDate>Sat, 29 Sep 2012 14:20:37 +0000</pubDate>
		<dc:creator>Dave Stewart</dc:creator>
				<category><![CDATA[Common workflows]]></category>

		<guid isPermaLink="false">http://www.xjsfl.com/?p=983</guid>
		<description><![CDATA[How to load external files and modules, that don]]></description>
			<content:encoded><![CDATA[<h2>Loading external libraries</h2>
<p>If you want to load external files with xJFSL, it's as simple as providing a path or URI to the file:</p>
<pre lang="javascript">load('c:/path/to/library.jsfl'); // absolute
load('library.jsfl'); // relative</pre>
<p>If you want to load a library over the network, simply specify a UNC URI, like so:</p>
<pre lang="javascript">load('file:////&lt;servername&gt;/&lt;drivename&gt;/path/to/library.jsfl');</pre>
<p>The best place to load external libraries if you want to use them each time is in your user bootstrap, which can be found at:</p>
<pre>xJSFL/user/jsfl/bootstrap.jsfl</pre>
<p>You can do this just by including the <strong>load()</strong> line above, and specifying the file you want to load.</p>
<h2>Loading external modules</h2>
<h3>Overview</h3>
<p>xJSFL's folder structure is designed so you can keep all JSFL-related files in one place, but you can also load code from other folders, or even over the network. This is useful in larger teams where you need a central repository of code, or where you have projects saved in different locations.</p>
<h3>Code</h3>
<p>There are 2 main core methods that take care of loading or finding modules:</p>
<ul>
<li><a href="http://www.xjsfl.com/support/api/core/xjsfl#modules-init">xjsfl.modules.init()</a> - initializes a specific module</li>
<li><a href="http://www.xjsfl.com/support/api/core/xjsfl#modules-find">xjsfl.modules.find()</a> - finds all modules on a path, then initializes them</li>
</ul>
<p>Each of them accepts as its first argument an absolute URI.</p>
<p>Once you know the URI to your module, simply add some code in your user bootstrap and have the module load each time xJSFL loads:</p>
<pre lang="javascript">xjsfl.output.trace('Loading Animation Tools...', true);
xjsfl.modules.init('file:///X|/repo/xJSFL/modules/Animation%20Tools/');</pre>
<p>Upon restarting Flash you should see something like the following in the output panel:</p>
<pre>&gt; xjsfl: LOADING ANIMATION TOOLS MODULE...

&gt; xjsfl: REGISTERING MODULE "ANIMATION TOOLS"
&gt; xjsfl: added 14 search paths for "X:/repo/xJSFL/modules/Animation Tools/"
&gt; xjsfl: assets are already up to date
&gt; xjsfl: ready!</pre>
<p>If you want to load files over a network, then simply use the network path with UNC notation (note the 4 slashes):</p>
<pre lang="javascript">xjsfl.modules.init('file:////SERVER/Files/repo/xJSFL/modules/Animation%20Tools/');</pre>
<p>Then, when flash starts, it simply looks in this network location to load the module! Flash doesn't really care – it's still just a URI at the end of the day.</p>
<p>If you have a repo with multiple xJSFL modules in, you can use the <a href="http://www.xjsfl.com/support/api/core/xjsfl#modules-find">find</a> method, and just point to the top-most folder. Note the trailing <strong>true</strong>, which instructs the modules to initialize (have its bootstrap file run) as well:</p>
<pre lang="javascript">xjsfl.output.trace('Finding modules to load...', true);
xjsfl.modules.find('file:///X|/repo/xJSFL/modules/', true);</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xjsfl.com/support/tutorials/workflow/managing-code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top JSFL bugs to fix</title>
		<link>http://www.xjsfl.com/blog/top-jsfl-bugs-to-fix</link>
		<comments>http://www.xjsfl.com/blog/top-jsfl-bugs-to-fix#comments</comments>
		<pubDate>Sat, 15 Sep 2012 17:53:00 +0000</pubDate>
		<dc:creator>Dave Stewart</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.xjsfl.com/?p=975</guid>
		<description><![CDATA[I'm lucky enough to be Beta testing the new CS7 version of Flash, and even luckier to get a very small amount of say regarding the JSFL implementation for the final release. I'm under NDA, so that's pretty much all I can say here :) One of my main aims is to get Adobe to [...]]]></description>
			<content:encoded><![CDATA[<p>I'm lucky enough to be Beta testing the new CS7 version of Flash, and even luckier to get a very small amount of say regarding the JSFL implementation for the final release. I'm under NDA, so that's pretty much all I can say here :)</p>
<p>One of my main aims is to get Adobe to fix some of the show-stopping bugs in JSFL, so here’s my list, in order of importance:</p>
<ol>
<li>Fix all empty JSFL error messages, especially inside of fl.runScript() (<a title="http://www.xjsfl.com/support/guides/debugging/strategies-for-debugging#deciphering-misleading-error-messages" href="http://www.xjsfl.com/support/guides/debugging/strategies-for-debugging#deciphering-misleading-error-messages">link</a>)</li>
<li>Make sure Timeline and Frame events fire in the correct order (<a title="http://www.xjsfl.com/support/api/flash/Events#native-jsfl-event-model-limitations" href="http://www.xjsfl.com/support/api/flash/Events#native-jsfl-event-model-limitations">link</a>)</li>
<li>Ensure library item selection updates properly for library.setSelected()(<a title="http://www.xjsfl.com/support/appendix/knowledgebase/jsfl-gotchas#library" href="http://www.xjsfl.com/support/appendix/knowledgebase/jsfl-gotchas#library">link</a>)</li>
<li>Fix frame and timeline setSelection bug, which seems to toggle, not set, selections (<a title="http://www.xjsfl.com/support/appendix/knowledgebase/jsfl-gotchas#timeline" href="http://www.xjsfl.com/support/appendix/knowledgebase/jsfl-gotchas#timeline">link</a>)</li>
<li>Fix matrix bug in setCustomFill()(<a title="http://www.xjsfl.com/support/appendix/knowledgebase/jsfl-gotchas#stage" href="http://www.xjsfl.com/support/appendix/knowledgebase/jsfl-gotchas#stage">link</a>)</li>
<li>Have all XUL elements dispatch change events</li>
<li>Have all XUL element values be settable via JSFL</li>
<li>Ensure running scripts do not timeout after 20 seconds or so when getting values from a XUL dialog (<a title="http://www.xjsfl.com/support/appendix/knowledgebase/jsfl-gotchas#xul" href="http://www.xjsfl.com/support/appendix/knowledgebase/jsfl-gotchas#xul">link</a>)</li>
<li>Fix E4X pre-declarate filtering, so you don’t need to do this to use E4X filters: var b =  a.*.(function::attribute("id") == ’b’); (<a title="http://www.xjsfl.com/support/appendix/knowledgebase/jsfl-gotchas#e4x" href="http://www.xjsfl.com/support/appendix/knowledgebase/jsfl-gotchas#e4x">link</a>)</li>
<li>Would be great if relative file paths worked! Relative to the JSFL file, ideally. (<a title="http://www.xjsfl.com/support/guides/framework-basics/file-handling#uri-juggling" href="http://www.xjsfl.com/support/guides/framework-basics/file-handling#uri-juggling">link</a>)</li>
</ol>
<p>And while we're at it, some feature requests:</p>
<ol>
<li>Access values in the middle of a tween</li>
<li>Unlimited workspace area</li>
<li>Add JSFL access to undo / redo or history states</li>
<li>Add "begin undo" and "end undo" commands, with support for try/catch</li>
<li>Make JSFL access on shapes less twitchy and crash-prone</li>
<li>Access to stage pan as well as zoom (so we could zoom to object)</li>
<li>Ability get the currently-edited-in-place timeline's path to top-most-parent timeline</li>
<li>JSFL "PropertyChanged" event</li>
<li>JSFL right-click menu item and registerable commands</li>
</ol>
<p>What do you think?</p>
<p>I’m sure there’s some real gotchas I’ve forgotten, so please add to this list, along with the number in the list you think the fix should go at, and I'll see what I can do about raising them.</p>
<p>Cheers,<br />
Dave</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xjsfl.com/blog/top-jsfl-bugs-to-fix/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>xJSFL Developer Questionnaire</title>
		<link>http://www.xjsfl.com/blog/xjsfl-developer-questionnaire</link>
		<comments>http://www.xjsfl.com/blog/xjsfl-developer-questionnaire#comments</comments>
		<pubDate>Mon, 02 Jul 2012 13:15:34 +0000</pubDate>
		<dc:creator>Dave Stewart</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.xjsfl.com/?p=949</guid>
		<description><![CDATA[Now the battle to code xJSFL is over, I'm now looking to start actively promoting it. I'd like to add a Case Studies section to the site, and have some practical information that new studios or developers can look over to help them understand the benefits of using xJSFL as part of their production pipeline. [...]]]></description>
			<content:encoded><![CDATA[<p>Now the battle to code xJSFL is over, I'm now looking to start actively promoting it.</p>
<p>I'd like to add a <a href="http://www.xjsfl.com/case-studies">Case Studies</a> section to the site, and have some practical information that new studios or developers can look over to help them understand the benefits of using xJSFL as part of their production pipeline.</p>
<p>As such, I've put together some questions that you could answer, or you could just put down whatever thoughts you have. As long as you <a href="http://www.xjsfl.com/feature/pocket-god">share your experiences</a>, big or small, that's good enough for me.</p>
<p>If you'd like to help, please download the following Word document, answer the questions, then mail it back to me:</p>
<ul>
<li><a href="http://www.xjsfl.com/wp-content/uploads/xJSFL-developer-questionnaire.doc">xJSFL Developer Questionnaire</a></li>
</ul>
<p>It goes without saying that I would be <em>extremely</em> grateful for the support, but more importantly it will really help the framework gain some much-needed industry kudos, ultimately supporting its ongoing survival :)</p>
<p>Thanks very much,</p>
<p>Dave Stewart</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xjsfl.com/blog/xjsfl-developer-questionnaire/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xJSFL 1.01</title>
		<link>http://www.xjsfl.com/blog/xjsfl-1-01</link>
		<comments>http://www.xjsfl.com/blog/xjsfl-1-01#comments</comments>
		<pubDate>Thu, 28 Jun 2012 01:22:42 +0000</pubDate>
		<dc:creator>Dave Stewart</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.xjsfl.com/?p=944</guid>
		<description><![CDATA[Tonight I've just released the 1.01 update for xJSFL to GitHub. It comprises a bunch of new features, some updated content, and a few niggly bug fixes. It shouldn't need a fresh install, but you may want to delete the xJSFL/core/assets/install/ folder afterwards, as it's moved one level up. Changelist New features Added Utils.bind() Added [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight I've just released the <a href="https://github.com/davestewart/xJSFL/zipball/1.01">1.01 update</a> for xJSFL to <a href="https://github.com/davestewart/xJSFL">GitHub</a>. It comprises a bunch of new features, some updated content, and a few niggly bug fixes.</p>
<p>It shouldn't need a fresh install, but you may want to delete the xJSFL/core/assets/install/ folder afterwards, as it's moved one level up.</p>
<h4>Changelist</h4>
<p>New features</p>
<ul>
<li>Added <a href="http://www.xjsfl.com/support/api/utils/Utils#bind">Utils.bind()</a></li>
<li>Added <a href="http://www.xjsfl.com/support/api/utils/Utils#parseexpression">Utils.parseExpression()</a></li>
<li>Added <a href="http://www.xjsfl.com/support/api/utils/Utils#columnizetext">Utils.columnizeText()</a></li>
<li>Added <a href="http://www.xjsfl.com/support/api/flash/ActionScript#getclass">ActionScript.getClass()</a> and refactored <a href="http://www.xjsfl.com/support/api/flash/ActionScript#getbaseclass">ActionScript.getBaseClass()</a></li>
<li>Added <a href="http://www.xjsfl.com/support/api/elements/ElementSelector#scriptable">:scriptable</a> element selector</li>
<li>Added <a href="http://www.xjsfl.com/support/api/elements/ItemSelector#sound">:sound</a> item selector</li>
<li>Added <a href="http://www.xjsfl.com/support/api/flash/JSFLConstants">JSFLConstants</a> library</li>
<li>Added support in File for <a href="http://www.xjsfl.com/support/api/file/FileSystem#file.open">opening</a> XFL files</li>
<li>Added <a href="http://www.xjsfl.com/support/api/core/xjsfl#settings-app">xjsfl.settings.app.os.win and mac</a> properties</li>
</ul>
<p>New Content</p>
<ul>
<li>Added Declare Library Bitmaps snippet</li>
<li>Rewrote Declare Stage Instances snippet to be pure xJSFL (went from 200 to 50 lines)</li>
<li>Updated example files</li>
</ul>
<p>Bug fixes</p>
<ul>
<li>Refactored <a href="http://www.xjsfl.com/support/api/file/URI#touri">URI.toURI()</a> and <a href="http://www.xjsfl.com/support/api/file/URI#topath">URI.toPath()</a> methods to properly handle absolute/relative Macintosh paths</li>
<li>Fixed bugs in <a href="http://www.xjsfl.com/support/api/framework/Config#get">Config get()</a> (it now passes back XML with attributes as XML, but simple content as Numbers, Strings, etc)</li>
<li>Updated <a href="http://www.xjsfl.com/support/api/elements/Collection#attr">ItemCollection.attr()</a> to update itself after attributes are changed</li>
<li>Fixed bug with name selector expression eating following selectors</li>
<li>Fixed various bugs in user Snippets files</li>
<li>Snippets panel now remembers open/closed states on rebuild or refresh</li>
<li>Added <a href="https://github.com/davestewart/xJSFL/commit/85e405de01a4bc7cce0774b2d1f644894eeeeb09">UTF8 BOM</a> to all JSFL files (so Asian users, you should now be good to go!)</li>
</ul>
<p>Updates</p>
<ul>
<li><a href="http://www.xjsfl.com/support/api/utils/utils#glob">Utils.glob()</a> now lets you pass in a single wildcard path, rather than separate folder + path arguments</li>
<li><a href="http://www.xjsfl.com/support/api/utils/utils#glob">glob</a> paths now accepted in <a href="http://www.xjsfl.com/support/api/core/xjsfl#file-load">xjsfl.file.load()</a> and <a href="http://www.xjsfl.com/support/api/file/URIList">URIList</a></li>
<li>Refactored <a href="http://www.xjsfl.com/support/api/elements/ItemCollection">ItemCollection</a>.library to ItemCollection.getLibrary()</li>
<li>Refactored Selectors.parseCSS() and <a href="http://www.xjsfl.com/support/api/ui/XUL#add">XUL.add()</a> to use <a href="http://www.xjsfl.com/support/api/utils/Utils#parseexpression">Utils.parseExpression()</a></li>
</ul>
<p>Installer updates</p>
<ul>
<li>Moved installation files from core/assets/install to core/install/</li>
<li>Shows full paths when copying/removing files</li>
<li>Removes old commands when reinstalling</li>
<li>Added xJSFL folder check</li>
<li>Uses <a href="http://www.xjsfl.com/support/api/utils/utils#glob">Utils.glob()</a> to detect URIs</li>
</ul>
<p>Documentation</p>
<ul>
<li>Rewrote <a href="www.xjsfl.com/support/guides/framework-basics/file-handling">File Handling</a> section, and specifically the <a href="www.xjsfl.com/support/guides/framework-basics/file-handling#uri-juggling">URI Juggling</a> section</li>
<li>Added new documentation for new methods</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.xjsfl.com/blog/xjsfl-1-01/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How big is xJSFL?</title>
		<link>http://www.xjsfl.com/blog/how-big-is-xjsfl</link>
		<comments>http://www.xjsfl.com/blog/how-big-is-xjsfl#comments</comments>
		<pubDate>Tue, 26 Jun 2012 13:39:41 +0000</pubDate>
		<dc:creator>Dave Stewart</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.xjsfl.com/?p=943</guid>
		<description><![CDATA[I have some code in my development folder that tells me how big the framework is at any one time, in terms of files and lines of code. It lists: All files The total lines of JSFL / AS3 code found The minimum lines (no white space or comments) of JSFL / AS3 code found [...]]]></description>
			<content:encoded><![CDATA[<p>I have some code in my development folder that tells me how big the framework is at any one time, in terms of files and lines of code.</p>
<p>It lists:</p>
<ul>
<li>All files</li>
<li>The total lines of JSFL / AS3 code found</li>
<li>The minimum lines (no white space or comments) of JSFL / AS3 code found</li>
</ul>
<p>These are the results:</p>
<pre>+---------+-------------------------------+-------+-------------+-----------+
| name    | path                          | files | total lines | min lines |
+---------+-------------------------------+-------+-------------+-----------+
| base    | xJSFL/                        |   332 |       65312 |     42358 |
| core    | xJSFL/core/                   |   233 |       60110 |     38430 |
| jsfl    | xJSFL/core/jsfl/              |    60 |       25926 |     17278 |
| as3     | xJSFL/core/as3/lib/com/xjsfl/ |    67 |        9604 |      7348 |
| modules | xJSFL/modules/                |    61 |        3032 |      2226 |
| user    | xJSFL/user/jsfl/              |    26 |        2003 |      1569 |
+---------+-------------------------------+-------+-------------+-----------+</pre>
<p>A few things to notice here:</p>
<ul>
<li>There's around 18,000 lines of JSFL code in the xJSFL core. This compares to about 9000 lines of javaScript in jQuery, which arguably supplies much less functionality in the core package</li>
<li>The code written appears to be about 2/3 code, and 1/3 white space or comments. Whilst this seems like a lot, I am quite particular about making sure that all methods and parameters are commented, and that files are broken up with white space and additional headings to make them easy to read and navigate</li>
<li>The size has more of less doubled from about a year ago, which makes sense as there's a lot of new classes, and a lot of demo code included.</li>
</ul>
<p>So there you go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xjsfl.com/blog/how-big-is-xjsfl/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xJSFL 1.0</title>
		<link>http://www.xjsfl.com/blog/1-0-release</link>
		<comments>http://www.xjsfl.com/blog/1-0-release#comments</comments>
		<pubDate>Mon, 18 Jun 2012 09:31:00 +0000</pubDate>
		<dc:creator>Dave Stewart</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.xjsfl.com/?p=842</guid>
		<description><![CDATA[Well, it's been a long time coming (2 years, to be precise!) but the framework finally has its 1.0 release! Note: as of June 28, there's also the 1.01 release :) It's pretty much production ready; all the classes, features, changes and fixes that I've been wanting to put in over the last 9 months [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it's been a long time coming (2 years, to be precise!) but the framework finally has its 1.0 release!</p>
<p><strong>Note:</strong> as of June 28, there's also the <a href="http://www.xjsfl.com/blog/xjsfl-1-01">1.01 release</a> :)</p>
<p>It's pretty much production ready; all the classes, features, changes and fixes that I've been wanting to put in over the last 9 months are pretty much there.</p>
<p>However, there have been some BIG changes since the Beta!</p>
<h3>Changelist</h3>
<p>The major changes are:</p>
<ul>
<li>A <em>complete</em> rewrite of <a href="http://www.xjsfl.com/support/api/file/uri">URI</a> creation and <a href="http://www.xjsfl.com/support/guides/framework/file-handling">file handling</a></li>
<li>A major restructuring of the internal file structure, file searching, and loading mechanisms</li>
<li><strong>Komodo &gt; Flash</strong> integration has been updated (so you'll need to reinstall the latest xJSFL extension)</li>
<li>Overhauled bootstrap:</li>
<ul>
<li>Moved <strong>xjsfl.output</strong> methods <strong>log()</strong> and <strong>trace()</strong> to bootstrap</li>
<li>Implemented actual file logging (so you can debug startup errors more easily)</li>
<li>Moved responsibility for loading user classes to <a href="http://www.xjsfl.com/support/guides/framework/xjsfl-environment">user bootstrap</a></li>
</ul>
<li><strong>xjsfl.utils</strong> moved to a new <a href="http://www.xjsfl.com/support/api/utilities/utils">Utils</a> class</li>
</ul>
<p>New features are:</p>
<ul>
<li>Support for <strong>location-relative paths</strong>, i.e. <strong>load('some file.jsfl')</strong></li>
<li>Support for user-written <a href="http://www.xjsfl.com/support/api/elements/selectors#custom-selectors">custom selectors</a><strong></strong> such as <strong>:blurred</strong></li>
<li>Support for deep-attribute notation in Selectors, such as <strong>[libraryItem.name=Symbol 5]</strong></li>
<li>Assets in <strong><strong>&lt;module&gt;/flash/*</strong></strong> are now automatically copied to <strong><strong>Flash/Configuration/</strong></strong> on startup</li>
<li><strong>xjsfl.file.load()</strong> now detects errors in loaded jsfl files, and <em>meaningfully</em> warn the user (although disabled for v1.0, coming in v1.1)</li>
<li>Profile-specific folder can now be added to <strong>flash/&lt;lang&gt;/Configuration/xJSFL/...</strong></li>
<li>XUL can now load and manage manually-written XUL definitions</li>
<li>Improved installation routine and new uninstalltion routine</li>
</ul>
<p>New classes and code are:</p>
<ul>
<li>New <a href="http://www.xjsfl.com/support/guides/framework-basics/globals-overview">globals</a> - <strong>list(), format(), load(), save(), include(), require()</strong></li>
<li>New classes - <a href="http://www.xjsfl.com/support/api/utilities/utils">Utils,</a> <a title="SimpleTemplate (class)" href="http://www.xjsfl.com/support/api/text/simple-template">SimpleTemplate</a>, <a href="http://www.xjsfl.com/support/api/utilities/property-resolver">PropertyResolver</a>, <a title="URI (library)" href="http://www.xjsfl.com/support/api/file/uri">URI</a>, <a href="http://www.xjsfl.com/support/api/file/uri-list">URIList</a>, <a title="Source (library)" href="http://www.xjsfl.com/support/api/utilities/source">Source</a>, <a href="http://www.xjsfl.com/support/api/utilities/utils">Utils</a>, <a href="http://www.xjsfl.com/support/api/datatypes/color">Color</a>, <a href="http://www.xjsfl.com/support/api/ui/UI">UI</a>, <a href="http://www.xjsfl.com/support/api/flash/ActionScript">ActionScript</a>, <a href="http://www.xjsfl.com/support/api/framework/Globals">Globals</a>, <a href="http://www.xjsfl.com/support/api/objects/json">JSON</a>,<strong><br />
</strong></li>
<li>New object extensions on <a href="http://www.xjsfl.com/support/api/objects/string">String</a>, <a href="http://www.xjsfl.com/support/api/objects/date">Date</a>, <a href="http://www.xjsfl.com/support/api/objects/xml">XML</a></li>
<li>New utility methods - <a href="http://www.xjsfl.com/support/api/utilities/utils#getDeepValue">getDeepValue()</a>, <a href="http://www.xjsfl.com/support/api/utilities/utils#setDeepValue">setDeepValue()</a>, <a href="http://www.xjsfl.com/support/api/utilities/utils#getURIs">getURIs()</a>, <a href="http://www.xjsfl.com/support/api/utilities/utils#getSearchableURIs%28%29">getSearchableURIs()</a>, <a href="http://www.xjsfl.com/support/api/utilities/utils#combine%28%29">combine()</a>, <a href="http://www.xjsfl.com/support/api/utilities/utils#walk%28%29">walk()</a>, <a href="http://www.xjsfl.com/support/api/utilities/utils#walkFolder%28%29">walkFolder()</a>, <a href="http://www.xjsfl.com/support/api/utilities/utils#makeTree">makeTree()</a><strong></strong> (and many more)</li>
<li>New xJSFL Commands - <strong>Reload, </strong><strong>Configuration, View Folder<br />
</strong></li>
</ul>
<p>Minor changes are:</p>
<ul>
<li>The<strong> Data.recurse()</strong> methods have been moved to Utils, and now support skipping and finding</li>
<li><strong>Folder</strong> now has cross-platform <strong>open()</strong> and <strong>copy()</strong> methods, and <strong>uris</strong> property<strong><br />
</strong></li>
<li><strong>Template</strong> placeholders now support deep properties, i.e. <strong>"The value is {object.value}"</strong></li>
<li><strong>Logger</strong> class rewritten to support <strong>placeholder</strong> variables</li>
<li><strong>Table</strong> now supports <strong>captions</strong> and <strong>single-object</strong> printing</li>
<li>Long URIs (&gt;260 chars) now throw errors, rather than failing silently</li>
<li>Library<strong> Item</strong> instances now have <strong>shortName</strong> property</li>
<li>Timeline has <strong>selectedLayers</strong> getter that returns an Array of <strong>Layer</strong> instances</li>
<li><strong><strong>$selection</strong></strong> can now be set</li>
</ul>
<p>Removals are:</p>
<ul>
<li>Removed <strong>$dir</strong> global variable</li>
<li>Removed <strong>Base</strong> class</li>
<li>Removed <strong>xjsfl.get</strong> (moved to <a href="http://www.xjsfl.com/support/api/ui/UI">UI</a>)<strong><br />
</strong></li>
<li>Removed <strong>xjsfl.utils</strong> (moved to <a href="http://www.xjsfl.com/support/api/utilities/utils">Utils</a>)<strong><br />
</strong></li>
</ul>
<p>As well as:</p>
<ul>
<li>A whole bunch of minor fixes &amp; improvements</li>
<li>Updated example files in <strong>modules/Code Examples/</strong></li>
</ul>
<p>There are a bunch of changes and minor bugs / nice-to-haves that are also on the slate for <a href="http://www.xjsfl.com/roadmap">later versions</a>.</p>
<h3>xJSFL 1.0 Framework Schematic</h3>
<p>The following (updated) schematic shows the various components, classes and scripts that come with the 1.0 release of the framework:</p>
<p><a href="http://www.xjsfl.com/wp-content/uploads/xjsfl-1-01-api.png"><img title="xJSFL 1.0 API" src="http://www.xjsfl.com/wp-content/uploads/xjsfl-1-01-api-580x377.png" alt="" width="580" height="377" /></a></p>
<h3>Documentation</h3>
<p>The documentation has been gone through with a fine-toothed comb, and the <a href="http://www.xjsfl.com/support#guides">Guides</a> and <a href="http://www.xjsfl.com/support#api">API</a> section are now fully up to date, although the <a href="http://www.xjsfl.com/support#as3">AS3 Module Framework</a> is still lacking, as are the <a href="http://www.xjsfl.com/support#tutorials">Tutorial</a> sections.</p>
<h3>Installation</h3>
<p>See the installation notes at: <a href="http://www.xjsfl.com/support/setup/quick-start/installation">www.xjsfl.com/support/setup/quick-start/installation</a></p>
<p><strong>Beta users</strong>: the names of some installation files have changed, so <strong>before</strong> installation, you may want to manually delete any xJSFL files in Flash's user configuration folder:</p>
<ul>
<li>Commands/xJSFL (this should get cleaned up automatically)</li>
<li>Tools (shouldn't be an issue, but doesn't hurt to remove xJSFL-related files)</li>
<li>WindowSWF (some panels have new names, just be sure to delete the old Sample or Snippets panels)</li>
</ul>
<p>&nbsp;</p>
<p>So... that's it for now! Enjoy :)</p>
<p>Cheers,<br />
Dave</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xjsfl.com/blog/1-0-release/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>xJSFL presentation at Codame San Francisco</title>
		<link>http://www.xjsfl.com/blog/xjsfl-presentation-at-codame-san-francisco</link>
		<comments>http://www.xjsfl.com/blog/xjsfl-presentation-at-codame-san-francisco#comments</comments>
		<pubDate>Mon, 06 Feb 2012 02:05:00 +0000</pubDate>
		<dc:creator>Dave Stewart</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.xjsfl.com/?p=835</guid>
		<description><![CDATA[Whilst on my travels recently, I got the chance to present xJSFL in San Francisco, at the Flash on Games (or now Codame) group, at the Adobe building. I'd literally just that morning got off a 12 hour flight from New Zealand, which had left Auckland at 3pm on Thursday, but because we crossed the [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst on my travels recently, I got the chance to present xJSFL in San Francisco, at the Flash on Games (or now <a href="http://games.codame.com/">Codame</a>) group, at the Adobe building.</p>
<p>I'd literally just that morning got off a 12 hour flight from New Zealand, which had left Auckland at 3pm on Thursday, but because we crossed the date line, landed in Los Angeles at 9:30am Thursday! I then had to book into my hotel, and spend the rest of the day getting the talk together. My Thursday was effectively 48 hours!</p>
<p>My plan for the presentation was to:</p>
<ul>
<li>present a short set of slides for the framework</li>
<li>run through a 10 minute live-coding session of the framework's features</li>
<li>demo some of the tools built for <a href="http://pocketgod.blogspot.com/">Pocket God</a>, along with Dave Castelnuovo of Bolt</li>
</ul>
<p>In the end, when our slot came up, most of the audience had been listening to about an hour and half's worth of other talks, and there was now only 5 minutes to fit everything in. With such tight constraints, I basically dumped all the live coding stuff, and Dave and I tag-teamed the preso in a much looser style.</p>
<p>It could have been a lot better, but still good to get it out there! You can see our ramblings here:</p>
<p><a href="http://games.codame.com/post/16568732561/games-coding-event-recordings-jan-18-2012">http://games.codame.com/post/16568732561/games-coding-event-recordings-jan-18-2012</a></p>
<p>It was very nice to meet a bunch of local devs as well, and I was amazed that I didn't crash too badly with the lack of sleep.</p>
<p>Thanks Bruno!</p>
<ul>
<li><a href="https://twitter.com/#%21/brunofonzi">https://twitter.com/#!/brunofonzi</a></li>
<li><a href="https://twitter.com/#%21/GAMESatCODAME">https://twitter.com/#!/GAMESatCODAME</a></li>
<li><a href="https://twitter.com/#!/davecazz">https://twitter.com/#!/davecazz</a></li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xjsfl.com/blog/xjsfl-presentation-at-codame-san-francisco/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom selectors</title>
		<link>http://www.xjsfl.com/blog/custom-selectors</link>
		<comments>http://www.xjsfl.com/blog/custom-selectors#comments</comments>
		<pubDate>Thu, 02 Feb 2012 01:40:00 +0000</pubDate>
		<dc:creator>Dave Stewart</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.xjsfl.com/?p=828</guid>
		<description><![CDATA[I got some time to tinker on the framework today, and I've finally done something I've been wanting to do for ages, which is the ability to programatically create and add your own selectors. But what does that mean? Overview Currently, if you want to select items or elements based on properties that aren't covered [...]]]></description>
			<content:encoded><![CDATA[<p>I got some time to tinker on the framework today, and I've finally done something I've been wanting to do for ages, which is the ability to programatically create and add your own selectors. But what does that mean?</p>
<h4>Overview</h4>
<p>Currently, if you want to select items or elements based on properties that aren't covered by the built-in selectors i.e. <strong>name</strong>, <strong>:symbol</strong>, <strong>[x&gt;50]</strong>, you would need to over-select items, then use a callback to filter the collection.</p>
<p>The following example selects all symbol elements, then filters them using a callback:</p>
<pre class="prettyprint">function isBlurred(element)
{
    // code for determining whether element is blurred or not
    return state;
}
var collection = $(':symbol').filter(isBlurred);</pre>
<p>While that's a perfectly valid way to select elements, rather than selecting then filtering, it would be inherently more flexible to simply define a <strong>new</strong> selector which itself could be referenced, combined and reused within CSS expressions, for example, choosing to select all blurred stage elements using an expression such as:</p>
<pre class="prettyprint">':blurred'</pre>
<p>Well, it is now possible to register your own custom <strong>:pseudo</strong> and <strong>[attribute]</strong> selectors that determine whether an element should be included in a collection via an external callback which you supply.</p>
<h4>:pseudo selectors</h4>
<p>In the case of the above example, we would register a <strong>custom pseudo</strong> selector called <strong>:blurred</strong> to a function that determines if the element is blurred or not:</p>
<pre class="prettyprint">function blurred(element)
{
    function callback(filter)
    {
        return filter.name === 'blurFilter' &amp;&amp; filter.enabled &amp;&amp; filter.strength &gt; 0;
    }
    return element.filters &amp;&amp; element.filters.some(callback);
}
Selectors.element.register(':blurred', blurred);</pre>
<p>Note the colon (<strong>:</strong>) starting the first parameter of <strong>register()</strong>. This indicates that the custom selector is a pseudo-selector. Callbacks for psuedo selectors are expected to return a <strong>true/false</strong> value, indicating the condition either <strong>is</strong>, or <strong>isn't</strong>.</p>
<p>You then simply use the selector as follows:</p>
<pre class="prettyprint">var collection = $(':blurred').select();</pre>
<p>The result is, as below:</p>
<p><img class="alignnone size-full wp-image-830" title="selectors-custom-pseudo" src="http://www.xjsfl.com/wp-content/uploads/selectors-custom-pseudo.png" alt="" width="370" height="100" /></p>
<h4>[attribute] selectors</h4>
<p>Often, rather than a <strong>yes/no</strong> selection, you want the flexibility to select elements based on values at run time, such as an element's  layer name, or perhaps a Textfield's font (did you know that there is no top-level <strong>.font</strong> property?)</p>
<p>This is where <strong>custom attribute</strong> selectors come in, which are specified using square braces (<strong>[]</strong>) and allow us to supply values directly within the CSS expression itself.</p>
<p>The following example examines the element's first textRuns object, and returns the font name:</p>
<pre class="prettyprint">function font(element)
{
    return element.textRuns ? element.textRuns[0].textAttrs.face : null;
}
Selectors.element.register('[font]', font);</pre>
<p>Note that in this case, because a comparison needs to be made, a <strong>value</strong>, <strong>not</strong> a Boolean, is returned so that the Selector engine can compare the value within the supplied expression.</p>
<p>Again, the selector is simply used within an expression:</p>
<pre class="prettyprint">var collection = $('[font=Arial]').select();</pre>
<p>The results of which, are below:</p>
<p><img class="alignnone size-full wp-image-831" title="selectors-custom-attribute" src="http://www.xjsfl.com/wp-content/uploads/selectors-custom-attribute.png" alt="" width="343" height="160" /></p>
<h4>In conclusion</h4>
<p>As you can see, custom selectors provide a simple and flexible method to choose which elements to select on stage, and have an advantage over filters that they can be easily combined with other selectors simply by concatenating:</p>
<pre class="prettyprint">var collection = $('[font=Arial][x&gt;30]:selected').select();</pre>
<p>And don't forget, you can also write custom selectors for Library items too!</p>
<pre class="prettyprint">function isAsset(item)
{
    return item.name.indexOf('asset') != -1;
}
Selectors.item.register(':asset', isAsset);

$$(':asset:exported').select();</pre>
<p>All this new functionality is available in the repo now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xjsfl.com/blog/custom-selectors/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
