<?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>Limina.Log</title>
	<atom:link href="http://log.liminastudio.com/feed" rel="self" type="application/rss+xml" />
	<link>http://log.liminastudio.com</link>
	<description>The Limina.Studio weblog: Art, Design and Development</description>
	<lastBuildDate>Thu, 19 Aug 2010 23:24:46 +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>PureData: iemguts for darwin</title>
		<link>http://log.liminastudio.com/programming/puredata-iemguts-for-darwin</link>
		<comments>http://log.liminastudio.com/programming/puredata-iemguts-for-darwin#comments</comments>
		<pubDate>Thu, 19 Aug 2010 23:24:46 +0000</pubDate>
		<dc:creator>Tedb0t</dc:creator>
				<category><![CDATA[Dataflow Programming]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PureData]]></category>

		<guid isPermaLink="false">http://log.liminastudio.com/?p=712</guid>
		<description><![CDATA[Here&#8217;s a binary of the iemguts externals for Puredata built for x86 Darwin.  For future reference, all you have to do to build this from source is &#8220;make pd_darwin&#8221;.  To use it, unpack the zip to ~/Library/Pd/iemguts.  You can then start or restart Pd and get the objects like [iemguts/canvasconnections].]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a <a href="http://log.liminastudio.com/wp-content/uploads/2010/08/iemguts_darwin.zip">binary</a> of the iemguts externals for Puredata built for x86 Darwin.  For future reference, all you have to do to build this from source is &#8220;make pd_darwin&#8221;.  To use it, unpack the zip to ~/Library/Pd/iemguts.  You can then start or restart Pd and get the objects like [iemguts/canvasconnections].</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://log.liminastudio.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://log.liminastudio.com/programming/puredata-iemguts-for-darwin/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Rare Book Room</title>
		<link>http://log.liminastudio.com/projects/the-rare-book-room</link>
		<comments>http://log.liminastudio.com/projects/the-rare-book-room#comments</comments>
		<pubDate>Tue, 17 Aug 2010 21:33:34 +0000</pubDate>
		<dc:creator>Tedb0t</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Drawing]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Painting]]></category>

		<guid isPermaLink="false">http://log.liminastudio.com/?p=708</guid>
		<description><![CDATA[Here&#8217;s a bit of a blast from the past: http://www.epiphanus.net/rarebookroom/ The Rare Book Room is a collection of my drawings, paintings and sketches from the past 8 or so years of notebooks.  Enjoy, and let me know what you think!  Perhaps I&#8217;ll get a chance to update it with my more recent books]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a bit of a blast from the past:</p>
<p><a href="http://www.epiphanus.net/rarebookroom/"><img class="alignleft size-medium wp-image-709" title="The Rare Book Room" src="http://log.liminastudio.com/wp-content/uploads/2010/08/Screen-shot-2010-08-17-at-5.30.13-PM-300x231.png"  alt="" width="300" height="231" / rel="lightbox[roadtrip]"></a></p>
<p><a href="http://www.epiphanus.net/rarebookroom/">http://www.epiphanus.net/rarebookroom/</a></p>
<p>The Rare Book Room is a collection of my drawings, paintings and sketches from the past 8 or so years of notebooks.  Enjoy, and let me know what you think!  Perhaps I&#8217;ll get a chance to update it with my more recent books <img src='http://log.liminastudio.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://log.liminastudio.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://log.liminastudio.com/projects/the-rare-book-room/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>POSTing a ByteArray from Flash to Web.py</title>
		<link>http://log.liminastudio.com/programming/posting-a-bytearray-from-flash-to-web-py</link>
		<comments>http://log.liminastudio.com/programming/posting-a-bytearray-from-flash-to-web-py#comments</comments>
		<pubDate>Mon, 16 Aug 2010 21:26:55 +0000</pubDate>
		<dc:creator>Tedb0t</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[web.py]]></category>

		<guid isPermaLink="false">http://log.liminastudio.com/?p=693</guid>
		<description><![CDATA[&#8230;turns out to be really straightforward using the web.data() method (thanks to Brian for the heads-up!): Flash code—for this example you&#8217;ll need the AS3CoreLib JPGEncoder class: _video = new Video(640, 480); _camera = Camera.getCamera(); _camera.setMode(640, 480, 30); _video.attachCamera(_camera); addChild(_video); _jpegEncoder = new JPGEncoder(60); _urlReq = new URLRequest(); _urlReq.url = "http://localhost:8080/addImage"; _urlReq.method = URLRequestMethod.POST; _urlLoader = [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230;turns out to be really straightforward using the web.data() method (thanks to <a href="http://brianhouse.net/">Brian</a> for the heads-up!):</p>
<p>Flash code—for this example you&#8217;ll need the <a href="http://github.com/mikechambers/as3corelib">AS3CoreLib</a> JPGEncoder class:</p>
<pre>_video = new Video(640, 480);
_camera = Camera.getCamera();
_camera.setMode(640, 480, 30);
_video.attachCamera(_camera);
addChild(_video);

_jpegEncoder = new JPGEncoder(60);

_urlReq = new URLRequest();
_urlReq.url = "http://localhost:8080/addImage";
_urlReq.method = URLRequestMethod.POST;

_urlLoader = new URLLoader();

_snapShot = new BitmapData(_camera.width, _camera.height);
_snapShot.draw(_video);
_snapShotImage = new Bitmap(_snapShot);
var jpgStream:ByteArray = _jpegEncoder.encode(_snapShot);
_urlReq.data = jpgStream;

try {
	_urlLoader.load(_urlReq);
} catch (e:Error) {
	trace("Remote.request caught error: "+e);
}</pre>
<p>And the Python (using web.py):</p>
<pre>import web

urls = (
  '/addImage', 'addImage'
)

app = web.application(urls, globals())

class addImage:
    def POST(self):
        data = web.data()
        f = open("test.jpg", 'wb')
        f.write(data)

if __name__ == "__main__": app.run()</pre>
<p>That&#8217;s it!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://log.liminastudio.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://log.liminastudio.com/programming/posting-a-bytearray-from-flash-to-web-py/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Enable Flash Debug Player 10 Logging</title>
		<link>http://log.liminastudio.com/programming/how-to-enable-flash-debug-player-10-logging</link>
		<comments>http://log.liminastudio.com/programming/how-to-enable-flash-debug-player-10-logging#comments</comments>
		<pubDate>Mon, 16 Aug 2010 17:15:29 +0000</pubDate>
		<dc:creator>Tedb0t</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://log.liminastudio.com/?p=685</guid>
		<description><![CDATA[What&#8217;s the fastest, easiest way to debug remote Flash apps?  Adobe&#8217;s own log file: flashlog.txt.  Here&#8217;s how on OSX: Download the Flash Debug Player from Adobe (you want the &#8220;Plugin content debugger&#8221;). &#160; cd /Library/Application\ Support/Macromedia &#160; echo ErrorReportingEnable=1 &#62; mm.cfg &#38;&#38; echo TraceOutputFileEnable=1 &#62;&#62; mm.cfg &#160; tail -f ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt Bam.  The funny part is, you&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s the fastest, easiest way to debug remote Flash apps?  Adobe&#8217;s own log file: flashlog.txt.  Here&#8217;s how on OSX:</p>
<ol>
<li>Download the <a href="http://www.adobe.com/support/flashplayer/downloads.html">Flash Debug Player</a> from Adobe (you want the &#8220;Plugin content debugger&#8221;).</li>
<li>&nbsp;
<pre>cd /Library/Application\ Support/Macromedia</pre>
</li>
<li>&nbsp;
<pre>echo ErrorReportingEnable=1 &gt; mm.cfg &amp;&amp; echo TraceOutputFileEnable=1 &gt;&gt; mm.cfg</pre>
</li>
<li>&nbsp;
<pre>tail -f ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt</pre>
</li>
</ol>
<p>Bam.  The funny part is, you&#8217;ll get trace messages from any and all Flash apps that run on your computer, so you get to see how terribly executed many Flash web apps are.  All the paths for various operating systems are <a href="http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs%5FBook%5FParts&amp;file=logging%5F125%5F04.html">listed here</a>.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://log.liminastudio.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://log.liminastudio.com/programming/how-to-enable-flash-debug-player-10-logging/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running Python on your OSX Apache server: mod_python</title>
		<link>http://log.liminastudio.com/programming/running-python-on-your-apache-server-mod_python</link>
		<comments>http://log.liminastudio.com/programming/running-python-on-your-apache-server-mod_python#comments</comments>
		<pubDate>Mon, 09 Aug 2010 02:51:05 +0000</pubDate>
		<dc:creator>Tedb0t</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://log.liminastudio.com/?p=674</guid>
		<description><![CDATA[Want to interpret Python scripts in Apache on your OSX installation?  Look no further! After about 4 hours of repeated head-to-wall collisions, I finally managed to get mod_python running with Apache 2.2.14 on my Snow Leopard machine.  Here&#8217;s what I had to do: Use the MacPorts Apache instead of MAMP.  I absolutely could not get [...]]]></description>
			<content:encoded><![CDATA[<p>Want to interpret Python scripts in Apache on your OSX installation?  Look no further!</p>
<p>After about 4 hours of repeated head-to-wall collisions, I finally managed to get mod_python running with Apache 2.2.14 on my Snow Leopard machine.  Here&#8217;s what I had to do:</p>
<ol>
<li>Use the <a href="http://www.macports.org/">MacPorts</a> Apache instead of MAMP.  I absolutely could not get this to work for MAMP, which might be because MAMP uses version 2.062 of Apache.  All the following instructions are for MacPorts installs.  Once you install MacPorts, you can install Apache by doing
<pre>sudo port install apache</pre>
</li>
<li>Now you need mod_python, which is a module for Apache that allows the HTTP server to use the python interpreter &#8220;inside&#8221; the server.  With MacPorts, just do
<pre>sudo port install mod_python</pre>
<p>If for some reason this doesn&#8217;t work, I&#8217;ve <a href="http://log.liminastudio.com/wp-content/uploads/2010/08/mod_python-help.zip">packaged</a> it up along with the mod_python python package described next.  Put it in</p>
<pre>/opt/local/apache2/modules</pre>
</li>
<li>Make sure you have the mod_python Python package (yeah, it&#8217;s got the exact same name as the Apache module but is a completely different thing).  Get into your Python interpreter and try
<pre>import mod_python</pre>
<p>If it works, rejoice.  If not, I&#8217;ve <a href="http://log.liminastudio.com/wp-content/uploads/2010/08/mod_python-help.zip">included mine in a zip</a> because I could not for the life of me figure out where to get it from, but I had it in one of my other Python installs. It goes here:</p>
<pre>/Library/Python/2.6/site-packages</pre>
</li>
<li>Edit your httpd.conf file by adding the following:
<pre>LoadModule python_module modules/mod_python.so

SetHandler mod_python
PythonHandler mod_python.publisher
PythonDebug On</pre>
<p>This first tells Apache to load the module, which is a shared object file (.so).  <em>Technical note for the curious:</em> A shared object is a binary that contains compiled functions that can be directly addressed in memory, so you can call functions in it given a header file.  It&#8217;s similar to a Windows .dll.</p>
<p>Anyway, the rest tells Apache to use mod_python&#8217;s VERY handy &#8220;publisher&#8221; function, <a href="http://www.modpython.org/live/current/doc-html/hand-pub.html">described here</a>.  This is a REALLY fast and easy way to start writing Python programs for the web.  Follow the examples there and you should be good to go!  Enjoy!</li>
</ol>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://log.liminastudio.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://log.liminastudio.com/programming/running-python-on-your-apache-server-mod_python/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PuréeData: Realtime Collaborative Patching</title>
		<link>http://log.liminastudio.com/projects/music/pureedata-realtime-collaborative-patching</link>
		<comments>http://log.liminastudio.com/projects/music/pureedata-realtime-collaborative-patching#comments</comments>
		<pubDate>Sat, 31 Jul 2010 02:19:59 +0000</pubDate>
		<dc:creator>Tedb0t</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[PureData]]></category>
		<category><![CDATA[Sound]]></category>

		<guid isPermaLink="false">http://log.liminastudio.com/?p=668</guid>
		<description><![CDATA[PuréeData is a browser-based PureData interface for a remote, central server that allows live, collaborative patching for anyone, anywhere. Using Pd&#8217;s internal messaging system and an accompanying python script, PureéData allows anyone with a browser to modify a public, shared patch running on a server and listen to the results live over an OGG audio [...]]]></description>
			<content:encoded><![CDATA[<p>PuréeData is a browser-based PureData interface for a remote, central server that allows live, collaborative patching for anyone, anywhere.</p>
<p>Using Pd&#8217;s internal messaging system and an accompanying python script, PureéData allows anyone with a browser to modify a public, shared patch running on a server and listen to the results live over an OGG audio stream.</p>
<p>The project is currently in development and is <a href="http://github.com/virgildisgr4ce/PureeData">freely available on GitHub</a>.  PureéData is in part adapted from code by <a href="http://jeraman.wordpress.com/2009/03/22/how-to-use-pure-data-as-a-api">Jeraman</a>.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://log.liminastudio.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://log.liminastudio.com/projects/music/pureedata-realtime-collaborative-patching/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phrygian Étude for Distributed Version Control</title>
		<link>http://log.liminastudio.com/projects/music/phrygian-etude-for-distributed-version-control</link>
		<comments>http://log.liminastudio.com/projects/music/phrygian-etude-for-distributed-version-control#comments</comments>
		<pubDate>Thu, 29 Jul 2010 23:02:42 +0000</pubDate>
		<dc:creator>Tedb0t</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[PureData]]></category>

		<guid isPermaLink="false">http://log.liminastudio.com/?p=665</guid>
		<description><![CDATA[The Phrygian Étude is a &#8220;chain letter&#8221; musical experiment in PureData that is composed of YOUR commits!  So fork the Étude, modify the patch (following certain rules), and push it back to us.  When the time is ripe, we will then play back each stage of the composition—commit by commit—as a live performance!]]></description>
			<content:encoded><![CDATA[<p>The Phrygian Étude is a &#8220;chain letter&#8221; musical experiment in PureData that is composed of YOUR commits!  So fork the Étude, modify the patch (following certain rules), and push it back to us.  When the time is ripe, we will then play back each stage of the composition—commit by commit—as a live performance!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://log.liminastudio.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://log.liminastudio.com/projects/music/phrygian-etude-for-distributed-version-control/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Flash Builder 4</title>
		<link>http://log.liminastudio.com/uncategorized/setting-up-flash-builder-4</link>
		<comments>http://log.liminastudio.com/uncategorized/setting-up-flash-builder-4#comments</comments>
		<pubDate>Tue, 13 Jul 2010 19:26:28 +0000</pubDate>
		<dc:creator>Tedb0t</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Builder]]></category>

		<guid isPermaLink="false">http://log.liminastudio.com/?p=656</guid>
		<description><![CDATA[Here are my tips for setting up Flash Builder 4 for maximum utility. SVN: Subclipse Minimize the package explorer and outline and use two panes for source files (see image) Generate ASDoc HTML using External Tool Use &#8220;Set as Default Application&#8221; on main source file so that you can use the run keyboard shortcut while [...]]]></description>
			<content:encoded><![CDATA[<div>Here are my tips for setting up Flash Builder 4 for maximum utility.</div>
<ul>
<li>SVN: <a href="http://blogs.adobe.com/jasonsj/2010/03/installing_subclipse_in_flash_builder_4.html">Subclipse</a><a href="http://log.liminastudio.com/wp-content/uploads/2010/07/Screen-shot-2010-07-13-at-3.23.55-PM.png"  rel="lightbox[roadtrip]"><img class="alignright size-medium wp-image-657" title="Eclipse Setup" src="http://log.liminastudio.com/wp-content/uploads/2010/07/Screen-shot-2010-07-13-at-3.23.55-PM-300x187.png" alt="" width="300" height="187" /></a></li>
<li>Minimize the package explorer and outline and use two panes for source files (see image)</li>
<li><a href="http://www.flex-blog.com/using-asdoc-as-an-external-tool-in-flash-builder-4/">Generate ASDoc HTML using External Tool</a></li>
<li>Use &#8220;Set as Default Application&#8221; on main source file so that you can use the run keyboard shortcut while focused on any file.</li>
<li>Use the <a href="http://www.adobe.com/support/flashplayer/downloads.html">Flash Debug Player</a> to get traces in Flash Builder</li>
<li>I&#8217;m still searching for the best way to launch your swf in the Flash Debug Player instead of the browser.</li>
<li>Enjoy!</li>
</ul>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://log.liminastudio.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://log.liminastudio.com/uncategorized/setting-up-flash-builder-4/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photoshop to Flash: Best Practices</title>
		<link>http://log.liminastudio.com/programming/photoshop-to-flash-best-practices</link>
		<comments>http://log.liminastudio.com/programming/photoshop-to-flash-best-practices#comments</comments>
		<pubDate>Fri, 09 Jul 2010 21:22:39 +0000</pubDate>
		<dc:creator>Tedb0t</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Photoshop]]></category>

		<guid isPermaLink="false">http://log.liminastudio.com/?p=651</guid>
		<description><![CDATA[Building out a Flash interface from a PSD can be a time consuming process, so to make things most efficient, here are some handy guidelines for preparing Photoshop files.  Designers may want to duplicate their PSD and save it as a new file specifically for Flash import if they want to keep extra hidden layers, [...]]]></description>
			<content:encoded><![CDATA[<p>Building out a Flash interface from a PSD can be a time consuming process, so to make things most efficient, here are some handy guidelines for preparing Photoshop files.  Designers may want to duplicate their PSD and save it as a new file specifically for Flash import if they want to keep extra hidden layers, etc..</p>
<ul>
<li>Turn off or delete all unused or irrelevant layers.</li>
<li>Merge all adjustment layers or masks into regular layers.  Masked layers or groups cannot be used!</li>
<li>Layer effects are OK!  However, if you turn one off and don&#8217;t plan on using it at all, make sure you remove the effect by dragging it onto the trash icon in the Layers palette.</li>
<li>Vector graphics are <em>always</em> preferred!  If you are using Illustrator to design any assets, please provide the Illustrator file too, as Flash cannot import Smart Vector Objects.</li>
<li>Vector graphics are especially preferred for layers intended to be animated.  Imported bitmaps will often look shoddy and low-resolution when moving around and rotating.</li>
<li>If an Illustrator file can&#8217;t be provided, rasterize any Smart Vector Objects or other non-standard layers.</li>
<li>Keep groups and layers orderly and named accurately whenever possible <img src='http://log.liminastudio.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
</ul>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://log.liminastudio.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://log.liminastudio.com/programming/photoshop-to-flash-best-practices/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3: Copying object properties to other objects</title>
		<link>http://log.liminastudio.com/programming/as3-copying-object-properties-to-other-objects</link>
		<comments>http://log.liminastudio.com/programming/as3-copying-object-properties-to-other-objects#comments</comments>
		<pubDate>Fri, 02 Jul 2010 23:40:11 +0000</pubDate>
		<dc:creator>Tedb0t</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[OOP]]></category>

		<guid isPermaLink="false">http://log.liminastudio.com/?p=641</guid>
		<description><![CDATA[Say you want to copy all the properties of an object to another object, but you can&#8217;t just assign it because they&#8217;re different types: var requestVars:URLVariables = new URLVariables(); var myObject:Object = {prop1:"someValue"}; requestVars = myObject; // Throws type mismatch error So you need to iterate through the properties of the source object and assign [...]]]></description>
			<content:encoded><![CDATA[<p>Say you want to copy all the properties of an object to another object, but you can&#8217;t just assign it because they&#8217;re different types:</p>
<pre>var requestVars:URLVariables = new URLVariables();
var myObject:Object = {prop1:"someValue"};
requestVars = myObject; // Throws type mismatch error</pre>
<p>So you need to iterate through the properties of the source object and assign them to the target.  You can do this with AS3&#8242;s array-like property access syntax:</p>
<pre>for (var prop in myObject) requestVars[prop] = myObject[prop];
trace(requestVars.prop1); // prints "someValue"</pre>
<p>Easy!  Now sometimes you might need to do something similar with an XML file, say, a configuration file with a bunch of properties that you want to automatically assign to a local object:</p>
<pre>var configXML:XML =
&lt;configXML&gt;
  &lt;paths&gt;
    &lt;host&gt;www.something.com/&lt;/host&gt;
    &lt;list&gt;list&lt;/list&gt;
    &lt;recent&gt;recent/&lt;/recent&gt;
    &lt;liked&gt;liked/&lt;/liked&gt;
  &lt;/paths&gt;
&lt;/configXML&gt;;

var paths:Object = new Object();

for each (var val in configXML.paths.*) paths[val.name()] = val;

trace(paths.host); // prints "www.something.com/"</pre>
<p>You now have a plain Object instance with all the properties of the XML tree.  Bing!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://log.liminastudio.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://log.liminastudio.com/programming/as3-copying-object-properties-to-other-objects/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
