<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>TK Assembled</title>
	
	<link>http://blog.tkassembled.com</link>
	<description>Hopefully not just another Wordpress Blog.</description>
	<lastBuildDate>Thu, 11 Feb 2010 06:04:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/tkassembled" /><feedburner:info uri="tkassembled" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/tkassembled" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.flurry.com/pushRssFeed.do?r=fb&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://www.flurry.com/images/flurry_rss_logo2.gif">Subscribe with Flurry</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Ftkassembled" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item>
		<title>Installing Adobe AIR 1.x on 64bit Linux</title>
		<link>http://feedproxy.google.com/~r/tkassembled/~3/m3cAsSCcIu4/</link>
		<comments>http://blog.tkassembled.com/103/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 05:36:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[64 bit]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[64bit]]></category>

		<guid isPermaLink="false">http://blog.tkassembled.com/?p=103</guid>
		<description><![CDATA[
Adobe currently offers an installer for AIR for almost all operating systems. Windows, Mac, and Linux, all of the major platforms are covered. However, one installer is missing&#8230; a 64bit one for Linux. For those of us who are die-hard Linux users who also prefer the speed and power of running 64bit operating systems, Adobe <a href="http://blog.tkassembled.com/103/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[
<p><a href="http://www.adobe.com/products/air/"><img src="http://blog.tkassembled.com/u/2010/02/adobe-air-logo.png" alt="Adobe AIR" title="Adobe AIR" width="128" height="128" class="alignleft size-full wp-image-114" /></a>Adobe currently offers an installer for AIR for <em>almost</em> all operating systems. Windows, Mac, and Linux, all of the major platforms are covered. However, one installer is missing&#8230; a 64bit one for Linux. For those of us who are die-hard Linux users who also prefer the speed and power of running 64bit operating systems, Adobe AIR won&#8217;t just install out of the box and work. This article is to help you get Adobe AIR installed and running on your 64bit Linux system in no time flat. </p>
<p><span id="more-103"></span></p>
<p>First, we&#8217;ll need to install <a href="http://ubuntuforums.org/showthread.php?t=474790">getlibs</a>, an incredibly useful package for those of us running 64bit Linux systems with the need to run 32bit software. In <a href="http://blog.tkassembled.com/26/">a previous tutorial</a>, we used getlibs to install some required libraries for running a 32bit Flash Player debug edition on a 64bit Linux operating system. Now, we&#8217;ll use a similar technique to get 32bit AIR installed and running. Let&#8217;s download and install getlibs. If you have getlibs installed, you can safely skip this step and move on.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> getlibs-all.deb http:<span style="color: #000000; font-weight: bold;">//</span>frozenfox.freehostia.com<span style="color: #000000; font-weight: bold;">/</span>cappy<span style="color: #000000; font-weight: bold;">/</span>getlibs-all.deb
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-i</span> getlibs-all.deb
<span style="color: #c20cb9; font-weight: bold;">rm</span> getlibs-all.deb</pre></td></tr></table></div>

<p>The above code will download getlibs-all.deb, install it, and remove it, leaving you just what you need and nothing more. Now, let&#8217;s move on to the next step, downloading the Adobe AIR installer and installing some 32bit libraries.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> AdobeAIRInstaller.bin http:<span style="color: #000000; font-weight: bold;">//</span>airdownload.adobe.com<span style="color: #000000; font-weight: bold;">/</span>air<span style="color: #000000; font-weight: bold;">/</span>lin<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span>latest<span style="color: #000000; font-weight: bold;">/</span>AdobeAIRInstaller.bin
<span style="color: #c20cb9; font-weight: bold;">chmod</span> +x AdobeAIRInstaller.bin
<span style="color: #c20cb9; font-weight: bold;">sudo</span> getlibs .<span style="color: #000000; font-weight: bold;">/</span>AdobeAIRInstaller.bin
<span style="color: #c20cb9; font-weight: bold;">sudo</span> getlibs <span style="color: #660033;">-l</span> libgnome-keyring.so
<span style="color: #c20cb9; font-weight: bold;">sudo</span> getlibs <span style="color: #660033;">-l</span> libgnome-keyring.so.0
<span style="color: #c20cb9; font-weight: bold;">sudo</span> getlibs <span style="color: #660033;">-l</span> libgnome-keyring.so.0.1.1</pre></td></tr></table></div>

<p>According to <a href="http://kb2.adobe.com/cps/408/kb408084.html">Adobe&#8217;s website</a>, this installs several other components that are necessary to AIR for internet connectivity, sound, etc. While you can technically install Adobe AIR without these libraries, you&#8217;ll find that many applications malfunction and many won&#8217;t even start. So yes, I recommend following the directions on this one <img src='http://blog.tkassembled.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now, we need to download and install some other libraries not available through getlibs. Let&#8217;s hit it up:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Download some debs</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> libnss3.deb <span style="color: #ff0000;">&quot;http://mirrors.kernel.org/ubuntu/pool/main/n/nss/libnss3-1d_3.12.0~beta3-0ubuntu1_i386.deb&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> libnspr.deb <span style="color: #ff0000;">&quot;http://mirrors.kernel.org/ubuntu/pool/main/n/nspr/libnspr4-0d_4.7.1~beta2-0ubuntu1_i386.deb&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Extract 'em, get what we need, then remove them.</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> libnss3
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-x</span> libnss3.deb libnss3
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> libnss3<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libnss3.so.1d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> libnss3<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libnssutil3.so.1d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> libnss3<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libsmime3.so.1d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> libnss3<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libssl3.so.1d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-fr</span> libnss3
<span style="color: #c20cb9; font-weight: bold;">rm</span> libnss3.deb
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> libnspr
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-x</span> libnspr.deb libnspr
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> libnspr<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libnspr4.so.0d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> libnspr<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libplc4.so.0d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> libnspr<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libplds4.so.0d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-fr</span> libnspr
<span style="color: #c20cb9; font-weight: bold;">rm</span> libnspr.deb
&nbsp;
<span style="color: #666666; font-style: italic;"># Link 'em up!</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>libnss3.so.1d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>libnss3.so
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>libssl3.so.1d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>libssl3.so
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>libnspr4.so.0d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>libnspr4.so</pre></td></tr></table></div>

<p>Phew! That was a lot of work, so I hope you&#8217;re still with me. Now, we&#8217;ve got everything all ready for our fresh install of Adobe AIR. Let&#8217;s install it!</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>AdobeAIRInstaller.bin</pre></td></tr></table></div>

<p>Cool! Now, we&#8217;ve got one last step to perform before we&#8217;re done, copying a simple file over to the /usr/lib32 folder:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libadobecertstore.so <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32</pre></td></tr></table></div>

<p>Done! You should now have an installed and fully functional AIR runtime installed on your system. Now, let&#8217;s try to encapsulate all of this into a shell script so anyone can install AIR in one step rather than a bunch of &#8216;em. <a href='http://blog.tkassembled.com/u/2010/02/airInstall.sh.gz'>Download airInstall.sh.gz</a>, extract it, then run it like so:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>blog.tkassembled.com<span style="color: #000000; font-weight: bold;">/</span>u<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2010</span><span style="color: #000000; font-weight: bold;">/</span>02<span style="color: #000000; font-weight: bold;">/</span>airInstall.sh.gz
<span style="color: #c20cb9; font-weight: bold;">gzip</span> <span style="color: #660033;">-d</span> airInstall.sh.gz
<span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>airInstall.sh</pre></td></tr></table></div>

<p>And, for your reference, here&#8217;s what the shell script looks like and does, for those of you who are into that kind of thing:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Check if this is root.</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$EUID</span> <span style="color: #660033;">-ne</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;This script must be run as root.&quot;</span> <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">2</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Download and install getlibs-all.deb</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> getlibs-all.deb http:<span style="color: #000000; font-weight: bold;">//</span>frozenfox.freehostia.com<span style="color: #000000; font-weight: bold;">/</span>cappy<span style="color: #000000; font-weight: bold;">/</span>getlibs-all.deb;
<span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-i</span> getlibs-all.deb;
<span style="color: #c20cb9; font-weight: bold;">rm</span> getlibs-all.deb;
&nbsp;
<span style="color: #666666; font-style: italic;"># Download AIR</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> AdobeAIRInstaller.bin http:<span style="color: #000000; font-weight: bold;">//</span>airdownload.adobe.com<span style="color: #000000; font-weight: bold;">/</span>air<span style="color: #000000; font-weight: bold;">/</span>lin<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span>latest<span style="color: #000000; font-weight: bold;">/</span>AdobeAIRInstaller.bin;
<span style="color: #c20cb9; font-weight: bold;">chmod</span> +x AdobeAIRInstaller.bin;
&nbsp;
<span style="color: #666666; font-style: italic;"># Install some libraries using getlibs</span>
getlibs .<span style="color: #000000; font-weight: bold;">/</span>AdobeAIRInstaller.bin;
getlibs <span style="color: #660033;">-l</span> libgnome-keyring.so;
getlibs <span style="color: #660033;">-l</span> libgnome-keyring.so.0;
getlibs <span style="color: #660033;">-l</span> libgnome-keyring.so.0.1.1;
&nbsp;
<span style="color: #666666; font-style: italic;"># Download some unavailable libraries manually</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> libnss3.deb <span style="color: #ff0000;">&quot;http://mirrors.kernel.org/ubuntu/pool/main/n/nss/libnss3-1d_3.12.0~beta3-0ubuntu1_i386.deb&quot;</span>;
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> libnspr.deb <span style="color: #ff0000;">&quot;http://mirrors.kernel.org/ubuntu/pool/main/n/nspr/libnspr4-0d_4.7.1~beta2-0ubuntu1_i386.deb&quot;</span>;
&nbsp;
<span style="color: #666666; font-style: italic;"># Extract the deb files we just downloaded, and install the libraries we need from them</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> libnss3;
<span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-x</span> libnss3.deb libnss3;
<span style="color: #c20cb9; font-weight: bold;">cp</span> libnss3<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libnss3.so.1d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32;
<span style="color: #c20cb9; font-weight: bold;">cp</span> libnss3<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libnssutil3.so.1d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32;
<span style="color: #c20cb9; font-weight: bold;">cp</span> libnss3<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libsmime3.so.1d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32;
<span style="color: #c20cb9; font-weight: bold;">cp</span> libnss3<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libssl3.so.1d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-fr</span> libnss3;
<span style="color: #c20cb9; font-weight: bold;">rm</span> libnss3.deb;
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> libnspr;
<span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-x</span> libnspr.deb libnspr;
<span style="color: #c20cb9; font-weight: bold;">cp</span> libnspr<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libnspr4.so.0d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32;
<span style="color: #c20cb9; font-weight: bold;">cp</span> libnspr<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libplc4.so.0d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32;
<span style="color: #c20cb9; font-weight: bold;">cp</span> libnspr<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libplds4.so.0d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-fr</span> libnspr;
<span style="color: #c20cb9; font-weight: bold;">rm</span> libnspr.deb;
&nbsp;
<span style="color: #666666; font-style: italic;"># Link the libraries up</span>
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>libnss3.so.1d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>libnss3.so;
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>libssl3.so.1d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>libssl3.so;
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>libnspr4.so.0d <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32<span style="color: #000000; font-weight: bold;">/</span>libnspr4.so;
&nbsp;
<span style="color: #666666; font-style: italic;"># Install AIR!</span>
.<span style="color: #000000; font-weight: bold;">/</span>AdobeAIRInstaller.bin;
<span style="color: #c20cb9; font-weight: bold;">rm</span> AdobeAIRInstaller.bin;
&nbsp;
<span style="color: #666666; font-style: italic;"># And, finally, link some libraries</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libadobecertstore.so <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib32;
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Adobe AIR should now be installed! Woo!&quot;</span>;</pre></td></tr></table></div>

<p>Did everything work out okay? Questions? Go ahead and light up the comments and I&#8217;ll see how I can help. In the future, we&#8217;ll cover installing the new beta version of AIR 2.0 on a 64bit Linux machine. </p>



Share This:


	<a rel="nofollow"  href="http://blog.tkassembled.com/feed/" title="RSS"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Installing%20Adobe%20AIR%201.x%20on%2064bit%20Linux%20-%20http%3A%2F%2Fblog.tkassembled.com%2F103%2F" title="Twitter"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.tkassembled.com%2F103%2F&amp;title=Installing%20Adobe%20AIR%201.x%20on%2064bit%20Linux&amp;notes=Adobe%20currently%20offers%20an%20installer%20for%20AIR%20for%20almost%20all%20operating%20systems.%20Windows%2C%20Mac%2C%20and%20Linux%2C%20all%20of%20the%20major%20platforms%20are%20covered.%20However%2C%20one%20installer%20is%20missing...%20a%2064bit%20one%20for%20Linux.%20For%20those%20of%20us%20who%20are%20die-hard%20Linux%20users%20wh" title="del.icio.us"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F103%2F&amp;title=Installing%20Adobe%20AIR%201.x%20on%2064bit%20Linux" title="StumbleUpon"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.tkassembled.com%2F103%2F&amp;title=Installing%20Adobe%20AIR%201.x%20on%2064bit%20Linux&amp;bodytext=Adobe%20currently%20offers%20an%20installer%20for%20AIR%20for%20almost%20all%20operating%20systems.%20Windows%2C%20Mac%2C%20and%20Linux%2C%20all%20of%20the%20major%20platforms%20are%20covered.%20However%2C%20one%20installer%20is%20missing...%20a%2064bit%20one%20for%20Linux.%20For%20those%20of%20us%20who%20are%20die-hard%20Linux%20users%20wh" title="Digg"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.tkassembled.com%2F103%2F&amp;t=Installing%20Adobe%20AIR%201.x%20on%2064bit%20Linux" title="Facebook"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fblog.tkassembled.com%2F103%2F" title="Technorati"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F103%2F&amp;title=Installing%20Adobe%20AIR%201.x%20on%2064bit%20Linux" title="Reddit"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>


<br/><br/>

<p><a href="http://feedads.g.doubleclick.net/~a/zQFsZyaz_YIJkol22Om_898zOaY/0/da"><img src="http://feedads.g.doubleclick.net/~a/zQFsZyaz_YIJkol22Om_898zOaY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/zQFsZyaz_YIJkol22Om_898zOaY/1/da"><img src="http://feedads.g.doubleclick.net/~a/zQFsZyaz_YIJkol22Om_898zOaY/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tkassembled/~4/m3cAsSCcIu4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tkassembled.com/103/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.tkassembled.com/103/</feedburner:origLink></item>
		<item>
		<title>Burning ISO images to CD’s and DVD’s in Linux</title>
		<link>http://feedproxy.google.com/~r/tkassembled/~3/0ii549LCWIk/</link>
		<comments>http://blog.tkassembled.com/100/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 06:18:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[burning]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.tkassembled.com/?p=100</guid>
		<description><![CDATA[
Since we&#8217;ve already covered how to rip a cd or DVD to an ISO file in Linux, the next logical step would be to talk about how to burn an ISO image to a CD or DVD. Again, we&#8217;ll be attacking this question from our handy-dandy terminal, so open your favorite terminal and let&#8217;s get <a href="http://blog.tkassembled.com/100/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[
<p>Since we&#8217;ve already covered <a href="http://blog.tkassembled.com/76/">how to rip a cd or DVD to an ISO file in Linux</a>, the next logical step would be to talk about how to burn an ISO image to a CD or DVD. Again, we&#8217;ll be attacking this question from our handy-dandy terminal, so open your favorite terminal and let&#8217;s get to work. </p>
<p><span id="more-100"></span></p>
<p>Before we begin, let&#8217;s clarify our goals here. For now, we simply wish to burn an ISO image file directly to recordable media, such as a CD or a DVD, from the terminal in Linux. There are many GUI programs out there for burning DVDs and CDs, but that&#8217;s not quite our goal here. We want to harness the power of the terminal for automation of tasks and for learning&#8217;s sake. </p>
<p>First, let&#8217;s install a nifty little program called <a href="http://man.cx/wodim(1)">wodim</a>. It includes many tools for implementation-agnostic writing to recordable media, including our target formats of DVD and CD. If you&#8217;re using Ubuntu 9.10, you should already have it installed, but it can&#8217;t hurt to run this to make sure:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> wodim</pre></td></tr></table></div>

<p>Now, let&#8217;s take our ISO file and burn it to a CD-R in our CD-R drive. Enter this into your terminal and let&#8217;s get started with the burn:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> wodim <span style="color: #660033;">-eject</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rfkrocktk<span style="color: #000000; font-weight: bold;">/</span>my-disc.iso</pre></td></tr></table></div>

<p>Of course, replace &#8220;/home/rfkrocktk/my-disc.iso&#8221; with a real path to an ISO image file on your computer. If you&#8217;d like to do a &#8220;dry run,&#8221; so to speak, to test if everything will write correctly, run the following command instead:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> wodim <span style="color: #660033;">-eject</span> <span style="color: #007800;">gracetime</span>=<span style="color: #000000;">30</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rfkrocktk<span style="color: #000000; font-weight: bold;">/</span>my-disc.iso</pre></td></tr></table></div>

<p>What this does is that it gives you 30 seconds of &#8220;grace time&#8221; to make sure you <em>really</em> want to burn that disc. The &#8220;-eject&#8221; parameter tells wodim to eject your disc after it&#8217;s done, very helpful if you ask me. Another handy feature about wodim is that it attempts to recognize the drive to use when burning media (eg: /dev/dvdrw or /dev/cdrw), and attempts to recognize the type of media you have inserted, so it uses the right device and format. </p>
<p>What this means is that the code given above should work for burning an ISO image to a CD <em>or</em> to a DVD. This makes it, for all intensive purposes, implementation-agnostic, meaning it doesn&#8217;t necessarily care whether you&#8217;re using a CD or a DVD. It&#8217;ll do its best to determine the type of media you&#8217;re using and burn it in an appropriate fashion. </p>
<p>By default, wodim burns discs in TAO (&#8220;Track at Once&#8221;) format. This is important only if you&#8217;re planning on burning audio discs. For audio discs, you&#8217;ll want to burn your discs in SAO/DAO (&#8220;Session At Once/Disc At Once&#8221;) mode, because TAO mode will insert 2 second gaps between your songs, and for me that&#8217;s unacceptable. We&#8217;ll cover burning audio discs in another post, so stay tuned for another tutorial on how to do that. </p>
<p>What if we want to do something a little more, well, advanced? You&#8217;ve probably heard of multi-session discs that allow you to take something which is &#8220;write-once&#8221; like a DVD-R or a CD-R and write to it multiple times. wodim supports this out-of-the-box using the &#8220;-multi&#8221; parameter as so:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> wodim <span style="color: #660033;">-multi</span> <span style="color: #660033;">-eject</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rfkrocktk<span style="color: #000000; font-weight: bold;">/</span>my-disc.iso</pre></td></tr></table></div>

<p>This will enable you to write multiple times to the same disc, provided that you pass the &#8220;-multi&#8221; parameter each time you attempt to change content on the disc. Pretty cool, huh?</p>
<p>You can&#8217;t get much easier or complex than wodim. You can run &#8220;sudo wodim my-disc.iso&#8221; to simply burn an ISO image to a DVD or CD, or you can really tweak your burn to do <em>exactly</em> what you want it to. Any questions or comments? Hope this helps someone out there!</p>



Share This:


	<a rel="nofollow"  href="http://blog.tkassembled.com/feed/" title="RSS"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Burning%20ISO%20images%20to%20CD%27s%20and%20DVD%27s%20in%20Linux%20%20-%20http%3A%2F%2Fblog.tkassembled.com%2F100%2F" title="Twitter"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.tkassembled.com%2F100%2F&amp;title=Burning%20ISO%20images%20to%20CD%27s%20and%20DVD%27s%20in%20Linux%20&amp;notes=Since%20we%27ve%20already%20covered%20how%20to%20rip%20a%20cd%20or%20DVD%20to%20an%20ISO%20file%20in%20Linux%2C%20the%20next%20logical%20step%20would%20be%20to%20talk%20about%20how%20to%20burn%20an%20ISO%20image%20to%20a%20CD%20or%20DVD.%20Again%2C%20we%27ll%20be%20attacking%20this%20question%20from%20our%20handy-dandy%20terminal%2C%20so%20open%20your%20favo" title="del.icio.us"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F100%2F&amp;title=Burning%20ISO%20images%20to%20CD%27s%20and%20DVD%27s%20in%20Linux%20" title="StumbleUpon"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.tkassembled.com%2F100%2F&amp;title=Burning%20ISO%20images%20to%20CD%27s%20and%20DVD%27s%20in%20Linux%20&amp;bodytext=Since%20we%27ve%20already%20covered%20how%20to%20rip%20a%20cd%20or%20DVD%20to%20an%20ISO%20file%20in%20Linux%2C%20the%20next%20logical%20step%20would%20be%20to%20talk%20about%20how%20to%20burn%20an%20ISO%20image%20to%20a%20CD%20or%20DVD.%20Again%2C%20we%27ll%20be%20attacking%20this%20question%20from%20our%20handy-dandy%20terminal%2C%20so%20open%20your%20favo" title="Digg"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.tkassembled.com%2F100%2F&amp;t=Burning%20ISO%20images%20to%20CD%27s%20and%20DVD%27s%20in%20Linux%20" title="Facebook"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fblog.tkassembled.com%2F100%2F" title="Technorati"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F100%2F&amp;title=Burning%20ISO%20images%20to%20CD%27s%20and%20DVD%27s%20in%20Linux%20" title="Reddit"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>


<br/><br/>

<p><a href="http://feedads.g.doubleclick.net/~a/AabCY2X_t6X-_Y5EcDP2pa9w4P0/0/da"><img src="http://feedads.g.doubleclick.net/~a/AabCY2X_t6X-_Y5EcDP2pa9w4P0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/AabCY2X_t6X-_Y5EcDP2pa9w4P0/1/da"><img src="http://feedads.g.doubleclick.net/~a/AabCY2X_t6X-_Y5EcDP2pa9w4P0/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tkassembled/~4/0ii549LCWIk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tkassembled.com/100/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.tkassembled.com/100/</feedburner:origLink></item>
		<item>
		<title>as3signals – An Awesome Solution to Events/Signals in AS3</title>
		<link>http://feedproxy.google.com/~r/tkassembled/~3/1PaDCbVvK6s/</link>
		<comments>http://blog.tkassembled.com/83/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 01:45:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[as3-signals]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.tkassembled.com/?p=83</guid>
		<description><![CDATA[
There has been quite a lot of buzz lately in the community about a new library by Robert Penner called as3-signals. John Lindquist recently posted a video tutorial on using it, and I thought I&#8217;d follow up with a nice text-based tutorial explaining the common ins-and-outs of the library.
 
Let&#8217;s introduce a real-world example, since <a href="http://blog.tkassembled.com/83/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[
<p>There has been quite a lot of buzz lately in the community about a new library by <a href="http://www.robertpenner.com/" target="_blank">Robert Penner</a> called <a href="http://github.com/robertpenner/as3-signals" target="_blank">as3-signals</a>. John Lindquist recently posted a <a href="http://pv3d.org/2010/01/21/as3-signals-tutorial/" target="_blank">video tutorial</a> on using it, and I thought I&#8217;d follow up with a nice text-based tutorial explaining the common ins-and-outs of the library.<br />
 <span id="more-83"></span></p>
<p>Let&#8217;s introduce a real-world example, since any library can only be useful if it can be used to solve problems in the real world. We&#8217;ll pose a hypothetical that you&#8217;re trying to build a socket-based library for using a particular protocol, perhaps even one you invented yourself. The service class you&#8217;re creating wraps flash.net.Socket and dispatches custom events when particular things happen. We&#8217;ll say that you have two custom events you need to dispatch, &#8220;writeResult&#8221; and &#8220;writeFailed,&#8221; in addition to other events pertaining natively to the Socket instance for other objects to listen for error events and the like.</p>
<p>Here&#8217;s the code you would need to write in order to accomplish this using Flash Player&#8217;s native event system.</p>
<p><strong>CustomSocket.as</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> com.mycompany.socket <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">EventDispatcher</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">Event</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">IOErrorEvent</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span>.<span style="color: #004993;">Socket</span>;	
&nbsp;
	<span style="color: #000000;">&#91;</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;connect&quot;</span>,<span style="color: #004993;">type</span>=<span style="color: #990000;">&quot;flash.events.Event&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
&nbsp;
	<span style="color: #000000;">&#91;</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;close&quot;</span>,<span style="color: #004993;">type</span>=<span style="color: #990000;">&quot;flash.events.Event&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
&nbsp;
	<span style="color: #000000;">&#91;</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;ioError&quot;</span>,<span style="color: #004993;">type</span>=<span style="color: #990000;">&quot;flash.events.IOErrorEvent&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
&nbsp;
	<span style="color: #000000;">&#91;</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;writeResult&quot;</span>,<span style="color: #004993;">type</span>=<span style="color: #990000;">&quot;com.mycompany.CustomSocketEvent&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
&nbsp;
	<span style="color: #000000;">&#91;</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;writeFault&quot;</span>,<span style="color: #004993;">type</span>=<span style="color: #990000;">&quot;com.mycompany.CustomSocketEvent&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> CustomSocket extends <span style="color: #004993;">EventDispatcher</span> <span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> socket<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Socket</span>;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> CustomSocket<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.socket = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Socket</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.socket.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">CONNECT</span>, <span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.socket.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">CLOSE</span>, <span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.socket.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">IOErrorEvent</span>.<span style="color: #004993;">IO_ERROR</span>, <span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">connect</span><span style="color: #000000;">&#40;</span>host<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span>, port<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.socket.<span style="color: #004993;">connect</span><span style="color: #000000;">&#40;</span>host, port<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> write<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> writeValue<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span> = <span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">0.5</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.socket.<span style="color: #004993;">writeBoolean</span><span style="color: #000000;">&#40;</span>writeValue<span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>writeValue<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span>.<span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> CustomSocketEvent<span style="color: #000000;">&#40;</span>CustomSocketEvent.WRITE_RESULT<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span>.<span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> CustomSocketEvent<span style="color: #000000;">&#40;</span>CustomSocketEvent.WRITE_FAULT<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p><strong>CustomSocketEvent.as</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> com.mycompany.socket <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">Event</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> CustomSocketEvent extends <span style="color: #004993;">Event</span> <span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> static const WRITE_RESULT<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;writeResult&quot;</span>;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> static const WRITE_FAULT<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;writeFault&quot;</span>;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> CustomSocketEvent<span style="color: #000000;">&#40;</span><span style="color: #004993;">type</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span>, <span style="color: #004993;">bubbles</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span> = <span style="color: #0033ff; font-weight: bold;">false</span>, <span style="color: #004993;">cancelable</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span> = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">type</span>, <span style="color: #004993;">bubbles</span>, <span style="color: #004993;">cancelable</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">clone</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">new</span> CustomSocketEvent<span style="color: #000000;">&#40;</span><span style="color: #004993;">type</span>, <span style="color: #004993;">bubbles</span>, <span style="color: #004993;">cancelable</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p><strong>Client.as</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> com.mycompany.socket.CustomSocket;
	<span style="color: #0033ff; font-weight: bold;">import</span> com.mycompany.socket.CustomSocketEvent;
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">Sprite</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">Event</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">IOErrorEvent</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Client extends <span style="color: #004993;">Sprite</span> <span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Client<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> socket<span style="color: #000000; font-weight: bold;">:</span>CustomSocket = <span style="color: #0033ff; font-weight: bold;">new</span> CustomSocket<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			socket.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">CONNECT</span>, onConnect<span style="color: #000000;">&#41;</span>;
			socket.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">CLOSE</span>, onClose<span style="color: #000000;">&#41;</span>;
			socket.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">IOErrorEvent</span>.<span style="color: #004993;">IO_ERROR</span>, onIoError<span style="color: #000000;">&#41;</span>;
			socket.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>CustomSocketEvent.WRITE_RESULT, onWriteResult<span style="color: #000000;">&#41;</span>;
			socket.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>CustomSocketEvent.WRITE_FAULT, onWriteFault<span style="color: #000000;">&#41;</span>;
			socket.<span style="color: #004993;">connect</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;localhost&quot;</span>, <span style="color: #000000; font-weight:bold;">12345</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			socket.write<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onConnect<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;connect!&quot;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onClose<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;close!&quot;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onIoError<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;ioerror!&quot;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onWriteResult<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span>CustomSocketEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;writeResult!&quot;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onWriteFault<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span>CustomSocketEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;writeFault!&quot;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Ok, so we&#8217;re done. Let&#8217;s talk about some of the inherent problems with this code.</p>
<p>First, there is not necessarily any compile-time or runtime way of knowing if a component dispatches events, and knowledge of <em>which</em> events it dispatches is nonexistent. However, as anyone well-versed in AS3 will point out, we have metadata! The [Event] tags at the top of the CustomSocket class let us know that CustomSocket will <em>probably </em>dispatch a type of event, but we have no way of knowing this. And, since the metadata has little or nothing to do with the code and is not enforced by the compiler, we&#8217;re really out in the dark. There is no compile-time enforcement of events.</p>
<p>Second, the CustomSocketEvent class is almost entirely useless. Even if we were passing some information along with the event, we had to write all of those boilerplate lines of code for almost no reason.While it is not <u>necessary</u> to write CustomSocketEvent, best practices tell us that we should, and if we&#8217;re expecting to pass values attached to events, we must. In the spirit of keeping with &#8220;best practices,&#8221; which may or may not even exist according to some, we&#8217;ve defined this event class. </p>
<p>Third, since the event system works on a String-key basis, there is really no way to distinguish between a flash.events.Event.CONNECT and a com.mycompany.socket.CustomSocketEvent.CONNECT if the constants define the same String literal &#8220;connect.&#8221;</p>
<p>These are just some of the flaws plaguing Flash Player&#8217;s built-in event system. Does it work? Yes! Does it work well? You decide. This is where as3-signals comes into play.</p>
<p>Let&#8217;s rewrite this same example using as3-signals.</p>
<p><strong>CustomSocket.as</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> com.mycompany.socket <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">Event</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">IOErrorEvent</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span>.<span style="color: #004993;">Socket</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.osflash.signals.Signal;
	<span style="color: #0033ff; font-weight: bold;">import</span> org.osflash.signals.natives.NativeSignal;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> CustomSocket <span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">connect</span><span style="color: #000000; font-weight: bold;">:</span>NativeSignal;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">close</span><span style="color: #000000; font-weight: bold;">:</span>NativeSignal;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">ioError</span><span style="color: #000000; font-weight: bold;">:</span>NativeSignal;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> writeFault<span style="color: #000000; font-weight: bold;">:</span>Signal;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> writeResult<span style="color: #000000; font-weight: bold;">:</span>Signal;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> socket<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Socket</span>;
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> CustomSocket<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.socket = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Socket</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">this</span>.<span style="color: #004993;">connect</span> = <span style="color: #0033ff; font-weight: bold;">new</span> NativeSignal<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span>.socket, <span style="color: #004993;">Event</span>.<span style="color: #004993;">CONNECT</span>, <span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.<span style="color: #004993;">close</span> = <span style="color: #0033ff; font-weight: bold;">new</span> NativeSignal<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span>.socket, <span style="color: #004993;">Event</span>.<span style="color: #004993;">CLOSE</span>, <span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.<span style="color: #004993;">ioError</span> = <span style="color: #0033ff; font-weight: bold;">new</span> NativeSignal<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span>.socket, <span style="color: #004993;">IOErrorEvent</span>.<span style="color: #004993;">IO_ERROR</span>, <span style="color: #004993;">IOErrorEvent</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">this</span>.writeFault = <span style="color: #0033ff; font-weight: bold;">new</span> Signal<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.writeResult = <span style="color: #0033ff; font-weight: bold;">new</span> Signal<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #009900;">//		because we already have a member named &quot;connect,&quot; </span>
<span style="color: #009900;">//		we'll name this guy &quot;connectSocket&quot; (thanks Robert :] )</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> connectSocket<span style="color: #000000;">&#40;</span>host<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span>, port<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span>.socket.<span style="color: #004993;">connect</span><span style="color: #000000;">&#40;</span>host, port<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> write<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> writeValue<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span> = <span style="color: #004993;">Math</span>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">0.5</span>;
			<span style="color: #0033ff; font-weight: bold;">this</span>.socket.<span style="color: #004993;">writeBoolean</span><span style="color: #000000;">&#40;</span>writeValue<span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>writeValue<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span>.writeResult.dispatch<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">this</span>.writeFault.dispatch<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p><strong>Client.as</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> com.mycompany.socket.CustomSocket;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span>.<span style="color: #004993;">Sprite</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">Event</span>;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #004993;">IOErrorEvent</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Client extends <span style="color: #004993;">Sprite</span> <span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Client<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> socket<span style="color: #000000; font-weight: bold;">:</span>CustomSocket = <span style="color: #0033ff; font-weight: bold;">new</span> CustomSocket<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			socket.<span style="color: #004993;">connect</span>.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>onConnect<span style="color: #000000;">&#41;</span>;
			socket.<span style="color: #004993;">close</span>.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>onClose<span style="color: #000000;">&#41;</span>;
			socket.<span style="color: #004993;">ioError</span>.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>onIoError<span style="color: #000000;">&#41;</span>;
			socket.writeResult.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>onWriteResult<span style="color: #000000;">&#41;</span>;
			socket.writeFault.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>onWriteFault<span style="color: #000000;">&#41;</span>;
			socket.connectSocket<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;localhost&quot;</span>, <span style="color: #000000; font-weight:bold;">12345</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			socket.write<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onConnect<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;connect!&quot;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onClose<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;close!&quot;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onIoError<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;io error!&quot;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onWriteResult<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;write result!&quot;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onWriteFault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;write fault!&quot;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Now, let&#8217;s talk about why this code is better than the first example.</p>
<p>First, as you can see, we completely eliminated the event class that we created in the first example. There&#8217;s simply no need to create new Event subclasses when using as3-signals. The framework itself is very flexible and lightweight as it can be.</p>
<p>Next, as you can see, we have established a <em>contract</em> between the client and CustomSocket, binding the notion of &#8220;events&#8221; to members of the class. There&#8217;s no key-based guessing-game here. From the layout of the class itself, you can see that CustomSocket dispatches certain types of events. There isn&#8217;t really a way to add a listener for an event that isn&#8217;t defined. All &#8220;events&#8221; (signals?) must be defined explicitly in the class itself. You may also have noticed that in the client class, our listener for &#8220;writeResult&#8221; doesn&#8217;t define any parameters. It doesn&#8217;t have to, since signals by default are empty. No more bloat than needed. Theoretically, you could even rewrite the example to make simple flash.events.Event signals not even pass the event along, since who actually uses the simple Event instance anyway?</p>
<p>Now, let&#8217;s discuss the code. In as3-signals, there are basically three types of signals. There is Signal, a default implementation of the notion of an event or signal, DeluxeSignal, which adds some advanced functionality to Signal, and NativeSignal, a signal which wraps native events, allowing you to &#8220;port&#8221; your events into signals.</p>
<p>The signal classes sport a few methods that are fairly important: &#8220;add(listener:Function):void&#8221;, &#8220;addOnce(listener:Function):void&#8221;, &#8220;remove(listener:Function):void&#8221;,  &#8221;removeAll():void&#8221;, and &#8220;dispatch(&#8230;parameters):void&#8221;. As you can see, complete control is established over event/signal flow. You can listen for a signal once or indefinitely. You can remove one listener, or all of them at once. Finally, using &#8220;dispatch(&#8230;parameters)&#8221; you can send a signal to all registered listeners.</p>
<p>Let&#8217;s take a moment to talk about the &#8220;dispatch(&#8230;parameters)&#8221; method. The flash.events.IEventDispatcher.dispatchEvent method takes one parameter of type flash.events.Event. So how do we use &#8220;dispatch(&#8230;parameters)&#8221;, then? It&#8217;s actually quite simple. When creating the signal implementation, you can pass Class objects to the constructor. Let&#8217;s wire up an example real quick to demonstrate this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> signal<span style="color: #000000; font-weight: bold;">:</span>Signal = <span style="color: #0033ff; font-weight: bold;">new</span> Signal<span style="color: #000000;">&#40;</span><span style="color: #004993;">String</span>, <span style="color: #004993;">Object</span><span style="color: #000000;">&#41;</span>;</pre></td></tr></table></div>

<p>The above code tells your signal object that, when the dispatch() method is called, the first parameter should be of type String and the second parameter should be of type Object. On the other side, the listener can take <span style="text-decoration: underline;">typed arguments:</span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;">signal.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>myListener<span style="color: #000000;">&#41;</span>;
signal.dispatch<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;key&quot;</span>, <span style="color: #000000;">&#123;</span>a<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #990000;">&quot;b&quot;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> myListener<span style="color: #000000;">&#40;</span>key<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span>, <span style="color: #004993;">value</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Object</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>As you can probably tell, this eliminates almost any need to create custom Event classes to contain values. All of this is accomplished really only using one class which has already been created and won&#8217;t need to be reinvented indefinitely as in the AS3 event system. Signal will check and see if types match when &#8220;dispatch(&#8230;parameters)&#8221; is run, and throw an Error if types don&#8217;t match.</p>
<p>So that&#8217;s a pretty thorough explanation and intro to using as3-signals. The only downside I have found with as3-signals is since it reinvents the Event system (word pun intended), it won&#8217;t &#8220;just work&#8221; with Flex, since Flex is so tied to AS3&#8217;s event system. Unfortunately, that means I won&#8217;t be able to use it as often as I would like (ie: all of the time). And that sums up as3-signals! If you have any questions or comments, please feel free to reply below in the comments.</p>



Share This:


	<a rel="nofollow"  href="http://blog.tkassembled.com/feed/" title="RSS"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=as3signals%20-%20An%20Awesome%20Solution%20to%20Events%2FSignals%20in%20AS3%20-%20http%3A%2F%2Fblog.tkassembled.com%2F83%2F" title="Twitter"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.tkassembled.com%2F83%2F&amp;title=as3signals%20-%20An%20Awesome%20Solution%20to%20Events%2FSignals%20in%20AS3&amp;notes=There%20has%20been%20quite%20a%20lot%20of%20buzz%20lately%20in%20the%20community%20about%20a%20new%20library%20by%20Robert%20Penner%20called%20as3-signals.%20John%20Lindquist%20recently%20posted%20a%20video%20tutorial%20on%20using%20it%2C%20and%20I%20thought%20I%27d%20follow%20up%20with%20a%20nice%20text-based%20tutorial%20explaining%20th" title="del.icio.us"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F83%2F&amp;title=as3signals%20-%20An%20Awesome%20Solution%20to%20Events%2FSignals%20in%20AS3" title="StumbleUpon"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.tkassembled.com%2F83%2F&amp;title=as3signals%20-%20An%20Awesome%20Solution%20to%20Events%2FSignals%20in%20AS3&amp;bodytext=There%20has%20been%20quite%20a%20lot%20of%20buzz%20lately%20in%20the%20community%20about%20a%20new%20library%20by%20Robert%20Penner%20called%20as3-signals.%20John%20Lindquist%20recently%20posted%20a%20video%20tutorial%20on%20using%20it%2C%20and%20I%20thought%20I%27d%20follow%20up%20with%20a%20nice%20text-based%20tutorial%20explaining%20th" title="Digg"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.tkassembled.com%2F83%2F&amp;t=as3signals%20-%20An%20Awesome%20Solution%20to%20Events%2FSignals%20in%20AS3" title="Facebook"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fblog.tkassembled.com%2F83%2F" title="Technorati"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F83%2F&amp;title=as3signals%20-%20An%20Awesome%20Solution%20to%20Events%2FSignals%20in%20AS3" title="Reddit"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>


<br/><br/>

<p><a href="http://feedads.g.doubleclick.net/~a/Kz2D4_QyRGOyRluhlutiWFu5ZNc/0/da"><img src="http://feedads.g.doubleclick.net/~a/Kz2D4_QyRGOyRluhlutiWFu5ZNc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Kz2D4_QyRGOyRluhlutiWFu5ZNc/1/da"><img src="http://feedads.g.doubleclick.net/~a/Kz2D4_QyRGOyRluhlutiWFu5ZNc/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tkassembled/~4/1PaDCbVvK6s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tkassembled.com/83/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		<feedburner:origLink>http://blog.tkassembled.com/83/</feedburner:origLink></item>
		<item>
		<title>Ripping DVD’s and CD’s to ISO format in Linux</title>
		<link>http://feedproxy.google.com/~r/tkassembled/~3/kRhiTXVjQ3w/</link>
		<comments>http://blog.tkassembled.com/76/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 22:00:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[ripping]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.tkassembled.com/?p=76</guid>
		<description><![CDATA[
There are many reasons why one would want to rip a disc to an ISO file. The ISO format stores the disc locally on your hard drive in a way that it can be easily and quickly burnt again to removable media. If you&#8217;ve ever wanted to keep a backup copy of some software on <a href="http://blog.tkassembled.com/76/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[
<p>There are many reasons why one would want to rip a disc to an ISO file. The ISO format stores the disc locally on your hard drive in a way that it can be easily and quickly burnt again to removable media. If you&#8217;ve ever wanted to keep a backup copy of some software on your computer, or you would like to store entire DVDs locally on your filesystem, Linux can help you out with that. The program &#8220;dd,&#8221; provided by most Linux distributions by default, allows for quick, simple ripping of CD&#8217;s and DVD&#8217;s from a terminal. Let&#8217;s get ripping. <span id="more-76"></span></p>
<p>&#8220;dd&#8221; has to be one of the easiest command line programs that there is to work with on Linux. Open up a terminal and we&#8217;ll demonstrate just how simple this is. Enter the following command to start the rip:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;"><span style="color: #000000; font-weight: bold;">if</span></span>=<span style="color: #ff0000;">&quot;/dev/dvd&quot;</span> <span style="color: #007800;">of</span>=<span style="color: #ff0000;">&quot;my-dvd.iso&quot;</span></pre></div></div>

<p>Is that it? Yep! &#8220;dd&#8221; will quietly and painlessly rip your disc to your hard drive in the location specified by &#8220;of&#8221;. It takes &#8220;/dev/dvd&#8221; as the input to rip from, so you&#8217;d probably want to change this to &#8220;/dev/cdrom&#8221; if you&#8217;re ripping from a CD. Let&#8217;s demonstrate how to rip from a CD next:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;"><span style="color: #000000; font-weight: bold;">if</span></span>=<span style="color: #ff0000;">&quot;/dev/cdrom&quot;</span> <span style="color: #007800;">of</span>=<span style="color: #ff0000;">&quot;my-cd.iso&quot;</span></pre></div></div>

<p>Easy, right? Exactly! Now you can store all of your software and discs locally on your computers hard drive. Since I actually used to use Windows, I can make backups of my Windows XP install disc easily and painlessly. And if you&#8217;re a <a href="http://www.videolan.org/vlc/" target="_blank">VLC</a> user, you can actually rip a DVD movie to an ISO using the above commands and play back the DVD as if it were in your drive (menus and all!) by opening the ISO with VLC! &#8220;dd&#8221; is truly a powerful little tool that can quickly get an often-complicated job done without any fuss.</p>



Share This:


	<a rel="nofollow"  href="http://blog.tkassembled.com/feed/" title="RSS"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Ripping%20DVD%27s%20and%20CD%27s%20to%20ISO%20format%20in%20Linux%20-%20http%3A%2F%2Fblog.tkassembled.com%2F76%2F" title="Twitter"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.tkassembled.com%2F76%2F&amp;title=Ripping%20DVD%27s%20and%20CD%27s%20to%20ISO%20format%20in%20Linux&amp;notes=There%20are%20many%20reasons%20why%20one%20would%20want%20to%20rip%20a%20disc%20to%20an%20ISO%20file.%20The%20ISO%20format%20stores%20the%20disc%20locally%20on%20your%20hard%20drive%20in%20a%20way%20that%20it%20can%20be%20easily%20and%20quickly%20burnt%20again%20to%20removable%20media.%20If%20you%27ve%20ever%20wanted%20to%20keep%20a%20backup%20copy%20o" title="del.icio.us"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F76%2F&amp;title=Ripping%20DVD%27s%20and%20CD%27s%20to%20ISO%20format%20in%20Linux" title="StumbleUpon"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.tkassembled.com%2F76%2F&amp;title=Ripping%20DVD%27s%20and%20CD%27s%20to%20ISO%20format%20in%20Linux&amp;bodytext=There%20are%20many%20reasons%20why%20one%20would%20want%20to%20rip%20a%20disc%20to%20an%20ISO%20file.%20The%20ISO%20format%20stores%20the%20disc%20locally%20on%20your%20hard%20drive%20in%20a%20way%20that%20it%20can%20be%20easily%20and%20quickly%20burnt%20again%20to%20removable%20media.%20If%20you%27ve%20ever%20wanted%20to%20keep%20a%20backup%20copy%20o" title="Digg"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.tkassembled.com%2F76%2F&amp;t=Ripping%20DVD%27s%20and%20CD%27s%20to%20ISO%20format%20in%20Linux" title="Facebook"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fblog.tkassembled.com%2F76%2F" title="Technorati"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F76%2F&amp;title=Ripping%20DVD%27s%20and%20CD%27s%20to%20ISO%20format%20in%20Linux" title="Reddit"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>


<br/><br/>

<p><a href="http://feedads.g.doubleclick.net/~a/5zcCfO13vSsYX-Dc98sxQVR2rSE/0/da"><img src="http://feedads.g.doubleclick.net/~a/5zcCfO13vSsYX-Dc98sxQVR2rSE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/5zcCfO13vSsYX-Dc98sxQVR2rSE/1/da"><img src="http://feedads.g.doubleclick.net/~a/5zcCfO13vSsYX-Dc98sxQVR2rSE/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tkassembled/~4/kRhiTXVjQ3w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tkassembled.com/76/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.tkassembled.com/76/</feedburner:origLink></item>
		<item>
		<title>Music Management in Linux: Ripping CD’s with abcde</title>
		<link>http://feedproxy.google.com/~r/tkassembled/~3/ljcEDsi8jcQ/</link>
		<comments>http://blog.tkassembled.com/72/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 06:20:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[abcde]]></category>
		<category><![CDATA[id3]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[ripping]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.tkassembled.com/?p=72</guid>
		<description><![CDATA[
When one sets out to rip a CD in Linux, he is confronted by many options. The user can use a graphical music player such as Rhythmbox, Banshee, or Amarok to rip said CD, along with many other dedicated ripping solutions. I recently purchased Rosetta Stone Hebrew Levels 1 &#8211; 3 which comes with 12 <a href="http://blog.tkassembled.com/72/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[
<p>When one sets out to rip a CD in Linux, he is confronted by many options. The user can use a graphical music player such as <a href="http://www.gnome.org/projects/rhythmbox/" target="_blank">Rhythmbox</a>, <a href="http://banshee-project.org/" target="_blank">Banshee</a>, or <a href="http://amarok.kde.org/" target="_blank">Amarok</a> to rip said CD, along with many other dedicated ripping solutions. I recently purchased Rosetta Stone Hebrew Levels 1 &#8211; 3 which comes with 12 (read &#8216;em, TWELVE) discs of audio companion material. Let&#8217;s just say I needed a way to rip 12 discs fast, preferably in a terminal. Enter abcde.<span id="more-72"></span><a href="http://lly.org/~rcw/abcde/page/" target="_blank">A Better CD Encoder</a>, otherwise known as &#8220;abcde,&#8221; is a Linux program that can rip a CD as fast as is possible and allows the input of lots of custom options for how you want to rip the disc. It supports encoding to MP3 format using a couple of libraries (such as <a href="http://lame.sourceforge.net/" target="_blank">lame</a>), encoding to Ogg Vorbis, remote fetching of album info using CDDB, tagging such as ID3, autogeneration of m3u playlists, remote distributed MP3 encoding, and automatic disc ejection after completion, to name only a few of its many features. Basically, if you can dream it, you can do it with abcde.</p>
<p>Let&#8217;s install it. Run</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> abcde id3 id3v2</pre></div></div>

<p>to install abcde and ID3 for tagging files. Alternatively, you can click <a href="apt://abcde" target="_blank">here</a> to install abcde through your browser. Please note that you probably should install &#8220;lame&#8221; before trying to rip cds to MP3 files. To install lame, make sure you have <a href="http://medibuntu.org" target="_blank">Medibuntu</a> in your sources list and run</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">lame</span></pre></div></div>

<p>before ripping any discs. Alternatively, if you want to install &#8220;lame&#8221; through your browser and you already have the Medibuntu repository installed, you can click <a href="apt://lame">here</a>.</p>
<p>Now that it&#8217;s all ready and installed, let&#8217;s try ripping a CD! Let&#8217;s pop open a terminal and create a new directory to rip our CD to.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #ff0000;">&quot;Desktop/Rips&quot;</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>Desktop<span style="color: #000000; font-weight: bold;">/</span>Rips</pre></div></div>

<p>As a good starting point, I recommend the following command line options to rip the CD to the current directory:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">abcde <span style="color: #660033;">-N</span> <span style="color: #660033;">-g</span> <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>cdrom <span style="color: #660033;">-a</span> <span style="color: #c20cb9; font-weight: bold;">read</span>,encode,tag <span style="color: #660033;">-o</span> mp3  <span style="color: #660033;">-x</span></pre></div></div>

<p>This does a few clever things. Since, in my case, I had a TON of CDs to rip and really didn&#8217;t want to be bothered with anything until each encode is done, I passed the &#8220;-N&#8221; option which basically puts abcde in non-interactive mode. In addition, I passed the &#8220;-x&#8221; parameter, telling abcde to simply eject the disc after it has finished all of its operations. I also passed &#8220;-g&#8221; which tells lame to enable &#8220;gapless&#8221; encoding for songs. Few things bother me as much as unnecessary gaps between songs on an album, and this simple parameter eliminates that problem outright, providing you&#8217;re using lame as an encoder. I specified /dev/cdrom as my CD-ROM device, though this is usually unnecessary since abcde defaults to using /dev/cdrom anyway. I passed &#8220;-a read,encode,tag&#8221; to tell abcde to simply take the CD, rip the raw output from it, encode it, tag it using default values, and be done. I wanted a non-interactive rip, and I definitely got it! The last parameter I passed was &#8220;-o mp3&#8243;, informing abcde to encode the songs to MP3 files.</p>
<p>First, abcde uses a program called <a href="http://www.xiph.org/paranoia/" target="_blank">cdparanoia</a> to rip the raw wave files from the CD to the local hard disk. Then, it passes those files to the encoder, in my case lame, and then it tags the files using some default values and puts them in a new directory under the current working directory. Fast. Painless. Noninteractive. Exactly what I needed.</p>
<p>This certainly isn&#8217;t the only way to configure abcde, either. abcde definitely feels like one of those swiss-army-knife-like programs I&#8217;ll use on a fairly regular basis to bring music from a CD into my music library. Combine it with a tool like <a href="http://blog.tkassembled.com/37/" target="_blank">EasyTAG</a>, and you&#8217;re in business.</p>



Share This:


	<a rel="nofollow"  href="http://blog.tkassembled.com/feed/" title="RSS"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Music%20Management%20in%20Linux%3A%20Ripping%20CD%27s%20with%20abcde%20-%20http%3A%2F%2Fblog.tkassembled.com%2F72%2F" title="Twitter"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.tkassembled.com%2F72%2F&amp;title=Music%20Management%20in%20Linux%3A%20Ripping%20CD%27s%20with%20abcde&amp;notes=When%20one%20sets%20out%20to%20rip%20a%20CD%20in%20Linux%2C%20he%20is%20confronted%20by%20many%20options.%20The%20user%20can%20use%20a%20graphical%20music%20player%20such%20as%20Rhythmbox%2C%20Banshee%2C%20or%20Amarok%20to%20rip%20said%20CD%2C%20along%20with%20many%20other%20dedicated%20ripping%20solutions.%20I%20recently%20purchased%20Rosetta%20" title="del.icio.us"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F72%2F&amp;title=Music%20Management%20in%20Linux%3A%20Ripping%20CD%27s%20with%20abcde" title="StumbleUpon"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.tkassembled.com%2F72%2F&amp;title=Music%20Management%20in%20Linux%3A%20Ripping%20CD%27s%20with%20abcde&amp;bodytext=When%20one%20sets%20out%20to%20rip%20a%20CD%20in%20Linux%2C%20he%20is%20confronted%20by%20many%20options.%20The%20user%20can%20use%20a%20graphical%20music%20player%20such%20as%20Rhythmbox%2C%20Banshee%2C%20or%20Amarok%20to%20rip%20said%20CD%2C%20along%20with%20many%20other%20dedicated%20ripping%20solutions.%20I%20recently%20purchased%20Rosetta%20" title="Digg"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.tkassembled.com%2F72%2F&amp;t=Music%20Management%20in%20Linux%3A%20Ripping%20CD%27s%20with%20abcde" title="Facebook"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fblog.tkassembled.com%2F72%2F" title="Technorati"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F72%2F&amp;title=Music%20Management%20in%20Linux%3A%20Ripping%20CD%27s%20with%20abcde" title="Reddit"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>


<br/><br/>

<p><a href="http://feedads.g.doubleclick.net/~a/jh5rE2rMGSIn474dsQziL92L4KE/0/da"><img src="http://feedads.g.doubleclick.net/~a/jh5rE2rMGSIn474dsQziL92L4KE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/jh5rE2rMGSIn474dsQziL92L4KE/1/da"><img src="http://feedads.g.doubleclick.net/~a/jh5rE2rMGSIn474dsQziL92L4KE/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tkassembled/~4/ljcEDsi8jcQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tkassembled.com/72/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.tkassembled.com/72/</feedburner:origLink></item>
		<item>
		<title>Flash Player on Linux – Installing Native 64bit Flash Player</title>
		<link>http://feedproxy.google.com/~r/tkassembled/~3/3Tp94aksyBc/</link>
		<comments>http://blog.tkassembled.com/60/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 04:27:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[64 bit]]></category>
		<category><![CDATA[flash player]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[flashplayer]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.tkassembled.com/?p=60</guid>
		<description><![CDATA[
It seems that installing Flash Player on an Ubuntu desktop is getting easier and easier with every release of the popular Linux operating system. However, its still very apparent that there are still problems pairing the two together in some areas. In the past, it has been less-than-easy to install the 64bit Flash Player plugin <a href="http://blog.tkassembled.com/60/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[
<p>It seems that installing Flash Player on an Ubuntu desktop is getting easier and easier with every release of the popular Linux operating system. However, its still very apparent that there are still problems pairing the two together in some areas. In the past, it has been less-than-easy to install the 64bit Flash Player plugin in Linux. However, Adobe just released  refresh to the alpha, so let&#8217;s see if it has taken care of some of the ease-of-installation problems.<span id="more-60"></span></p>
<p>Let&#8217;s get to it! Go ahead and <a href="http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.42.34.linux-x86_64.so.tar.gz" target="_blank">download the plugin</a>, and we&#8217;ll walk through installation. When you first untar/unzip the package, you&#8217;ll find that there&#8217;s really only one file inside: libflashplayer.so. It seems that Adobe still hasn&#8217;t addressed the ease-of-installation problems yet! For the average Joe, a file named &#8220;libflashplayer.so&#8221; doesn&#8217;t mean anything at all. You can&#8217;t really execute it from the commandline, and double-clicking yields nothing at all. Bummer! Well, Joe, we&#8217;re going to have to do some terminal work to get this up and going, so don&#8217;t lose heart!</p>
<p>So what are we supposed to do with this file? First, lets move the file to an arbitrary place where we can keep track of it. Open up a terminal and &#8220;cd&#8221; to the directory in which you downloaded &#8220;libflashplayer-10.*.gz&#8221;. For me, it&#8217;s in ~/Downloads, so I&#8217;ll run</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>Downloads</pre></div></div>

<p>to get where I need to be. Now, let&#8217;s unpack the sucker. Run the following command in your terminal to unpack the plugin:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zxvf</span> libflashplayer-<span style="color: #000000; font-weight: bold;">*</span>.tar.gz</pre></div></div>

<p>A quick look at the directory should show you that there is now a file named &#8220;libflashplayer.so&#8221; present. This is our browser plugin, exactly what we need. Now, let&#8217;s move it to a global location where we can reference it later. We&#8217;ll create a directory layout under /opt and move the plugin to that directory. Let&#8217;s make that directory:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Replace &quot;10.0.42.34 with the version of Flash Player you downloaded.</span>
<span style="color: #666666; font-style: italic;"># The tar.gz file you just downloaded should contain the version number in the filename.</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>adobe<span style="color: #000000; font-weight: bold;">/</span>flashplayer<span style="color: #000000; font-weight: bold;">/</span>10.0.42.34<span style="color: #000000; font-weight: bold;">/</span>release<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">64</span><span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> libflashplayer.so <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>adobe<span style="color: #000000; font-weight: bold;">/</span>flashplayer<span style="color: #000000; font-weight: bold;">/</span>10.0.42.34<span style="color: #000000; font-weight: bold;">/</span>release<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">64</span><span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Note the directory hierarchy we just created. We created a directory called /opt/adobe/flashplayer for storing all of our different versions of Flash Player that we may or may not decide to install in the future. Next, we created a directory within /opt/adobe/flashplayer named after the version of Flash Player we&#8217;re using. Within that folder, we created a folder called &#8220;release.&#8221; (There are two different types of Flash Player plugins, a debugger and a <em>release</em> player, the one used most often by the general public.) Within that folder, we created a folder called &#8220;64,&#8221; since this is a 64bit version of Flash Player. In a future post, we&#8217;ll talk about how to install Flash Player 32bit edition on a 64bit machine, but for now, we&#8217;re using the native 64bit plugin.</p>
<p>Next, before we start linking up our shiny new 64bit Flash Player plugin, we need to make sure that we remove any 32bit versions of Flash Player. Execute the following commands to remove all Flash Player plugins installed on your system:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> remove <span style="color: #660033;">--purge</span> gnash flashplugin-installer flashplugin-nonfree
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mozilla<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/*</span>flash<span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> ~<span style="color: #000000; font-weight: bold;">/</span>.mozilla<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/*</span>flash<span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/*</span>flash<span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>firefox-addons<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/*</span>flash<span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nspluginwrapper<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/*</span>flash<span style="color: #000000; font-weight: bold;">*</span></pre></div></div>

<p>This removes all Flash Player plugins you may have installed. If you are sure that you don&#8217;t have Flash Player installed, you might not need to run line 1 above, but you should run the rest of the code just in case.</p>
<p>Now, let&#8217;s create symbolic links pointing to our shiny new 64bit Flash Player plugin!</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>adobe<span style="color: #000000; font-weight: bold;">/</span>flashplayer<span style="color: #000000; font-weight: bold;">/</span>10.0.42.34<span style="color: #000000; font-weight: bold;">/</span>release<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">64</span><span style="color: #000000; font-weight: bold;">/</span>libflashplayer.so <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mozilla<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>libflashplayer.so
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>adobe<span style="color: #000000; font-weight: bold;">/</span>flashplayer<span style="color: #000000; font-weight: bold;">/</span>10.0.42.34<span style="color: #000000; font-weight: bold;">/</span>release<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">64</span><span style="color: #000000; font-weight: bold;">/</span>libflashplayer.so ~<span style="color: #000000; font-weight: bold;">/</span>.mozilla<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>libflashplayer.so
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>adobe<span style="color: #000000; font-weight: bold;">/</span>flashplayer<span style="color: #000000; font-weight: bold;">/</span>10.0.42.34<span style="color: #000000; font-weight: bold;">/</span>release<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">64</span><span style="color: #000000; font-weight: bold;">/</span>libflashplayer.so <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>libflashplayer.so
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>adobe<span style="color: #000000; font-weight: bold;">/</span>flashplayer<span style="color: #000000; font-weight: bold;">/</span>10.0.42.34<span style="color: #000000; font-weight: bold;">/</span>release<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">64</span><span style="color: #000000; font-weight: bold;">/</span>libflashplayer.so <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>firefox-addons<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>libflashplayer.so</pre></div></div>

<p>Alright! Good job! You&#8217;ve just installed a 64bit copy of Flash Player on your Linux desktop! Give yourself a nice pat on the back! Restart your browser(s) and you&#8217;re good to go! Just remember to be sure that your browsers actually exit. A nice test would be to run</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">killall</span> chrome
<span style="color: #c20cb9; font-weight: bold;">killall</span> firefox</pre></div></div>

<p>to make sure that your browsers really did get zapped!</p>
<p>Now, the next part is optional, though it is recommended that you give it a try. Since there are still a few bugs with Flash Player on Linux in general (not just with 64bit edition), you&#8217;ll notice some strange functionality at times running Flash Player. Sometimes, YouTube videos will not accept mouse input, leaving a user at the will of autoplay. To fix this problem, we need to edit a configuration file within /usr/lib/nspluginwrapper/i386/linux . Let&#8217;s open it in &#8220;gedit&#8221;:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gedit <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nspluginwrapper<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>npviewer</pre></div></div>

<p>You&#8217;ll now notice that the file looks something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #007800;">TARGET_OS</span>=linux
<span style="color: #007800;">TARGET_ARCH</span>=i386
. <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nspluginwrapper<span style="color: #000000; font-weight: bold;">/</span>noarch<span style="color: #000000; font-weight: bold;">/</span>npviewer</pre></div></div>

<p>Modify this file so that it looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #007800;">TARGET_OS</span>=linux
<span style="color: #007800;">TARGET_ARCH</span>=i386
<span style="color: #007800;">GDK_NATIVE_WINDOWS</span>=<span style="color: #000000;">1</span>
. <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nspluginwrapper<span style="color: #000000; font-weight: bold;">/</span>noarch<span style="color: #000000; font-weight: bold;">/</span>npviewer</pre></div></div>

<p>This modification tells &#8220;npviewer&#8221; to use GTK native windows. Now, you shouldn&#8217;t be experiencing <em>some</em> of those nasty bugs!</p>
<p>I know what you&#8217;re thinking. &#8220;This is ridiculous! Why doesn&#8217;t Adobe just package Flash Player in a .deb file and do all of this work behind the scenes for us?&#8221; And that&#8217;s a good question, but I don&#8217;t have an answer for it. Hopefully when the Linux 64bit Flash Player plugin comes out of alpha, we&#8217;ll at least get a nice deb file that we can double click and install away to our utmost enjoyment <img src='http://blog.tkassembled.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Any suggestions? Run into any problems? Post back in the comments below and we&#8217;ll see if we can walk you though this and help you get your 64bit Flash Player running like clockwork!</p>



Share This:


	<a rel="nofollow"  href="http://blog.tkassembled.com/feed/" title="RSS"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Flash%20Player%20on%20Linux%20-%20Installing%20Native%2064bit%20Flash%20Player%20-%20http%3A%2F%2Fblog.tkassembled.com%2F60%2F" title="Twitter"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.tkassembled.com%2F60%2F&amp;title=Flash%20Player%20on%20Linux%20-%20Installing%20Native%2064bit%20Flash%20Player&amp;notes=It%20seems%20that%20installing%20Flash%20Player%20on%20an%20Ubuntu%20desktop%20is%20getting%20easier%20and%20easier%20with%20every%20release%20of%20the%20popular%20Linux%20operating%20system.%20However%2C%20its%20still%20very%20apparent%20that%20there%20are%20still%20problems%20pairing%20the%20two%20together%20in%20some%20areas.%20I" title="del.icio.us"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F60%2F&amp;title=Flash%20Player%20on%20Linux%20-%20Installing%20Native%2064bit%20Flash%20Player" title="StumbleUpon"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.tkassembled.com%2F60%2F&amp;title=Flash%20Player%20on%20Linux%20-%20Installing%20Native%2064bit%20Flash%20Player&amp;bodytext=It%20seems%20that%20installing%20Flash%20Player%20on%20an%20Ubuntu%20desktop%20is%20getting%20easier%20and%20easier%20with%20every%20release%20of%20the%20popular%20Linux%20operating%20system.%20However%2C%20its%20still%20very%20apparent%20that%20there%20are%20still%20problems%20pairing%20the%20two%20together%20in%20some%20areas.%20I" title="Digg"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.tkassembled.com%2F60%2F&amp;t=Flash%20Player%20on%20Linux%20-%20Installing%20Native%2064bit%20Flash%20Player" title="Facebook"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fblog.tkassembled.com%2F60%2F" title="Technorati"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F60%2F&amp;title=Flash%20Player%20on%20Linux%20-%20Installing%20Native%2064bit%20Flash%20Player" title="Reddit"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>


<br/><br/>

<p><a href="http://feedads.g.doubleclick.net/~a/Ioq02oDogl1o5z9_1JNhmtMj7iw/0/da"><img src="http://feedads.g.doubleclick.net/~a/Ioq02oDogl1o5z9_1JNhmtMj7iw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Ioq02oDogl1o5z9_1JNhmtMj7iw/1/da"><img src="http://feedads.g.doubleclick.net/~a/Ioq02oDogl1o5z9_1JNhmtMj7iw/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tkassembled/~4/3Tp94aksyBc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tkassembled.com/60/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.tkassembled.com/60/</feedburner:origLink></item>
		<item>
		<title>Music Management in Linux: Using EasyTAG</title>
		<link>http://feedproxy.google.com/~r/tkassembled/~3/P-cYUfEXJOI/</link>
		<comments>http://blog.tkassembled.com/37/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 06:24:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.tkassembled.com/?p=37</guid>
		<description><![CDATA[
If you&#8217;re like me and you love music, you probably have thousands upon thousands of songs in your library. It&#8217;s good to have choices, right? If I want to listen to Led Zeppelin, then I should have that option. If I&#8217;m more in the mood for some instrumental folk music like John Fahey, I should <a href="http://blog.tkassembled.com/37/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[
<p>If you&#8217;re like me and you <span style="text-decoration: underline;">love</span> music, you probably have thousands upon thousands of songs in your library. It&#8217;s good to have choices, right? If I want to listen to <a href="http://mp3panda.com/artist116925/Led-Zeppelin/?userid=1463086" target="_blank">Led Zeppelin</a>, then I should have that option. If I&#8217;m more in the mood for some instrumental folk music like <a href="http://mp3panda.com/artist169607/John-Fahey/?userid=1463086" target="_blank">John Fahey</a>, I should be able to play it wherever I&#8217;m at. Managing the filenames and ID3 tags of such a library, though, is anything but easy. Enter <a href="http://easytag.sourceforge.net/" target="_blank">EasyTAG</a>, literally easy tagging and renaming for your entire music collection.</p>
<p><span id="more-37"></span>The first question we should ask, however, is &#8220;Why EasyTAG?&#8221; Linux is not wanting as far as for music management tools. Why not use <a href="http://mp3panda.com/artist169607/John-Fahey/" target="_blank">Cowbell</a>, or one of the many other Linux tools? Well, that&#8217;s why you&#8217;re here, isn&#8217;t it? <img src='http://blog.tkassembled.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>While Cowbell manages your music on a per-album basis, EasyTAG manages your music on a per-anything basis. You can manage anything from a single song to your entire music collection in one swoop. Cowbell is really only tailored to being a simple ID3 tag editor for your individual albums, while EasyTAG aims to be a full-blown, all-purpose tool for managing your entire music collection. It supports almost all ID3v2 tags, including the ability to embed images in your music files for album art. It supports MP3, MP2, Ogg Vorbis, FLAC, MP4 files, and much more. It sports album and song information lookup using free web services. It also operates asynchronously and writing to files is only initiated after a user asks it to do so. Until then, changes are stored in a list of operations which EasyTAG will perform on saving the files to disk.</p>
<p>Let&#8217;s get started using EasyTAG real quick. We&#8217;re going to be using Ubuntu, but if you&#8217;re using any Debian-derivative, you should be able to follow the installation line-by-line. If you&#8217;re using another distro, check out EasyTAG&#8217;s <a href="http://easytag.sourceforge.net/downloads.htm#download" target="_blank">website</a> to download a package appropriate for your distribution. Here we go!</p>
<p>Let&#8217;s install EasyTAG. In a terminal, type in the following command:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> easytag</pre></td></tr></table></div>

<p>(Or, if you&#8217;re lazy, <a href="apt://easytag">click this link</a>.) After it installs, you should have a new entry under Applications-&gt;Sound &amp; Video called EasyTAG, like so:</p>
<div id="attachment_42" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.tkassembled.com/u/2010/01/Screenshot1.png"><img class="size-medium wp-image-42" title="Screenshot" src="http://blog.tkassembled.com/u/2010/01/Screenshot1-300x278.png" alt="Screenshot of Menu" width="300" height="278" /></a><p class="wp-caption-text">Screenshot of the location of EasyTAG within the Ubuntu main menu</p></div>
<p>Go ahead and start EasyTAG and we&#8217;ll get you familiar using it in no time!</p>
<p>After you start EasyTAG, you&#8217;ll be presented with something like this:</p>
<div id="attachment_43" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.tkassembled.com/u/2010/01/Screenshot-EasyTAG-2.1.6.png"><img class="size-medium wp-image-43" title="Screenshot-EasyTAG 2.1.6" src="http://blog.tkassembled.com/u/2010/01/Screenshot-EasyTAG-2.1.6-300x226.png" alt="Screenshot of the main window of EasyTAG" width="300" height="226" /></a><p class="wp-caption-text">Screenshot of the EasyTAG home screen.</p></div>
<p>On the left, you have your file browser, in the middle, you&#8217;ll see all music files in the selected directory, eg:</p>
<div id="attachment_45" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.tkassembled.com/u/2010/01/Screenshot-EasyTAG-2.1.6-1.png"><img class="size-medium wp-image-45" title="Screenshot-EasyTAG 2.1.6-1" src="http://blog.tkassembled.com/u/2010/01/Screenshot-EasyTAG-2.1.6-1-300x226.png" alt="" width="300" height="226" /></a><p class="wp-caption-text">When you select a directory, EasyTAG shows the files in the middle content pane.</p></div>
<p style="text-align: left;">And on the right, we have our tag-editing fields of glory. You may have noticed that next to each field is a small box. What this box does is, when clicked, it tags all of the selected files with the tag you have selected. For instance, if I wanted to change the album tag of this album, I would <span style="text-decoration: underline;">select all files in the middle that I wanted to edit</span>, then make the change to the tag on the right, and then click the box next to the album name input. What this does is add the changes to the queue at the bottom. One of my favorite features is that EasyTAG never just &#8220;assumes&#8221; anything and never writes any changes to disk without explicitly being told to, as mentioned above.</p>
<p style="text-align: left;">After making that change, this is what my EasyTAG window looks like:</p>
<div id="attachment_46" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.tkassembled.com/u/2010/01/Screenshot-EasyTAG-2.1.6-2.png"><img class="size-medium wp-image-46" title="Screenshot-EasyTAG 2.1.6-2" src="http://blog.tkassembled.com/u/2010/01/Screenshot-EasyTAG-2.1.6-2-300x226.png" alt="" width="300" height="226" /></a><p class="wp-caption-text">Now, EasyTAG has stored the operation you just performed to be executed later. Brilliant!</p></div>
<p>As you can see, it recorded the changes in the bar below. It also tried to automatically correct a file within the directory, which can be configured using the preferences. After editing your tags, you can click the save button in the top bar to write your changes to disk, as shown below:</p>
<div id="attachment_47" class="wp-caption aligncenter" style="width: 62px"><a href="http://blog.tkassembled.com/u/2010/01/Screenshot2.png"><img class="size-full wp-image-47" title="Screenshot" src="http://blog.tkassembled.com/u/2010/01/Screenshot2.png" alt="" width="52" height="48" /></a><p class="wp-caption-text">The all-too-important &quot;Save to Disk&quot; button. </p></div>
<p style="text-align: left;">Click this button, and your changes will be written to disk.</p>
<p style="text-align: left;">Well, what about renaming files? For that, you&#8217;ll need to select the files you wish to change, then click the &#8220;Scan&#8221; button at the top of the screen:</p>
<div id="attachment_48" class="wp-caption aligncenter" style="width: 57px"><a href="http://blog.tkassembled.com/u/2010/01/Screenshot-1.png"><img class="size-full wp-image-48" title="Screenshot-1" src="http://blog.tkassembled.com/u/2010/01/Screenshot-1.png" alt="" width="47" height="39" /></a><p class="wp-caption-text">The scan button for scanning, retagging, and renaming files. </p></div>
<p>This should pop up a new window allowing you to set a renaming filter to apply to the files. Make sure you select &#8220;Rename File and Directory&#8221; via the dropdown box, and then click the green icon next to the dropdown box.</p>
<div id="attachment_49" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.tkassembled.com/u/2010/01/Screenshot-Tag-and-File-Name-scan.png"><img class="size-medium wp-image-49" title="Screenshot-Tag and File Name scan" src="http://blog.tkassembled.com/u/2010/01/Screenshot-Tag-and-File-Name-scan-300x92.png" alt="" width="300" height="92" /></a><p class="wp-caption-text">The scan dialog box. Provides some interesting options for renaming and retagging the selected items.</p></div>
<p style="text-align: left;">After you&#8217;re done, hit close. Now, you should see that the changes propagated to the selected files in the status box below. When you&#8217;re all done, again click the &#8220;Save to Disk&#8221; button pictured above to write your changes to disk.</p>
<p style="text-align: left;">Though this is only a cursory introduction to EasyTAG, it&#8217;s easy to see how incredibly powerful this is. My music collection just hit the 4000-plus club the other day, with so many different files acquired over the years, following no rules as to file naming and tagging. Now, my entire collection has been renamed to follow the pattern pictured above &#8220;%n &#8211; %t&#8221; which is basically &#8220;TRACK_NUMBER &#8211; TRACK_TITLE,&#8221; so the third song of an album called &#8220;Billy Joe&#8221; will be renamed on disk to &#8220;03 &#8211; Billy Joe.mp3&#8243;. EasyTAG makes what is simple to do with one song simple to do with your entire library.</p>
<p style="text-align: left;">To be honest, we really haven&#8217;t even scratched the surface of what EasyTAG is capable of. EasyTAG simplifies the process for embedding cover art in each individual file as a tag, which is a huge plus for me. As mentioned before, it also provides a song-info lookup service for finding all of the tags for your songs and albums, removing yet another painful step in managing a large collection.</p>
<p style="text-align: left;">Due to my circumstances outside of my control, I&#8217;m using a Windows machine at work, and as far as filenames go, Windows and Linux are very different beasts. For example, a folder named &#8220;Lord of the Rings: The Return of The King&#8221; would work great on a Linux machine, but on a Windows machine, colons (&#8220;:&#8221;) are a no-go. Fortunately, EasyTAG automagically prevents these problems by adjusting filenames to be crossplatform. Another headache I didn&#8217;t have to endure.</p>
<p style="text-align: left;">As the reader can probably see, EasyTAG is a vital tool for anyone who manages a music library. Almost any collection can benefit from some organization, and why put it off when you can do it today? EasyTAG certainly makes a valid case for putting your collection back in order.</p>



Share This:


	<a rel="nofollow"  href="http://blog.tkassembled.com/feed/" title="RSS"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Music%20Management%20in%20Linux%3A%20Using%20EasyTAG%20-%20http%3A%2F%2Fblog.tkassembled.com%2F37%2F" title="Twitter"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.tkassembled.com%2F37%2F&amp;title=Music%20Management%20in%20Linux%3A%20Using%20EasyTAG&amp;notes=If%20you%27re%20like%20me%20and%20you%20love%20music%2C%20you%20probably%20have%20thousands%20upon%20thousands%20of%20songs%20in%20your%20library.%20It%27s%20good%20to%20have%20choices%2C%20right%3F%20If%20I%20want%20to%20listen%20to%20Led%20Zeppelin%2C%20then%20I%20should%20have%20that%20option.%20If%20I%27m%20more%20in%20the%20mood%20for%20some%20instrum" title="del.icio.us"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F37%2F&amp;title=Music%20Management%20in%20Linux%3A%20Using%20EasyTAG" title="StumbleUpon"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.tkassembled.com%2F37%2F&amp;title=Music%20Management%20in%20Linux%3A%20Using%20EasyTAG&amp;bodytext=If%20you%27re%20like%20me%20and%20you%20love%20music%2C%20you%20probably%20have%20thousands%20upon%20thousands%20of%20songs%20in%20your%20library.%20It%27s%20good%20to%20have%20choices%2C%20right%3F%20If%20I%20want%20to%20listen%20to%20Led%20Zeppelin%2C%20then%20I%20should%20have%20that%20option.%20If%20I%27m%20more%20in%20the%20mood%20for%20some%20instrum" title="Digg"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.tkassembled.com%2F37%2F&amp;t=Music%20Management%20in%20Linux%3A%20Using%20EasyTAG" title="Facebook"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fblog.tkassembled.com%2F37%2F" title="Technorati"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F37%2F&amp;title=Music%20Management%20in%20Linux%3A%20Using%20EasyTAG" title="Reddit"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>


<br/><br/>

<p><a href="http://feedads.g.doubleclick.net/~a/knENPsTbz6w4s607QOkV53YJ3Us/0/da"><img src="http://feedads.g.doubleclick.net/~a/knENPsTbz6w4s607QOkV53YJ3Us/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/knENPsTbz6w4s607QOkV53YJ3Us/1/da"><img src="http://feedads.g.doubleclick.net/~a/knENPsTbz6w4s607QOkV53YJ3Us/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tkassembled/~4/P-cYUfEXJOI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tkassembled.com/37/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://blog.tkassembled.com/37/</feedburner:origLink></item>
		<item>
		<title>Installing Flash Player 10 Debug on 64bit Ubuntu</title>
		<link>http://feedproxy.google.com/~r/tkassembled/~3/AeYAvy6Jbko/</link>
		<comments>http://blog.tkassembled.com/26/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 03:13:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[64 bit]]></category>
		<category><![CDATA[flash 10]]></category>
		<category><![CDATA[flash player]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.tkassembled.com/?p=26</guid>
		<description><![CDATA[
I just finished installing the Flash Player 10 debugger on my 64bit Ubuntu machine. All props go to &#8220;Me and Ubuntu,&#8221; with the article located here:http://meandubuntu.wordpress.com/2008/08/20/flash-10-rc-on-ubuntu-amd64/It involves using nspluginwrapper and some other libraries to emulate a 32bit environment for Flash Player to run in. Totally rad. 





Share This:


	
	
	
	
	
	
	
	



]]></description>
			<content:encoded><![CDATA[
<div xmlns='http://www.w3.org/1999/xhtml'>I just finished installing the Flash Player 10 debugger on my 64bit Ubuntu machine. All props go to &#8220;Me and Ubuntu,&#8221; with the article located here:<br/><a href='http://meandubuntu.wordpress.com/2008/08/20/flash-10-rc-on-ubuntu-amd64/' target='_blank'>http://meandubuntu.wordpress.com/2008/08/20/flash-10-rc-on-ubuntu-amd64/</a><br/><br/>It involves using nspluginwrapper and some other libraries to emulate a 32bit environment for Flash Player to run in. Totally rad. <br/><br/>
<div class='zemanta-pixie'><img src='http://img.zemanta.com/pixy.gif?x-id=e55817dd-096a-86ec-a027-e886bfcc4216' alt='' class='zemanta-pixie-img'/></div>
</div>



Share This:


	<a rel="nofollow"  href="http://blog.tkassembled.com/feed/" title="RSS"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Installing%20Flash%20Player%2010%20Debug%20on%2064bit%20Ubuntu%20-%20http%3A%2F%2Fblog.tkassembled.com%2F26%2F" title="Twitter"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.tkassembled.com%2F26%2F&amp;title=Installing%20Flash%20Player%2010%20Debug%20on%2064bit%20Ubuntu&amp;notes=I%20just%20finished%20installing%20the%20Flash%20Player%2010%20debugger%20on%20my%2064bit%20Ubuntu%20machine.%20All%20props%20go%20to%20%22Me%20and%20Ubuntu%2C%22%20with%20the%20article%20located%20here%3Ahttp%3A%2F%2Fmeandubuntu.wordpress.com%2F2008%2F08%2F20%2Fflash-10-rc-on-ubuntu-amd64%2FIt%20involves%20using%20nspluginwrapp" title="del.icio.us"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F26%2F&amp;title=Installing%20Flash%20Player%2010%20Debug%20on%2064bit%20Ubuntu" title="StumbleUpon"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.tkassembled.com%2F26%2F&amp;title=Installing%20Flash%20Player%2010%20Debug%20on%2064bit%20Ubuntu&amp;bodytext=I%20just%20finished%20installing%20the%20Flash%20Player%2010%20debugger%20on%20my%2064bit%20Ubuntu%20machine.%20All%20props%20go%20to%20%22Me%20and%20Ubuntu%2C%22%20with%20the%20article%20located%20here%3Ahttp%3A%2F%2Fmeandubuntu.wordpress.com%2F2008%2F08%2F20%2Fflash-10-rc-on-ubuntu-amd64%2FIt%20involves%20using%20nspluginwrapp" title="Digg"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.tkassembled.com%2F26%2F&amp;t=Installing%20Flash%20Player%2010%20Debug%20on%2064bit%20Ubuntu" title="Facebook"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fblog.tkassembled.com%2F26%2F" title="Technorati"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F26%2F&amp;title=Installing%20Flash%20Player%2010%20Debug%20on%2064bit%20Ubuntu" title="Reddit"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>


<br/><br/>

<p><a href="http://feedads.g.doubleclick.net/~a/UwixK0yHjqaNnbXqThpZ1ylCtwY/0/da"><img src="http://feedads.g.doubleclick.net/~a/UwixK0yHjqaNnbXqThpZ1ylCtwY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/UwixK0yHjqaNnbXqThpZ1ylCtwY/1/da"><img src="http://feedads.g.doubleclick.net/~a/UwixK0yHjqaNnbXqThpZ1ylCtwY/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tkassembled/~4/AeYAvy6Jbko" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tkassembled.com/26/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://blog.tkassembled.com/26/</feedburner:origLink></item>
		<item>
		<title>Spring Actionscript 0.8: My Review</title>
		<link>http://feedproxy.google.com/~r/tkassembled/~3/gUMXQtIMnqc/</link>
		<comments>http://blog.tkassembled.com/25/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 03:27:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[dependency injection]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[ioc]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://blog.tkassembled.com/?p=25</guid>
		<description><![CDATA[

Let&#8217;s face it. AS3 needed an IoC container. Spring Actionscript delivered it. In an older post, I compared Spring Actionscript and Parsley as IoC containers and the main thing missing from Spring Actionscript (that Parsley had) was documentation. Now, with the release of Spring Actionscript 0.8, that issue is solved.The documentation available at Spring Actionscript&#8217;s <a href="http://blog.tkassembled.com/25/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[
<div>
<p>Let&#8217;s face it. AS3 needed an IoC container. Spring Actionscript delivered it. In an older post, I compared <a href="http://springactionscript.org" target="_blank">Spring Actionscript</a> and Parsley as IoC containers and the main thing missing from Spring Actionscript (that Parsley had) was documentation. Now, with the release of Spring Actionscript 0.8, that issue is solved.<span id="more-25"></span>The documentation available at Spring Actionscript&#8217;s site (link above) is awesome. It is in keeping with the main Spring IoC container&#8217;s documentation, as well as other large libraries such as Hibernate&#8217;s documentation. The documentation is pretty extensive and the feature list is growing by the day. It&#8217;s becoming easier and easier to throw together a project with Spring Actionscript.</p>
<p>One of the new features that I had originally requested for a while back is autowiring. If you&#8217;re not familiar with autowiring, it is something that will ultimately save you a lot of lines of configuration code and a lot of time. Autowiring is the process by which an IoC container finds and injects dependencies automatically, either by type or by name. Rather than writing something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">...
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;object</span> <span style="color: #000066;">name</span>=”myObject” <span style="color: #000066;">class</span>=”com.something.else.SuperDependency”<span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=”megaDependency”<span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;object</span> <span style="color: #000066;">class</span>=”com.something.else.MegaDependency”<span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/object<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
...</pre></div></div>

<p>You can write something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">...
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;object</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;com.something.else.SuperDependency&quot;</span> <span style="color: #000066;">autowire</span>=<span style="color: #ff0000;">&quot;byType&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;object</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;com.something.else.MegaDependency&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
...</pre></div></div>

<p>In this case, &#8220;MegaDependency&#8221; is automagically injected into &#8220;SuperDependency&#8221; because of a few things: 1) The object tag describing &#8220;SuperDependency&#8221; has the autowire attribute set to &#8220;byType&#8221;, 2) &#8220;SuperDependency&#8221; declares a property &#8220;megaDependency&#8221; of type &#8220;MegaDependency&#8221;. Basically, what is happening behind the scenes is that Spring Actionscript is using introspection and runtime reflection (provided by the <a href="http://code.google.com/p/as3-commons" target="_blank">AS3 Commons Reflection</a> library) to analyze the fields (getters/setters/instance level variables) of a type, and then is looking for other objects managed by the IoC (Inversion of Control) container which match that type. If it finds an object eligible for injection, it automagically injects that object into the autowired one, saving you 2-3 lines of code per object.</p>
<p>Granted, the process above describes autowiring <em>by type.</em> There is another method of autowiring known as autowiring <em>by name</em>, but that seems pretty self-explanatory, right? Find an object in the IoC container whose name matches the name of the referenced property. Eg: if &#8220;SuperDependency&#8221; has a property called &#8220;megaDependency,&#8221; the IoC container will look for an object within itself called &#8220;megaDependency.&#8221;</p>
<p>Another game-changing feature of Spring Actionscript 0.8 is Stage autowiring. When used in Flex, Spring Actionscript can now autowire stage objects. By listening for the Event.ADDED event on the Stage, Spring can tell when display objects are added to the stage. When this happens, certain properties can be autowired.</p>
<p>Check out this example:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">...
<span style="color: #000000;">&#91;</span>Autowired<span style="color: #000000;">&#40;</span><span style="color: #004993;">mode</span> = <span style="color: #990000;">&quot;byType&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> myDependency<span style="color: #000000; font-weight: bold;">:</span>MyDependency;
&nbsp;
<span style="color: #000000;">&#91;</span>Autowired<span style="color: #000000;">&#40;</span><span style="color: #004993;">mode</span> = <span style="color: #990000;">&quot;byType&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> myOtherDependency<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span>AnotherDependency <span style="color: #000000;">&#123;</span> ... <span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> myOtherDependency<span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000000; font-weight: bold;">:</span>AnotherDependency<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span> ... <span style="color: #000000;">&#125;</span></pre></div></div>

<p>Assuming this is a class that extends flash.display.DisplayObject, when this instance is added to the display list, Spring Actionscript is notified by the Event.ADDED event, and it attempts to autowire this instance. By looking at the metadata, Spring Actionscript will autowire any necessary properties declared by your class, saving you a lot of work.</p>
<p>Basically, this version of Spring Actionscript is amazing. I love it. By working with it, I have saved tons of time, both in development and in preventing epic madness in the future.</p>
<p>The Spring Actionscript team has also been extremely helpful in fixing a few bugs related to the release. The first major one of these was Module autowiring on the stage. The problem with using Modules in Flex with Spring Actionscript is that Spring is counting on all class definitions being in the main ApplicationDomain. When loading a Module, by default a new ApplicationDomain is created for memory purposes, and the Module&#8217;s classes are loaded into it rather than the main ApplicationDomain.</p>
<p>Unfortunately this poses a problem as Spring is unable to find class definitions for all Module classes. However, the Spring Actionscript team has been very helpful in addressing the bug and trying to provide a fix. At this point, in the trunk, the issue has been patched but not fixed by preventing Modules from being autowired. Hopefully in the future, a fix will come so that we&#8217;ll be able to use stage autowiring anywhere, no matter which ApplicationDomain the classes are loaded into.</p>
<p>Another issue that has been fixed <em>since </em>the 0.8 release is complex property resolution. Spring Actionscript uses the Java property format (my.complex.property = something), and that format usually allows for complex property resolution (my.complex.property = ${my.other.property}/tk), but this wasn&#8217;t working with the 0.8 release. Fortunately, I have been told that this functionality is working great in the trunk, but I have yet to try it out.</p>
<p>Again, mad props to the Spring Actionscript team! Thank you so much for an awesome IoC container for AS3! Looking forward to the next release!</p>
<p>Technorati Tags: <a class="performancingtags" rel="tag" href="http://technorati.com/tag/as3">as3</a>, <a class="performancingtags" rel="tag" href="http://technorati.com/tag/ioc">ioc</a>, <a class="performancingtags" rel="tag" href="http://technorati.com/tag/dependency%20injection">dependency injection</a>, <a class="performancingtags" rel="tag" href="http://technorati.com/tag/flash">flash</a>, <a class="performancingtags" rel="tag" href="http://technorati.com/tag/flex">flex</a>, <a class="performancingtags" rel="tag" href="http://technorati.com/tag/spring">spring</a></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=ac90be62-2387-8250-b727-0724fff3496e" alt="" /></div>
</div>



Share This:


	<a rel="nofollow"  href="http://blog.tkassembled.com/feed/" title="RSS"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Spring%20Actionscript%200.8%3A%20My%20Review%20-%20http%3A%2F%2Fblog.tkassembled.com%2F25%2F" title="Twitter"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.tkassembled.com%2F25%2F&amp;title=Spring%20Actionscript%200.8%3A%20My%20Review&amp;notes=%0D%0A%0D%0ALet%27s%20face%20it.%20AS3%20needed%20an%20IoC%20container.%20Spring%20Actionscript%20delivered%20it.%20In%20an%20older%20post%2C%20I%20compared%20Spring%20Actionscript%20and%20Parsley%20as%20IoC%20containers%20and%20the%20main%20thing%20missing%20from%20Spring%20Actionscript%20%28that%20Parsley%20had%29%20was%20documentation." title="del.icio.us"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F25%2F&amp;title=Spring%20Actionscript%200.8%3A%20My%20Review" title="StumbleUpon"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.tkassembled.com%2F25%2F&amp;title=Spring%20Actionscript%200.8%3A%20My%20Review&amp;bodytext=%0D%0A%0D%0ALet%27s%20face%20it.%20AS3%20needed%20an%20IoC%20container.%20Spring%20Actionscript%20delivered%20it.%20In%20an%20older%20post%2C%20I%20compared%20Spring%20Actionscript%20and%20Parsley%20as%20IoC%20containers%20and%20the%20main%20thing%20missing%20from%20Spring%20Actionscript%20%28that%20Parsley%20had%29%20was%20documentation." title="Digg"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.tkassembled.com%2F25%2F&amp;t=Spring%20Actionscript%200.8%3A%20My%20Review" title="Facebook"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fblog.tkassembled.com%2F25%2F" title="Technorati"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F25%2F&amp;title=Spring%20Actionscript%200.8%3A%20My%20Review" title="Reddit"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>


<br/><br/>

<p><a href="http://feedads.g.doubleclick.net/~a/SA09h8kVfvv-BBfuFLfy74V3Pig/0/da"><img src="http://feedads.g.doubleclick.net/~a/SA09h8kVfvv-BBfuFLfy74V3Pig/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/SA09h8kVfvv-BBfuFLfy74V3Pig/1/da"><img src="http://feedads.g.doubleclick.net/~a/SA09h8kVfvv-BBfuFLfy74V3Pig/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tkassembled/~4/gUMXQtIMnqc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tkassembled.com/25/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.tkassembled.com/25/</feedburner:origLink></item>
		<item>
		<title>[AS3] Flex Unit 4</title>
		<link>http://feedproxy.google.com/~r/tkassembled/~3/QBJgDPRzQzs/</link>
		<comments>http://blog.tkassembled.com/24/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 02:57:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ant]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash 10]]></category>
		<category><![CDATA[flex 4]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://blog.tkassembled.com/?p=24</guid>
		<description><![CDATA[
I just wired up the latest version of Flex Unit 4 and it is impressive to say the least. For the last week or so, I&#8217;ve been messing around with the version that ships with Flash Builder 4, but I wanted to get up with the latest because of all of the awesome goodies it <a href="http://blog.tkassembled.com/24/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[
<div xmlns='http://www.w3.org/1999/xhtml'>I just wired up the latest version of <a href='http://opensource.adobe.com/wiki/display/flexunit/FlexUnit' target='_blank'>Flex Unit 4</a> and it is impressive to say the least. For the last week or so, I&#8217;ve been messing around with the version that ships with Flash Builder 4, but I wanted to get up with the latest because of all of the awesome goodies it comes with.<br/><br/>The thing I am really excited about is the new metadata-driven model. It&#8217;s almost as convenient to use as <a href='http://www.junit.org/' target='_blank'>JUnit</a> (but it still has a few things to improve upon). Finally, we&#8217;re able to have annotated test cases and test suites and thus are not forced to extend a class or implement an interface. All test-related configuration is done at runtime by the framework and via introspection. A great article that got me started can be found <a href='http://www.insideria.com/2009/05/flashbuilder4-will-support-fle.html' target='_blank'>here</a> on <a href='http://www.insideria.com/' target='_blank'>InsideRIA</a>. <br/><br/>The framework seems incredibly intelligent. You can even specify if you expect a method to throw an error with a simple metadata parameter. If the test method does not throw that error, it is considered a failed test. I haven&#8217;t found anything about the actual framework that I don&#8217;t like. It is a huge improvement over previous versions of Flex Unit and a good step toward standardizing unit testing across platforms. <br/><br/>One cool thing that I found inside of Flash Builder 4 is how easy it makes it to run Flex Unit tests. By right clicking on an Actionscript/MXML file, you can choose to &#8220;Execute FlexUnit Tests&#8230;&#8221;, which I really like. The downside to this is that Flash Builder 4 currently prefers an older version of Flex Unit, and encourages you to manually extend a class and follow test naming conventions etc. The upside to running Flex Unit tests inside of Flash Builder 4 is that it will actually show your test results within Eclipse. <br/><br/>This alone is a feature that&#8217;s been missing for an extremely long time. Being able to run unit tests within your IDE is a huge productivity boost. Having to manually launch a SWF that displays its test results within itself is at least a few extra steps that bog down one&#8217;s workflow. Unfortunately, since I&#8217;m using Flex Unit 4 rather than the Flex Unit that ships with Flash Builder 4, I have to launch my tests and compile them separately, but at least we&#8217;re now moving in the right direction. Once you understand the flow of working with a LocalConnection, passing data from Flash to, let&#8217;s say, Java, really isn&#8217;t that hard. All you need is to master the AMF encoding, and the LocalConnection protocol, both of which have been done. Then, you connect both ends together, pass some nice data objects about test results back and forth, and when the tests are done, call flash.system.System.exit(0) to kill the Flash Player instance. <br/><br/>All of this could be done relatively easy through the use of an Ant task, making the tests completely automated. I prefer building my applications with Ant, since I can use Ant on any platform and at any time and get the same results. Making a project portable is what separates it from the pack. It&#8217;s easy to throw together a sloppy project that will only compile in a very specific configuration and setup, but with the right planning, you can have a nice project which builds in Ant, anywhere. <br/><br/>Anyway, I digress. Flex Unit 4 is <i>definitely </i>worth checking out. Go out there and start messing with it!Technorati Tags: <a rel='tag' href='http://technorati.com/tag/as3' class='performancingtags'>as3</a>, <a rel='tag' href='http://technorati.com/tag/flex' class='performancingtags'>flex</a>, <a rel='tag' href='http://technorati.com/tag/flash' class='performancingtags'>flash</a>, <a rel='tag' href='http://technorati.com/tag/unit%20testing' class='performancingtags'>unit testing</a>, <a rel='tag' href='http://technorati.com/tag/testing' class='performancingtags'>testing</a>, <a rel='tag' href='http://technorati.com/tag/ant' class='performancingtags'>ant</a><br/><br/>
<div class='zemanta-pixie'><img src='http://img.zemanta.com/pixy.gif?x-id=7ac3b166-4561-854d-b911-ab4a14d77aab' alt='' class='zemanta-pixie-img'/></div>
</div>



Share This:


	<a rel="nofollow"  href="http://blog.tkassembled.com/feed/" title="RSS"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=%5BAS3%5D%20Flex%20Unit%204%20-%20http%3A%2F%2Fblog.tkassembled.com%2F24%2F" title="Twitter"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.tkassembled.com%2F24%2F&amp;title=%5BAS3%5D%20Flex%20Unit%204&amp;notes=I%20just%20wired%20up%20the%20latest%20version%20of%20Flex%20Unit%204%20and%20it%20is%20impressive%20to%20say%20the%20least.%20For%20the%20last%20week%20or%20so%2C%20I%27ve%20been%20messing%20around%20with%20the%20version%20that%20ships%20with%20Flash%20Builder%204%2C%20but%20I%20wanted%20to%20get%20up%20with%20the%20latest%20because%20of%20all%20of%20the%20" title="del.icio.us"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F24%2F&amp;title=%5BAS3%5D%20Flex%20Unit%204" title="StumbleUpon"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.tkassembled.com%2F24%2F&amp;title=%5BAS3%5D%20Flex%20Unit%204&amp;bodytext=I%20just%20wired%20up%20the%20latest%20version%20of%20Flex%20Unit%204%20and%20it%20is%20impressive%20to%20say%20the%20least.%20For%20the%20last%20week%20or%20so%2C%20I%27ve%20been%20messing%20around%20with%20the%20version%20that%20ships%20with%20Flash%20Builder%204%2C%20but%20I%20wanted%20to%20get%20up%20with%20the%20latest%20because%20of%20all%20of%20the%20" title="Digg"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.tkassembled.com%2F24%2F&amp;t=%5BAS3%5D%20Flex%20Unit%204" title="Facebook"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fblog.tkassembled.com%2F24%2F" title="Technorati"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fblog.tkassembled.com%2F24%2F&amp;title=%5BAS3%5D%20Flex%20Unit%204" title="Reddit"><img src="http://blog.tkassembled.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>


<br/><br/>

<p><a href="http://feedads.g.doubleclick.net/~a/py7Jj7vw8VfAKTkvizhKGtkWst4/0/da"><img src="http://feedads.g.doubleclick.net/~a/py7Jj7vw8VfAKTkvizhKGtkWst4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/py7Jj7vw8VfAKTkvizhKGtkWst4/1/da"><img src="http://feedads.g.doubleclick.net/~a/py7Jj7vw8VfAKTkvizhKGtkWst4/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tkassembled/~4/QBJgDPRzQzs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.tkassembled.com/24/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.tkassembled.com/24/</feedburner:origLink></item>
	</channel>
</rss>
