<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Anselm Bradford</title>
	<atom:link href="http://blog.anselmbradford.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.anselmbradford.com</link>
	<description>wrangling the Internet's wildest</description>
	<lastBuildDate>Thu, 25 Feb 2010 19:08:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>February 2010 Auckland Web Meetup Recap</title>
		<link>http://blog.anselmbradford.com/2010/02/25/february-2010-auckland-web-meetup-recap/</link>
		<comments>http://blog.anselmbradford.com/2010/02/25/february-2010-auckland-web-meetup-recap/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 10:31:16 +0000</pubDate>
		<dc:creator>Ans</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=978</guid>
		<description><![CDATA[A new year. A new venue. A new format. Well, not completely true, it is a new year, but the February Auckland Web Meetup has met at the Vodafone NZ headquarters before and has tried the 20&#215;20 format before. But this was a new venue and new format for my experience with the group. Most [...]]]></description>
			<content:encoded><![CDATA[<p>A new year. A new venue. A new format. Well, not completely true, it is a new year, but the <a href="http://www.meetup.com/aucklandweb/calendar/11857261/?from=list&#038;offset=0" onclick="pageTracker._trackPageview('/outgoing/www.meetup.com/aucklandweb/calendar/11857261/?from=list_038_offset=0&amp;referer=');">February Auckland Web Meetup</a> has met at the Vodafone NZ headquarters before and has tried the 20&#215;20 format before. But this was a new venue and new format for my experience with the group. Most recently held in the smaller quarters of the <a href="http://www.mediadesign.school.nz" onclick="pageTracker._trackPageview('/outgoing/www.mediadesign.school.nz?referer=');">Media Design School</a>, the meetup was moved this month to the spacious conference hall in the vodafone headquarters, giving it the air of a conference instead of a meetup (complete with name badges, and, of course, free pizza and beer). </p>
<p>The format—20&#215;20—stood for 20 slides, 20 seconds per slide. Actually, 20&#215;20x13 would be even more descriptive, 13 being the number of presenters to grace the stage. What was covered? Here&#8217;s a brief recap by presenter:</p>
<ul>
<lI><strong><a href="http://twitter.com/regen" onclick="pageTracker._trackPageview('/outgoing/twitter.com/regen?referer=');">Daniel Too</a></strong> kicked off the night with a quick run-through of the <a href="http://gaiaflashframework.com" onclick="pageTracker._trackPageview('/outgoing/gaiaflashframework.com?referer=');">Gaia Framework</a> for Flash, authored by <a href="http://www.stevensacks.net" onclick="pageTracker._trackPageview('/outgoing/www.stevensacks.net?referer=');">Steven Sacks</a> (<em>Side note: I had the pleasure of seeing Steven present at <a href="http://blog.anselmbradford.com/2009/04/30/fitc-toronto-2009-recap/">FITC Toronto in 2009</a>, his presentation is available on Adobe TV—<a href="http://tv.adobe.com/watch/fitc/gaia-framework-for-adobe-flash/" onclick="pageTracker._trackPageview('/outgoing/tv.adobe.com/watch/fitc/gaia-framework-for-adobe-flash/?referer=');">view it here!</a></em>)</p>
<p>The Gaia Framework takes care of common Flash tasks such as implementing SWFObject, page transitions, bulk preloading, deep-linking, and memory management.
</li>
<li><strong><a href="http://kerihenare.com" onclick="pageTracker._trackPageview('/outgoing/kerihenare.com?referer=');">Keri Henare</a></strong>, CTO of <a href="http://pixelfusion.co.nz" onclick="pageTracker._trackPageview('/outgoing/pixelfusion.co.nz?referer=');">pixelfusion.co.nz</a>, showed another framework from another programming realm—the <a href="http://www.symfony-project.org" onclick="pageTracker._trackPageview('/outgoing/www.symfony-project.org?referer=');">Symfony</a> framework for PHP. Keri showed that Yahoo! is using Symfony and even New Zealand&#8217;s own <a href="http://eventfinder.co.nz" onclick="pageTracker._trackPageview('/outgoing/eventfinder.co.nz?referer=');">eventfinder</a> runs on the framework. He then ran through the reasons he likes Symfony, such as its code generation, community, and license. He finished up with a high-level run-through of its technical features, such as its dependency injection structure.</li>
<li><strong><a href="http://ben.geek.nz" onclick="pageTracker._trackPageview('/outgoing/ben.geek.nz?referer=');">Ben Gracewood</a></strong> changed the tone of the stage with a presentation sprinkled with random inspiration and RC airplanes, which culminated with the idea of taking something that&#8217;s purposeful and re-purposing it. He gave <a href="http://mugtug.com/sketchpad/" onclick="pageTracker._trackPageview('/outgoing/mugtug.com/sketchpad/?referer=');">SketchPad</a> as an example of using modern web development technology in a way that hadn&#8217;t been conceived of prior.</li>
<li><strong><a href="http://twitter.com/rowsell" onclick="pageTracker._trackPageview('/outgoing/twitter.com/rowsell?referer=');">Vaughan Rowsell</a></strong> promoted his MGRD method of getting things done, which stood for Motivation, Goal, Risk, Do it! (Right to the end). He used his recent 2300km bicycle ride from Stewart Island to Cape Reinga as a case study in its efficacy. His bicycle ride is documented on <a href="http://nzuphill.co.nz" onclick="pageTracker._trackPageview('/outgoing/nzuphill.co.nz?referer=');">nzuphill.co.nz</a>. He also mentioned that he is founder of <a href="http://vendHQ.com" onclick="pageTracker._trackPageview('/outgoing/vendHQ.com?referer=');">vendhq.com</a>, a retail management software webapp.</li>
<li><strong><a href="http://twitter.com/segdeha" onclick="pageTracker._trackPageview('/outgoing/twitter.com/segdeha?referer=');">Andrew Hedges</a></strong>, gave a noble presentation on open source software that saves lives, termed &#8220;Humanitarian Software.&#8221; He showcased <a href="http://instedd.org" onclick="pageTracker._trackPageview('/outgoing/instedd.org?referer=');">Innovative Support To Emergencies Diseases Disasters (InSTEDD)</a>, an organization that coordinates disaster relief through SMS technology. He pointed out that while 25% of the world&#8217;s population may be online, 60% have cell phones, making SMS a farther reaching technology. Most recently InSTEDD went to Haiti to help with disaster relief using software they had only just finished developing in December 2009. Andrew also pointed out the twitter account of <a href="http://twitter.com/edjez" onclick="pageTracker._trackPageview('/outgoing/twitter.com/edjez?referer=');">Eduardo Jezierski</a>, director of technology at InSTEDD.</li>
<li><strong><a href="http://twitter.com/rushdigital" onclick="pageTracker._trackPageview('/outgoing/twitter.com/rushdigital?referer=');">Danushka Abeysuriya</a></strong> of <a href="http://www.rushdigital.co.nz" onclick="pageTracker._trackPageview('/outgoing/www.rushdigital.co.nz?referer=');">Rush Digital Interactive</a> emphasized the rapid progression of technology, evinced today by the rapid development in the capabilities and appearance of mobile phone software. He likened the time to go from the first 3D PC computer games to modern immersive games was 20 years, while the same development progression has happened in 2 years on mobile phones, due to the fact that many of the lessons learned developing PC games can be transferred over to mobile development. For 3D mobile development <a href="http://www.khronos.org/opengles/" onclick="pageTracker._trackPageview('/outgoing/www.khronos.org/opengles/?referer=');">OpenGL ES 2.0</a> was mentioned. He also made many predictions for the direction of mobile phone technology, such as double-sided phones, integration with cloud computing, built-in projectors and stereoscopic displays. Lastly he showcased his own 3D engine he&#8217;s developing for iPhone and Android OS.</li>
<li><strong>Rowan Wernham</strong> gave some tips for getting a social media idea off the ground. He used his own project, <a href="http://sna.pr" onclick="pageTracker._trackPageview('/outgoing/sna.pr?referer=');">sna.pr</a> as an example (some kind of mapping web app—I&#8217;m not sure?). He also gave resources for start-ups such as the <a href="http://sxsw.com/interactive/accelerator" onclick="pageTracker._trackPageview('/outgoing/sxsw.com/interactive/accelerator?referer=');">Microsoft BizSpark Accelerator at SXSW</a>, <a href="http://crunchbase.com" onclick="pageTracker._trackPageview('/outgoing/crunchbase.com?referer=');">crunchbase.com</a>, and <a href="http://compete.com" onclick="pageTracker._trackPageview('/outgoing/compete.com?referer=');">compete.com</a>.</li>
<li><strong><a href="http://twitter.com/sponno" onclick="pageTracker._trackPageview('/outgoing/twitter.com/sponno?referer=');">John Ballinger</a></strong>, meetup organizer, presenting a fast-paced presentation on &#8220;The Rule of Three,&#8221; a small guide to making better software. The points are as follows:
<ul>
<li>Test, test, test</li>
<li>If, if, if &#8211; if there are three if statements in a row, something is wrong!</li>
<li>Frown upon multi-dimensional arrays, such as catz[x][y][z], they are slow and hard to update.</li>
<li>Break code up and keep each chunk short; under 300 lines.</li>
<li>Use one-line conditional statements, in the format of x=(i.Cat)?1:0. (<em>Personally I think this is only good for very short conditionals, as it is arguably less readable.</em>)</li>
<li>Use <a href="http://en.wikipedia.org/wiki/Guard_statements" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Guard_statements?referer=');">guard statements</a></li>
<li>Utilize OR booleans in conditionals (<em>Note: I may have misunderstood this slide!</em>)</li>
<li>Debugging is twice as difficult as the code, if the debugging is too difficult, the code is too difficult.</li>
<li>Write expressive function names.</li>
<li>Learn <a href="http://en.wikipedia.org/wiki/Regular_expression" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Regular_expression?referer=');">regex</a>.</li>
<li>Comment your code.</li>
<li>XML &#8211; not your friend, use <a href="http://en.wikipedia.org/wiki/Property_list" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Property_list?referer=');">plists</a> or (if using Flash) <a href="http://en.wikipedia.org/wiki/Action_Message_Format" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Action_Message_Format?referer=');">AMF</a>.</li>
<li>Question everything. If something isn&#8217;t working, it may not be the code. Look at the process.</li>
<li>Utilize your file system, you don&#8217;t need to store everything in a database.</li>
<li>Debug by talking. By explaining a programming issue, if can often be easier to solve.</li>
<li>Avoid premature optimization.</li>
<li>Refactor early.</li>
<li>Exercise (as in physical). Get it!</li>
<li>Always code as if the guy maintaining your code is a violent psychopath who knows where you live.</li>
</ul>
</li>
<li><strong>Lisa Phillips</strong> presented on multi-tasking. She emphasized that web development is inherently working in an environment with lots of distractions. If procrastination becomes a problem, it&#8217;s important to figure out why you&#8217;re procrastinating. If it&#8217;s because you don&#8217;t know what&#8217;s next you&#8217;re in trouble.
<p>She gave &#8220;Lisa&#8217;s Pick &#038; Mix&#8221;:</p>
<ul>
<li>Establish priorities.</li>
<li>Make lists (hand-written, and make post-its readily accessible in your environment).</li>
<li>Know what you&#8217;re doing.</li>
<li>Plan.</li>
<li>Revise your plan.</li>
</ul>
<p>For task management, Lisa mentioned <a href="http://en.wikipedia.org/wiki/Getting_Things_Done" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Getting_Things_Done?referer=');">Getting Things Done</a>, <a href="http://en.wikipedia.org/wiki/Pomodoro_Technique" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Pomodoro_Technique?referer=');">The Pomodoro Technique, <a href="http://inboxzero.com/" onclick="pageTracker._trackPageview('/outgoing/inboxzero.com/?referer=');">Inbox Zero</a>, and <a href="http://www.rememberthemilk.com" onclick="pageTracker._trackPageview('/outgoing/www.rememberthemilk.com?referer=');">Remember the Milk</a>. Lastly she mentioned that the Apple App Store has a whole category on Productivity and that you should &#8220;find out what works for you.&#8221;
</li>
<li><strong><a href="http://twitter.com/wrumsby" onclick="pageTracker._trackPageview('/outgoing/twitter.com/wrumsby?referer=');">Walter Rumsby</a></strong>, who emphasized that he&#8217;s just a &#8220;guy who works at <a href="http://twitter.com/OrionHealth" onclick="pageTracker._trackPageview('/outgoing/twitter.com/OrionHealth?referer=');">Orion Health</a>&#8221; and does not speak for them presented all his slides as twitter tweets, creative! He introduced that he works on software for hospital records and then gave a smattering of web development tips, such as that web standards are not about making your website work with a 10 year-old browser, but making your 10 year-old website work on a browser today.</li>
<li><strong>Dr. Carey Stevens</strong>, of <a href="https://www.spark-dental.com" onclick="pageTracker._trackPageview('/outgoing/www.spark-dental.com?referer=');">Spark Dental Technology</a>, showcased his company&#8217;s use and work on the FireFox add-on <a href="https://addons.mozilla.org/en-US/firefox/addon/5764" onclick="pageTracker._trackPageview('/outgoing/addons.mozilla.org/en-US/firefox/addon/5764?referer=');">Zinc</a> for online dental imagery. He then listed some tips for having a good development environment, such as using Continuous Integrated Testing, <a href="https://developer.mozilla.org/en/Mochitest" onclick="pageTracker._trackPageview('/outgoing/developer.mozilla.org/en/Mochitest?referer=');">Mochitest</a>, and <a href="http://buildbot.net" onclick="pageTracker._trackPageview('/outgoing/buildbot.net?referer=');">Buildbot</a>. <a href="http://plone.org" onclick="pageTracker._trackPageview('/outgoing/plone.org?referer=');">Plone CMS</a> was also mentioned.</li>
<li><strong>Tristan Phipps</strong> presented on fear. Specifically &#8220;Fear Killing Creativity.&#8221; His tips for tackling creative decisions under fear (of failure, etc.) are:
<ul>
<li>Break your behavioral coping mechanism patterns, and build new ones through repetition.</li>
<li>Make radical changes.</li>
<li>Face your fears (for a dopamine hit when you conquer them!).</li>
<li>Take time out every day.</li>
<li>Learn something every day and find a mentor.</li>
</ul>
</li>
<li><strong><a href="http://twitter.com/lowerdepths" onclick="pageTracker._trackPageview('/outgoing/twitter.com/lowerdepths?referer=');">Dave George</a></strong>, of <a href="http://serato.com" onclick="pageTracker._trackPageview('/outgoing/serato.com?referer=');">Serato Audio Research</a> (a firm dealing with software for DJ&#8217;s and musicians) presented the following problem when presenting a user with a selection they&#8217;ve already encountered: &#8220;we waste their time showing them the same stuff again.&#8221;
<p>Using <a href="http://whitelabel.net" onclick="pageTracker._trackPageview('/outgoing/whitelabel.net?referer=');">whitelabel.net</a>—a website his company runs for Pro DJ&#8217;s—as an example, Dave summed his presentation up at the end with three points: We are all busy, so&#8230; Listen to their (your users) decisions and focus [them] on new decisions.
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.anselmbradford.com/2010/02/25/february-2010-auckland-web-meetup-recap/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>October 2009 List of Useful Drupal Modules</title>
		<link>http://blog.anselmbradford.com/2009/10/22/october-2009-list-of-useful-drupal-modules/</link>
		<comments>http://blog.anselmbradford.com/2009/10/22/october-2009-list-of-useful-drupal-modules/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 13:00:21 +0000</pubDate>
		<dc:creator>Ans</dc:creator>
				<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=972</guid>
		<description><![CDATA[This is a wonderful list of useful Drupal modules compiled by Lee-Yan Marquez (argentofchange.com) from the discussion in last week&#8217;s Auckland Drupal Meetup group:
Content Management
date
The date module is a flexible date/time field type for the CCK content module.
Content Aggregation &#38; Distribution
feedapi
FeedAPI aggregates feeds on a Drupal website by generating light weight items or nodes from [...]]]></description>
			<content:encoded><![CDATA[<p>This is a wonderful list of useful Drupal modules compiled by Lee-Yan Marquez (<a href="http://www.argentofchange.com" onclick="pageTracker._trackPageview('/outgoing/www.argentofchange.com?referer=');">argentofchange.com</a>) from the discussion in last week&#8217;s <a href="http://www.meetup.com/drupalnz/" onclick="pageTracker._trackPageview('/outgoing/www.meetup.com/drupalnz/?referer=');">Auckland Drupal Meetup</a> group:</p>
<p><strong>Content Management</strong></p>
<blockquote><p><a href="http://drupal.org/project/date" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/date?referer=');">date</a><br />
The date module is a flexible date/time field type for the <a href="http://drupal.org/project/cck" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/cck?referer=');">CCK</a> content module.</p></blockquote>
<p><strong>Content Aggregation &amp; Distribution</strong></p>
<blockquote><p><a href="http://drupal.org/project/feedapi" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/feedapi?referer=');">feedapi</a><br />
FeedAPI aggregates feeds on a Drupal website by generating light weight items or nodes from feeds. It provides a straightforward configuration for most use cases and is extensible through an API. FeedAPI integrates with <a href="http://drupal.org/project/og" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/og?referer=');">OG</a> (but does not require it).</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/tattler" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/tattler?referer=');">tattler</a><br />
Tattler (app) is a Drupal Distribution, an open source topic monitoring tool for today&#8217;s Web. Tattler finds and aggregates content from the Web on topics you ask it to monitor. Using semantic Web technologies, Tattler mines news, websites, blogs, multimedia sites, and other social media like Twitter, to find mentions of the issues most relevant to your organization.</p></blockquote>
<p><strong>Content Relationships</strong></p>
<blockquote><p><a href="http://drupal.org/project/context" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/context?referer=');">context</a><br />
Context allows you to manage contexts for different portions of your site. You can think of each context as representing a &#8220;section&#8221; of your site. For each context, you can choose the conditions that trigger the context to be active and choose different aspects of Drupal that should react to this active context.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/flag" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/flag?referer=');">flag</a><br />
Flag is a flexible flagging system that is completely customizable by the administrator. Using this module, the site administrator can provide any number of flags for nodes, comments, or users. Some possibilities include bookmarks, marking important, friends, or flag as offensive. With extensive views integration, you can create custom lists of popular content or keep tabs on important content.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/location" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/location?referer=');">location</a><br />
The location module allows real-world geographic locations to be associated with Drupal nodes, including people, places, and other content. The location module allows admins to collect addresses, geocode them (translate addresses to latitude/longitude), and associate locations with Drupal nodes and users. Location data is automatically used to generate GeoRSS within your existing RSS feeds. Location also provides an API so that other modules may take advantage of its address storage and geocoding features.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/nodereference_autocreate" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/nodereference_autocreate?referer=');">node reference auto-create</a> (drupal 6 dev version only)<br />
Provides an additional <a href="http://drupal.org/project/cck" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/cck?referer=');">CCK</a> widget type for the base field node reference. The auto-create widget type provides a text-field for input of the node title like standard node reference fields, but instead of linking to existing nodes it creates a node with the specified title on save. When the title is changed during subsequent node saves the referenced node title is changed as well.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/nodereference_field" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/nodereference_field?referer=');">node reference field</a> (drupal 6 dev version only)<br />
Allows fields on the node referenced by a <a href="http://drupal.org/project/nodereference_autocreate" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/nodereference_autocreate?referer=');">node reference auto-create</a> field to be viewed and edited. In other words a node reference is created to a particular node which has additional <a href="http://drupal.org/project/cck" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/cck?referer=');">CCK</a> fields. The additional fields can also be edited along side the node title provided by node reference.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/spaces" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/spaces?referer=');">spaces</a><br />
Spaces allows features (a blog, calendar, casetracker, shoutbox, gallery, etc.) to be enabled and customized in different configurations in different spaces.</p></blockquote>
<p><strong>E-Commerce</strong></p>
<blockquote><p><a href="http://drupal.org/project/ubercart" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/ubercart?referer=');">ubercart</a><br />
An e-commerce suite developed for Drupal.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/uc_paymentexpress" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/uc_paymentexpress?referer=');">Ubercart Payment Express (DPS PXAccess and PXPost)</a> (in development)<br />
Payment processor implementation for DPS (Direct Payment Solutions) Payment Express payment gateway.</p></blockquote>
<p><strong>Filters</strong></p>
<blockquote><p><a href="http://drupal.org/project/better_formats" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/better_formats?referer=');">better formats</a><br />
Better formats is a module to add more flexibility to Drupal&#8217;s core input format system.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/htmlpurifier" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/htmlpurifier?referer=');">html purifier</a><br />
<a href="http://htmlpurifier.org/" onclick="pageTracker._trackPageview('/outgoing/htmlpurifier.org/?referer=');">HTML Purifier</a> is a standards-compliant HTML filter library. HTML Purifier will not only remove all malicious code (better known as XSS) with a thoroughly audited, secure yet permissive whitelist, it will also make sure your documents are standards compliant, something only achievable with a comprehensive knowledge of W3C&#8217;s specifications.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/flexifilter" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/flexifilter?referer=');">flexifilter</a><br />
Flexifilter is a module that allows non-admins to create their own, configurable custom filters. It is not limited to simple text replacement or regex replacement; it includes logic such as if() and while() statements, and is easily extendable by other modules.</p></blockquote>
<p><strong>Image Processing</strong></p>
<blockquote><p><a href="http://drupal.org/project/imagecache" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/imagecache?referer=');">imagecache</a><br />
ImageCache allows you to setup presets for image processing.</p></blockquote>
<p><strong>Package and Deploy</strong></p>
<blockquote><p><a href="http://drupal.org/project/deploy" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/deploy?referer=');">deployment</a> (drupal 6 dev version only)<br />
The deployment framework is a series of modules which are designed to allow developers to easily stage Drupal data from one site to another. This includes content (nodes, taxonomy, users, etc) as well as configuration (views, content types, system settings, etc.).</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/drush" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/drush?referer=');">drush</a><br />
A command line shell and Unix scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt. </p></blockquote>
<blockquote><p><a href="http://drupal.org/project/features" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/features?referer=');">features</a><br />
Features provides a UI and API for taking different site building components from modules with exportables and bundling them together in a single feature module.</p></blockquote>
<blockquote><p>legacy (drupal 5 core module)<br />
The legacy module provides legacy handlers for upgrades from older installations. These handlers help automatically redirect references to pages from old installations and prevent page not found errors for your site.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/node_import" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/node_import?referer=');">node import</a> (some limitations)<br />
Allows you to import a set of nodes from a Comma Seperated Values (CSV) or Tab Seperated Values (TSV) text file.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/tw" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/tw?referer=');">table wizard</a><br />
The Table Wizard facilitates dealing with database tables: </p>
<ul>
<li>It allows surfacing any table in the Drupal default database through <a href="http://drupal.org/project/views" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/views?referer=');">Views 2</a>. </li>
<li>Relationships between the tables it manages can be defined, so views combining data in the tables can be constructed. </li>
<li>It performs analysis of the tables it manages, reporting on empty fields, data ranges, ranges of string lengths, etc. </li>
<li>It provides an API for other modules to views-enable their tables. </li>
<li>It provides an API for importing data into tables in the Drupal default database (automatically doing the views integration above). </li>
<li>It is bundled with an implementation of this API, for importing comma- and tab-delimited files.</li>
</ul>
</blockquote>
<p><strong>Paths &amp; Navigation</strong></p>
<blockquote><p><a href="http://drupal.org/project/admin_menu" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/admin_menu?referer=');">admin menu</a><br />
Administration menu module provides a theme-independent administration interface (a navigation menu for the admin side of a site). It&#8217;s a helper for novice Drupal users coming from another CMS, a real time-saver for Drupal site administrators, and definitely a must for Drupal developers and site builders (also includes integration with <a href="http://drupal.org/project/devel" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/devel?referer=');">Devel</a> ).</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/menu_block" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/menu_block?referer=');">menu block</a><br />
Provides configurable blocks of menu trees starting with any level of any menu.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/menutrails" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/menutrails?referer=');">menu trails</a><br />
This module adds some common-sense usability to Drupal&#8217;s menu system </p>
<ul>
<li>Menu Trails implements primary/secondary links which keep the current menu trail &#8220;active&#8221; or highlighted. A handy snippet ready to go into your template.php is included. </p>
<li>The module provides a means of broadly categorizing nodes (by type or taxonomy) as falling &#8220;under&#8221; a known menu item. These nodes are not added to the menu tree (keeping the menu admin system sane) but they will trigger the functionality above &#8212; preserving navigation state for the user &#8212; when viewed.</li>
</ul>
</blockquote>
<blockquote><p><a href="http://drupal.org/project/pathauto" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/pathauto?referer=');">pathauto</a><br />
Automatically generates path aliases for various kinds of content (nodes, categories, users) without requiring the user to manually specify the path alias. This allows you to get aliases like /category/my-node-title.html instead of /node/123. The aliases are based upon a &#8220;pattern&#8221; system which the administrator can control. </p></blockquote>
<p><strong>Performance</strong></p>
<blockquote><p><a href="http://drupal.org/project/varnish" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/varnish?referer=');">varnish</a> (Drupal 7 only)<br />
This module provides integration between your Drupal site and the <a href="http://varnish.projects.linpro.no/" onclick="pageTracker._trackPageview('/outgoing/varnish.projects.linpro.no/?referer=');">Varnish HTTP Accelerator</a>, an advanced and very fast reverse-proxy system. Basically, Varnish handles serving static files and anonymous pageviews for your site much faster than any webserver. </p></blockquote>
<p><strong>Security</strong></p>
<blockquote><p><a href="http://drupal.org/project/mollom" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/mollom?referer=');">mollom</a><br />
Mollom provides a one stop solution for all spam problems and can protect the following Drupal forms. It offers and intelligently combines: </p>
<ul>
<li>CAPTCHAs &#8212; both image and audio CAPTCHAs. </li>
<li>text analysis. </li>
<li>user reputations. </li>
</ul>
<p>and can:</p>
<ul>
<li>block comment form spam. </li>
<li>block contact form spam. </li>
<li>protect the user registration form against fake user accounts. </li>
<li>protect the password request form. </li>
<li>block spam on any node form, such as forum topics, articles, stories, pages, and more. </li>
</ul>
</blockquote>
<p><strong>Site Stats</strong></p>
<blockquote><p><a href="http://drupal.org/project/google_analytics" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/google_analytics?referer=');">google analytics</a><br />
Adds the Google Analytics web statistics tracking system to your website.<br />
The module allows you to add the following statistics features to your site: </p>
<ul>
<li>Selectively track certain users, roles and pages.</li>
<li>Monitor what type of links are tracked (downloads, outgoing and mailto).</li>
<li>Monitor what files are downloaded from your pages.</li>
<li>Cache the Google Analytics code on your local server for improved page loading times.</li>
<li>Track user segmentation from Drupal profile data.</li>
<li>Site Search support.</li>
<li>AdSense support.</li>
</ul>
</blockquote>
<p><strong>UI</strong></p>
<blockquote><p><a href="http://drupal.org/project/flot" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/flot?referer=');">flot</a><br />
This module provides an API for using the flot graphing library. It is designed to make it simple for developers to add flot graphs to their modules or applications.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/jquery_media" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/jquery_media?referer=');">jquery media</a><br />
The jQuery Media plugin will automatically turn links to media into their embedded media equivalents. The module works best in conjuction with the <a href="http://drupal.org/project/filefield" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/filefield?referer=');">File Field</a> module, but may be used in other cases as well.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/jquery_ui" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/jquery_ui?referer=');">jquery ui</a><br />
A wrapper module around the <a href="http://jqueryui.com/" onclick="pageTracker._trackPageview('/outgoing/jqueryui.com/?referer=');">jQuery UI</a> effects library that lets module developers add swooshy, swishy effects to their code.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/slider" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/slider?referer=');">slider</a><br />
Slider module creates an effect called the &#8220;Coda slider&#8221;, which was made famous by the site: <a href="http://www.panic.com/coda/" onclick="pageTracker._trackPageview('/outgoing/www.panic.com/coda/?referer=');">http://www.panic.com/coda/</a>.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/thickbox" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/thickbox?referer=');">thickbox</a><br />
ThickBox is a webpage UI dialog widget written in JavaScript on top of the <a href="http://jquery.com" onclick="pageTracker._trackPageview('/outgoing/jquery.com?referer=');">jQuery</a> library. Its function is to show a single image, multiple images, inline content, iframed content, or content served through AJAX in a hybrid modal.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/vertical_tabs" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/vertical_tabs?referer=');">vertical tabs</a><br />
Provides vertical tabs like <a href="http://drupal.geek.nz/static/node-form/default/summaries2.html" onclick="pageTracker._trackPageview('/outgoing/drupal.geek.nz/static/node-form/default/summaries2.html?referer=');">http://drupal.geek.nz/static/node-form/default/summaries2.html</a> on the node add form.</p></blockquote>
<p><strong>User Management</strong></p>
<blockquote><p><a href="http://drupal.org/project/nodeprofile" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/nodeprofile?referer=');">node profile</a><br />
This module builds user profiles as nodes, which opens the opportunity to use the <a href="http://drupal.org/project/cck" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/cck?referer=');">Content Construction Kit (CCK)</a>, since it&#8217;s possible to make use of the field types, which are available for CCK. The integration of the views module allows one to easily build customizable user listings or even user searches.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/userpoints" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/userpoints?referer=');">user points</a><br />
This module provides an API for users to gain or lose points for performing certain actions on your site.<br />
In conjunction with other modules, such as the <a href="http://drupal.org/project/userpoints_nc" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/userpoints_nc?referer=');">userpoints nodes and comments</a> users can accumulate points for actions such as posting nodes, commenting or moderation duties.</p></blockquote>
<p><strong><a href="http://drupal.org/project/views" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/views?referer=');">Views</a></strong></p>
<blockquote><p><a href="http://drupal.org/project/views_bulk_operations" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/views_bulk_operations?referer=');">views bulk operations</a><br />
This module augments Views by allowing bulk operations to be executed on the nodes displayed by a view. It does so by showing a checkbox in front of each node, and adding a select box containing operations that can be applied on the selected nodes.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/calendar" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/calendar?referer=');">calendar</a><br />
This module will display any Views date field in calendar formats, including CCK date fields, node created or updated dates, etc. Switch between year, month, and day views. Back and next navigation is provided for all views.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/draggableviews" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/draggableviews?referer=');">draggable views</a><br />
DraggableViews makes rows of a view &#8220;draggable&#8221; which means that they can be rearranged by Drag&#8217;n'Drop. This module makes it possible to organize complex structures with just a few clicks.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/views_showcase" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/views_showcase?referer=');">views showcase</a><br />
This module integrates with Views module, so you can use any content type and fields to be displayed as Showcase. In this first release Views Showcase provides 3 slots where you can put an image, a title and a teaser. The fields are provided by Views module, so you can virtually put any field in these 3 slots. In future versions more slots will be provided.</p></blockquote>
<blockquote><p><a href="http://drupal.org/project/views_slideshow_imageflow" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/views_slideshow_imageflow?referer=');">views imageflow</a><br />
This solution is known as the Cover Flow technique, which has been developed by the artist Andrew Coulter Enright. Now &#8211; since being acquired by Apple &#8211; it is used in iTunes and the file browser of Apples OSX.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.anselmbradford.com/2009/10/22/october-2009-list-of-useful-drupal-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auckland September Web Meetup Recap</title>
		<link>http://blog.anselmbradford.com/2009/09/17/auckland-september-web-meetup-recap/</link>
		<comments>http://blog.anselmbradford.com/2009/09/17/auckland-september-web-meetup-recap/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 15:06:49 +0000</pubDate>
		<dc:creator>Ans</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=953</guid>
		<description><![CDATA[I just attended the September Auckland Web Meetup, which had a full house of 200, free beer and pizza, and interesting presentations on the direction of web browsers. 
To kick things off Microsoft technical evangelist Giorgio Sardo introduced IE8, which looks to be the most standards compliant browser from MS yet. Giorgio emphasized the large [...]]]></description>
			<content:encoded><![CDATA[<p>I just attended the September <a href="http://www.meetup.com/aucklandweb/" onclick="pageTracker._trackPageview('/outgoing/www.meetup.com/aucklandweb/?referer=');">Auckland Web Meetup</a>, which had a full house of 200, free beer and pizza, and interesting presentations on the direction of web browsers. </p>
<p>To kick things off Microsoft technical evangelist <a href="http://blogs.msdn.com/giorgio/" onclick="pageTracker._trackPageview('/outgoing/blogs.msdn.com/giorgio/?referer=');">Giorgio Sardo</a> introduced IE8, which looks to be the most standards compliant browser from MS yet. Giorgio emphasized the large number of <a href="http://samples.msdn.microsoft.com/ietestcenter/" onclick="pageTracker._trackPageview('/outgoing/samples.msdn.microsoft.com/ietestcenter/?referer=');">test cases</a> IE8 has undergone. Giorgio showed some scripting and JSON encoding/decoding in IE8. He then went on to demo a cross-browser comparison tool, <a href="http://expression.microsoft.com/en-us/dd819431.aspx" onclick="pageTracker._trackPageview('/outgoing/expression.microsoft.com/en-us/dd819431.aspx?referer=');">SuperPreview</a>, which can be run as a stand-alone app or as part of Expression Web 3. A free version to compare the different versions of Internet Explorer is <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=8e6ac106-525d-45d0-84db-dccff3fae677&#038;displaylang=en" onclick="pageTracker._trackPageview('/outgoing/www.microsoft.com/downloads/details.aspx?FamilyID=8e6ac106-525d-45d0-84db-dccff3fae677_038_displaylang=en&amp;referer=');">available here</a>. The paid version includes other browsers in the comparison beyond Internet Explorer. </p>
<p>After pizza and drinks, <a href="http://weblogs.mozillazine.org/roc/" onclick="pageTracker._trackPageview('/outgoing/weblogs.mozillazine.org/roc/?referer=');">Robert O&#8217;Callahan</a> and the Mozilla team showed some of the upcoming features of Firefox. Some highlights included:</p>
<ul>
<li><strong><a href="http://mozillalinks.org/wp/2009/08/firefox-supports-accelerometers/" onclick="pageTracker._trackPageview('/outgoing/mozillalinks.org/wp/2009/08/firefox-supports-accelerometers/?referer=');">Support for accelerometers</a></strong> &#8211; with the necessary hardware the browser can recognize the tilt and orientation of the viewing device.</li>
<li><strong><a href="https://wiki.mozilla.org/DOMWorkerThreads" onclick="pageTracker._trackPageview('/outgoing/wiki.mozilla.org/DOMWorkerThreads?referer=');">WebWorkers</a></strong> &#8211; An API for asynchronous JavaScript threaded processes (multiple processes running at the same time). Quite interesting!</li>
<li><strong>Drag and Drop</strong>, between browser windows, and from the desktop.</li>
<li><strong>2D drawing</strong> using the <a href="http://en.wikipedia.org/wiki/Canvas_tag" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Canvas_tag?referer=');">Canvas tag</a> &#8211; A simple vector example with apparent rigid body dynamics was shown.</li>
<li><strong>3D rendering</strong> using <a href="http://sourceforge.net/projects/webgl/" onclick="pageTracker._trackPageview('/outgoing/sourceforge.net/projects/webgl/?referer=');">WebGL</a> &#8211; This was the classic &#8220;3D teapot&#8221; demo, and I was quite impressed since performance seemed very good in the example.</li>
<li><strong>Video tag</strong> &#8211; A variety of video scenarios were shown, such as a plain video tag with the browser&#8217;s built-in controls (for play, etc.), one that used JavaScript/CSS to overlay subtitles on the video, and some impressive examples that introduced an image into a green-screened video using just the browser. Also shown was overlaying and manipulating pictures, video, text, and Canvas elements on top of a video that had two reference points, a sort of augmented reality demo. This reminded me a lot of what can be done with BitmapData in ActionScript. A final demo on motion tracking was too cutting edge and crashed the browser.</li>
<li><strong><a href="https://developer.mozilla.org/en/DOM/Storage" onclick="pageTracker._trackPageview('/outgoing/developer.mozilla.org/en/DOM/Storage?referer=');">DOM storage</a></strong> &#8211; an better alternative to cookies for local storage.</li>
<li><strong>Client-side database storage</strong> &#8211; Robert cautioned that this may be a bit in the future yet, but the idea is to have a database on the client that can be used for storage, with the potential to have web applications that when offline work better than previously possible.</li>
<li><strong><a href="http://www.mozilla.com/en-US/firefox/geolocation/" onclick="pageTracker._trackPageview('/outgoing/www.mozilla.com/en-US/firefox/geolocation/?referer=');">Geolocation</a></strong> &#8211; Allows the browser to notify websites where you are located.</li>
</ul>
<p>It was all very interesting. I wouldn&#8217;t say I saw anything terribly innovative in its own right, since overall these are technologies that currently or will shortly exist through other means (such as Flash, AIR, Silverlight, etc.), but to see these built directly in a browser is interesting and may open these tools up to a wider field of developers.</p>
<p><strong>UPDATE October 4, 2009:</strong> I forgot to mention Geolocation, it&#8217;s been added.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anselmbradford.com/2009/09/17/auckland-september-web-meetup-recap/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>This isn&#8217;t right&#8230; MovieClip nested inside Button throwing null object reference error in Flash CS4</title>
		<link>http://blog.anselmbradford.com/2009/09/10/this-isnt-right-movieclip-nested-inside-button-throwing-null-object-reference-error-in-flash-cs4/</link>
		<comments>http://blog.anselmbradford.com/2009/09/10/this-isnt-right-movieclip-nested-inside-button-throwing-null-object-reference-error-in-flash-cs4/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 12:02:21 +0000</pubDate>
		<dc:creator>Ans</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=933</guid>
		<description><![CDATA[A great thing about teaching is that your students approach problems in ways you haven&#8217;t done before and run into problems that you never knew existed. This is one such problem in Flash CS4 and a curious one at that.
THE PROBLEM: A Button symbol is placed on the Stage on a frame other than the [...]]]></description>
			<content:encoded><![CDATA[<p>A great thing about teaching is that your students approach problems in ways you haven&#8217;t done before and run into problems that you never knew existed. This is one such problem in Flash CS4 and a curious one at that.</p>
<p><strong>THE PROBLEM:</strong> A Button symbol is placed on the Stage on a frame other than the first frame and given an instance name in the Properties panel. In the Actions panel, ActionScript is added that references the instance name of the button on the same frame that the button instance first appears on. The movie is tested and the following error occurs:<br />
<code><br />
TypeError: Error #1009: Cannot access a property or method of a null object reference.<br />
at MovieClipInsideButton_fla::MainTimeline/frame2()<br />
</code></p>
<p>Normally this error means that a particular instance has not been given an instance name in the Properties panel on the frame where the ActionScript appears. However, nothing looks amiss in the ActionScript or on the Stage. Adding a trace statement, such as <code>trace(myButton);</code> reveals <code>null</code> in the output window, meaning the trace statement has run before the instance name has been set to the button instance on the Stage. Hmm&#8230; very perplexing, since you may have other buttons and movieclips that work fine when referenced from ActionScript.</p>
<p><strong>THE SOLUTION:</strong> From what I found, one scenario will produce this error. If a MovieClip symbol (instance) appears inside a Button symbol and the button appears on any frame other than the first frame, and the frame where the ActionScript references it is the same frame it first appears on—then this behavior will result.</p>
<p><img class="aligncenter size-full wp-image-935" title="MC_inside_button" src="http://blog.anselmbradford.com/wp-content/uploads/2009/09/MC_inside_button.png" alt="MC_inside_button" width="569" height="267" /></p>
<p>There are a few workarounds:</p>
<ol>
<li><strong>Retrieve the instance from the display list of its parent.</strong> Instead of referencing the Button instance on the stage directly, use <code>getChildByName(.)</code> to retrieve a reference to the instance, this can even be set to instance name at the beginning of your timeline code, like so:

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// myButton is the name of the instance as set in the Properties panel.</span>
<span style="color: #808080; font-style: italic;">// Retrieved child is cast as a SimpleButton, since this is the </span>
<span style="color: #808080; font-style: italic;">// class of the Button symbol</span>
myButton = SimpleButton<span style="color: #66cc66;">&#40;</span>getChildByName<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;myButton&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

</li>
<li><strong>Do not nest a MovieClip inside a Button symbol.</strong> A Button nested inside a Button, a MovieClip nested inside a MovieClip, and a Button nested inside a MovieClip work fine.</li>
<li><strong>Place the first occurance of the Button instance on any frame before the frame where ActionScript first references it.</strong> This behavior appears to indicate Flash is taking too long to parse over the MovieClip inside a Button and runs the ActionScript on the timeline prematurely. Having the instance appear on a frame prior to the frame the ActionScript appears on ensures the instance is completely present in memory before it is referenced.</li>
<li><strong>Place the instance referencing code inside an enter frame event handler function.</strong> To ensure the entire frame has been parsed before any ActionScript code is run, enclose the offending code inside the event handler function of the enter frame event, and only make it run once, like so:

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">addEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span> , ensureRendered <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> ensureRendered<span style="color: #66cc66;">&#40;</span> evt:Event <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	removeEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span> , ensureRendered <span style="color: #66cc66;">&#41;</span>;
	<span style="color: #808080; font-style: italic;">// All instance referencing code appears below this point</span>
	<span style="color: #808080; font-style: italic;">// In this case, instance is named &quot;myButton&quot; on the Stage</span>
	myButton.<span style="color: #0066CC;">width</span> = <span style="color: #cc66cc;">200</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

</li>
</ol>
<p>This behavior doesn&#8217;t seem right to me and even seems it could be a bug. If anyone has an explanation for this behavior, I would love to hear it. You may download an example FLA here: <a href='/wp-content/uploads/2009/09/movieclipinsidebutton.zip'>Download Source</a></p>
<p><strong>UPDATE September 20, 2009:</strong> I added a new workaround, which is probably the most succinct and reliable one yet to use. See <em>Retrieve the instance from the display list of its parent</em> in the list of workarounds.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anselmbradford.com/2009/09/10/this-isnt-right-movieclip-nested-inside-button-throwing-null-object-reference-error-in-flash-cs4/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>How to add a webpage fade-in effect using JQuery</title>
		<link>http://blog.anselmbradford.com/2009/08/28/how-to-add-a-simple-webpage-fade-in-effect-using-jquery/</link>
		<comments>http://blog.anselmbradford.com/2009/08/28/how-to-add-a-simple-webpage-fade-in-effect-using-jquery/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 15:19:11 +0000</pubDate>
		<dc:creator>Ans</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=924</guid>
		<description><![CDATA[THE PROBLEM: HTML pages that have numerous and complex nested &#60;div&#62; tags and CSS can sometimes have a jumbled &#8220;assembling&#8221; appearance that happens as the page is loading and the various elements are being rendered by the browser. The appearance of this process can look quite unrefined and detract from professional appearance of the site.
A [...]]]></description>
			<content:encoded><![CDATA[<p><strong>THE PROBLEM:</strong> HTML pages that have numerous and complex nested &lt;div&gt; tags and CSS can sometimes have a jumbled &#8220;assembling&#8221; appearance that happens as the page is loading and the various elements are being rendered by the browser. The appearance of this process can look quite unrefined and detract from professional appearance of the site.</p>
<p><strong>A SOLUTION:</strong> JQuery includes a function to <a href="http://docs.jquery.com/Effects/fadeIn" onclick="pageTracker._trackPageview('/outgoing/docs.jquery.com/Effects/fadeIn?referer=');">fade-in</a> a hidden tag. If the content of the page is initially hidden using CSS, it then can be faded-in using JQuery once the whole page has been processed and is ready for display. </p>
<h3>Step 1</h3>
<p>Inside the page&#8217;s &lt;body&gt; tag, enclose the content in a &lt;div&gt; tag with a unique CSS id (<a href="http://blog.anselmbradford.com/2008/12/20/the-difference-between-ids-and-classes-in-css/">see this post for the difference between CSS ids and classes</a>).</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;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;content-wrapper&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
The page content goes here!
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #808080; font-style: italic;">&lt;!-- content-wrapper --&gt;</span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h3>Step 2</h3>
<p>Inside the page&#8217;s &lt;head&gt; tag, import the JQuery library (<a href="http://docs.jquery.com/Downloading_jQuery" onclick="pageTracker._trackPageview('/outgoing/docs.jquery.com/Downloading_jQuery?referer=');">download it here</a>) and create a fade-in effect on the &lt;div&gt; tag surrounding the page&#8217;s content. Key to this solution is that the effect gets placed inside JQuery&#8217;s <code>$(document).ready()</code> function, ensuring the fade begins after the document&#8217;s DOM has been completely parsed.</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;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;jquery.min.js&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
$(document).ready(function() 
{
		// fade in content.
		$( '#content-wrapper' ).fadeIn(&quot;slow&quot;);		
});
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h3>Step 3</h3>
<p>At this point the fade-in effect will not occur, because the content is not hidden to begin with. To correct this add some CSS styling underneath the JavaScript above to hide the page content initially.</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;style</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
#content-wrapper
{
	display:none;	
}
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h3>Step 4</h3>
<p>Now the fade-in effect will work, however, a problem exists. If someone visits the page and has JavaScript turned off in their browser, the CSS to hide the content will be applied, but the JQuery to fade it back into visibility will not run, leaving the page effectively blank. This is a serious accessibility issue. To correct this, instead of hardcoding the &lt;div&gt; tag that is wrapping the content, write the tag using JavaScript. That way if JavaScript is turned off, the tag will not be rendered and won&#8217;t hide its containing content. Change what was written in Step 1 to the following:</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;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #808080; font-style: italic;">&lt;!--//--&gt;</span><span style="color: #339933;">&lt;![CDATA[//&gt;&lt;!--</span>
<span style="color: #339933;">document.write( '&lt;div id=&quot;content-wrapper&quot;&gt;' );</span>
<span style="color: #339933;">//--&gt;&lt;!]]&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
The page content goes here!
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #808080; font-style: italic;">&lt;!--//--&gt;</span><span style="color: #339933;">&lt;![CDATA[//&gt;&lt;!--</span>
<span style="color: #339933;">document.write( '&lt;/div&gt;&lt;!-- content-wrapper --&gt;' );</span>
<span style="color: #339933;">//--&gt;&lt;!]]&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Putting it all together you end up with this (remember to include the JQuery library in the same folder as this HTML page):</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;meta</span> <span style="color: #000066;">http-equiv</span>=<span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">&quot;text/html; charset=UTF-8&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Fade-in effect example<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;jquery.min.js&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
$(document).ready(function() 
{
		// fade in content.
		$( '#content-wrapper' ).fadeIn(&quot;slow&quot;);		
});
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;style</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
#content-wrapper
{
	display:none;	
}
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #808080; font-style: italic;">&lt;!--//--&gt;</span><span style="color: #339933;">&lt;![CDATA[//&gt;&lt;!--</span>
<span style="color: #339933;">document.write( '&lt;div id=&quot;content-wrapper&quot;&gt;' );</span>
<span style="color: #339933;">//--&gt;&lt;!]]&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
The page content goes here!
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #808080; font-style: italic;">&lt;!--//--&gt;</span><span style="color: #339933;">&lt;![CDATA[//&gt;&lt;!--</span>
<span style="color: #339933;">document.write( '&lt;/div&gt;&lt;!-- content-wrapper --&gt;' );</span>
<span style="color: #339933;">//--&gt;&lt;!]]&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.anselmbradford.com/2009/08/28/how-to-add-a-simple-webpage-fade-in-effect-using-jquery/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>The dilemma of Twitter</title>
		<link>http://blog.anselmbradford.com/2009/08/19/the-dilemma-of-twitter/</link>
		<comments>http://blog.anselmbradford.com/2009/08/19/the-dilemma-of-twitter/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 14:39:53 +0000</pubDate>
		<dc:creator>Ans</dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=838</guid>
		<description><![CDATA[Twitter. Love it, perhaps hate it, or don&#8217;t get it. One thing is clear, Twitter has experienced profound media exposure, perhaps surprisingly out of proportion with the service it actually provides. No, there are no tools to help you sell things, no you can&#8217;t create galleries of your favorite pictures, no there isn’t a lengthy [...]]]></description>
			<content:encoded><![CDATA[<p>Twitter. Love it, perhaps hate it, or don&#8217;t get it. One thing is clear, Twitter has experienced profound media exposure, perhaps surprisingly out of proportion with the service it actually provides. No, there are no tools to help you sell things, no you can&#8217;t create galleries of your favorite pictures, no there isn’t a lengthy profile to fill out, no you can&#8217;t embed video. Twitter is simply 140 characters of whatever you want. Twitter is the bottled water of the Internet, in foresight dubiously useful, in hindsight surprisingly popular. With all this exposure has Twitter reached maturity and left the realm of novelty, or is it still riding a honeymoon through the limelight?</p>
<h3>The tinkerers new toy</h3>
<p>Twitter’s simple elegance has led many to explore creative ways of utilizing their 140 characters. Take Mario Klingemann&#8217;s (<a href="http://www.quasimondo.com" onclick="pageTracker._trackPageview('/outgoing/www.quasimondo.com?referer=');">Quasimondo</a>) <a href="http://www.flickr.com/photos/quasimondo/3518306770/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/quasimondo/3518306770/?referer=');">Mona Lisa stored in a single tweet</a>, whose rendering certainly needs no reference image to be recognizable. Or Grant Skinner&#8217;s <a href="http://www.gskinner.com/playpen/tweetcoding_0/" onclick="pageTracker._trackPageview('/outgoing/www.gskinner.com/playpen/tweetcoding_0/?referer=');">Tweetcoding</a> contest, a challenge to create something in ActionScript 3 within 140 characters. The small message footprint is seen as a challenge to mold and work within instead of an obstacle to overcome. It has the appeal of tinkering with an old toy, whose functionality may seem limited, but that very limitation makes it appealing to extend with modern tools, to see what is possible with what is available. </p>
<p>Taking a stroll down <a href="http://momb.socio-kybernetics.net/" onclick="pageTracker._trackPageview('/outgoing/momb.socio-kybernetics.net/?referer=');">The Museum of Modern Betas</a>, a website devoted to showcasing emerging beta websites, more often than not a new service showcased is one that aims to extend the functionality of Twitter. </p>
<p>Why extend the functionality of a site that could have more built into it to begin with, or spend time beating the most out of 140 characters when there are options available to disseminate texts of much larger length? The answer may lie in the special place Twitter holds within the eyes of its devotees, as well as the surprising versatility its simplicity allows.</p>
<h3>A failure made for a t-shirt</h3>
<p>Take for instance, the appearance of the Fail Whale—which, let us remember, denotes a failure of the system to function. On a whole, the flying whale’s appearance is met with mild irritation, but eventual forgiving acceptance. As if we’ve just missed the bus, but it’s a beautiful day out so why not wait a little longer. The whale appears, but it will pass. What other service enjoys such forgiveness on failing?<br />
Perhaps it is because Twitter has no aura of presumptuousness or expectation. Twitter didn’t tell you to use its service, or how to use it. Twitter didn’t try to sell you something. Twitter didn’t promise something big. Twitter just gives one simple service with clearly defined boundaries, the rest is up to you.</p>
<p>Prior to being usurped by Facebook in popular favor and acquiring a reputation of ugliness, MySpace followed a similar road to success. It gave you the tools to create a webpage, link it to your friends (and strangers), and decorate it any way you saw fit. Its tools enabled something without being overbearing. Twitter’s format enables a particular kind of messaging to take place, and even more subtly, Twitter enhances its service within its limitations. The short message format forces conciseness, producing messages that are composed of the bare essentials. This format offers an effective way to convey information quickly in a way that is analogous to the “sound bites” of broadcast media.</p>
<h3>Riding the honeymoon</h3>
<p>Fundamentally, no matter the length of the message, Twitter is just like other media, it is nothing without the content it contains. The millions and millions of tweets. From the mundane and trivial, to the very present and important. They are the daily messages from people across the globe, some of which have been the first to report breaking news (for example, <a href="http://twitter.com/jkrums/status/1121915133" onclick="pageTracker._trackPageview('/outgoing/twitter.com/jkrums/status/1121915133?referer=');">US Airways Flight 1549&#8217;s landing in the Hudson River</a>). Twitter has been a face for citizen journalism and along with sites like Facebook have brought the term &#8220;social media&#8221; into mainstream use. Lest we forget, however, the Web has always been social media from its roots. The World Wide Web established a protocol for linking documents together through hyperlinks, the very type of links you click on webpages today. These were documents created by people, with links added by people elsewhere to make sharing information easier. The effort of masses of people created a vast network of documents, linked in (hopefully) relevant ways. This group effort is the basis of what makes the Internet so wonderful. Incrementally a vast library of information has accumulated, accessible from around the world. Google&#8217;s mission of &#8220;organizing the world&#8217;s information&#8221; is as noble as it is important. Web development should, as it always has, concern itself with organizing what information is on the Internet. </p>
<p>It is no surprise then that there are so many services appearing that attempt to utilize and extend the information on Twitter. The challenge is how to extract the useful information from the trivial and meaningless tweets. However, as the saying goes &#8220;one man&#8217;s trash is another man&#8217;s treasure,&#8221; and what is &#8220;useful information&#8221; is not always clear. And herein lies the dilemma of Twitter. Its flexibility within its confines is powerful, yet limiting. It is a versatile tool for the goals of many audiences, but without a clear way to target any particular one. All users are sending tweets into the pool without any inherent way of organizing them, since tweets lack any user generated metadata outside of the messages themselves. Yes, there are the existing hashtags, however, these rely on formatting conventions, and as with any system without standards they may become disparate in implementation, reducing their efficacy. Twitter’s <a href=" http://search.twitter.com/advanced">advanced search</a> is certainly useful, but it is a way to mine information, not consume relevant information in a passive way, the latter of which would be more appropriate to Twitter’s format. </p>
<p>Additionally, the character limit of messages, while keeping things concise, does not work with long URLs. Encouraging the spread of URL shortening services does nothing for the reliability of the information Twitter holds (see my other post: <a href=“ http://blog.anselmbradford.com/2009/08/17/why-url-shortening-as-we-know-it-is-bad/”>Why URL shortening is bad</a>), unless Twitter itself acquires one of these services. If Twitter is more than a novelty or tinkerers toy, whose database of moments is to be taken as an important resource to be preserved on the Internet, tackling these issues may become tied with the continued sustainability of Twitter. At very least Twitter will need to utilize its own information in a way that offers a financial gain, since as of yet Twitter, the actual company, has yet to have any revenue from their namesake. For the time being, if the acceptance of the Fail Whale is any indication, Twitter may still be riding its way through the limelight.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anselmbradford.com/2009/08/19/the-dilemma-of-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why URL shortening as we know it is bad</title>
		<link>http://blog.anselmbradford.com/2009/08/17/why-url-shortening-as-we-know-it-is-bad/</link>
		<comments>http://blog.anselmbradford.com/2009/08/17/why-url-shortening-as-we-know-it-is-bad/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 16:15:06 +0000</pubDate>
		<dc:creator>Ans</dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=887</guid>
		<description><![CDATA[There was a time when computers on the Internet were accessed via a numerical address. Early on, even before TCP/IP, the idea to map these sets of numbers to human-readable addresses seemed like a good one. The precursor of what is today the Domain Name System (DNS) was born. Fast forward to today and the [...]]]></description>
			<content:encoded><![CDATA[<p>There was a time when computers on the Internet were accessed via a numerical address. Early on, even before TCP/IP, the idea to map these sets of numbers to human-readable addresses seemed like a good one. The precursor of what is today the Domain Name System (DNS) was born. Fast forward to today and the Web is filled with millions of domain names. Familiar ones such as http://google.com are typed daily instead of http://74.125.45.100. As more and more domains were added and more and more server-side technologies emerged, URLs of webpage addresses became long and cumbersome. A need for a shortened URL was needed.</p>
<p>Early in the 2000s a new website, <a href="http://tinyurl.com" onclick="pageTracker._trackPageview('/outgoing/tinyurl.com?referer=');">tinyurl.com</a>, became the first notable site to provide such a service. Using TinyURL any website address could be given an alias that redirected to the actual address, but the alias often contained many fewer characters than the actual address. This was seemingly ideal for pasting to chat windows, sending in email (where email clients would sometimes not parse web addresses that contained long query strings with question marks and ampersands correctly), etc. </p>
<p>Then in 2006, Twitter appeared on the scene, and with its character limited message format of 140 characters, the need for a URL shortening method was all the more in demand. With Twitter&#8217;s meteoric rise to prominence, URL shorteners were given a large helping hand to mainstream visibility. In the time since, dozens have sprung up. But without a revenue stream to sustain them these services often folded just as quickly. And herein lies the problem. The Internet is built upon links of information that are relevant and accessible. For the most part these links are created by humans, and once created add to the organization and usefulness of the Internet as an information resource. Through Twitter and elsewhere URL shorteners are creating a vast catalog of links that are dependent on one website service to exist. If the service disappears, the alias no longer redirects, and the link is dead. Unlike most dead links it also doesn&#8217;t offer a hint as to what the original resource was, because the address has been obscured beyond recognition (although, at least one service, <a href="http://twi.bz" onclick="pageTracker._trackPageview('/outgoing/twi.bz?referer=');">twi.bz</a>, attempts to retain some hint of the original address). This contradicts the very idea of the Internet itself, whose beginnings began in de-centralization.</p>
<p>Little more than a year and a half ago mashable.com had an article that listed &#8220;<a href="http://mashable.com/2008/01/08/url-shortening-services/" onclick="pageTracker._trackPageview('/outgoing/mashable.com/2008/01/08/url-shortening-services/?referer=');">90+ URL Shortening Services.</a>&#8221; Browsing through this list it can be discovered that many are already defunct. With so many services to choose from who&#8217;s to know which may be solid, sustainable enterprises and which may be a mere pet project. Here today, gone tomorrow. Smalltime services may not have the resources, financial or otherwise to sustain themselves, yet their aliases persist on the Internet. Take cli.gs, who lost many aliases <a href="http://blog.cli.gs/news/cligs-got-hacked-restoration-from-backup-started" onclick="pageTracker._trackPageview('/outgoing/blog.cli.gs/news/cligs-got-hacked-restoration-from-backup-started?referer=');">earlier this year due to being hacked</a>. While this could happen to any website, it emphasizes the centralized vulnerability of these services. A similar problem can occur in cloud computing, as was illustrated by the demise of <a href="http://citizengarden.com/2009/02/15/episode-11-whither-magnolia/" onclick="pageTracker._trackPageview('/outgoing/citizengarden.com/2009/02/15/episode-11-whither-magnolia/?referer=');">Ma.gnolia</a> due to a hardware failure. </p>
<p>There are so many of these services because they do offer something valuable that is not possible with the current Internet protocols. Take tr.im, who announced last week that they would be <a href="http://blog.tr.im/post/159489555/tr-im-to-december-31-2009" onclick="pageTracker._trackPageview('/outgoing/blog.tr.im/post/159489555/tr-im-to-december-31-2009?referer=');">shutting their doors at the end of the year</a>. The public reaction that followed <a href="http://blog.tr.im/post/160697842/tr-im-resurrected" onclick="pageTracker._trackPageview('/outgoing/blog.tr.im/post/160697842/tr-im-resurrected?referer=');">made them change their mind</a>. This certainly illustrates the demand for these services, and is good that for the time being, tr.im aliases will remain alive, but it is a band aid on a problem that needs a grander solution than one popular website can provide. </p>
<p>Projects such as <a href="http://code.google.com/p/shortlink/wiki/Specification" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/shortlink/wiki/Specification?referer=');">shortlink</a> and <a href="http://sites.google.com/a/snaplog.com/wiki/short_url" onclick="pageTracker._trackPageview('/outgoing/sites.google.com/a/snaplog.com/wiki/short_url?referer=');">short_url</a> aim to tackle this problem by removing the third-party aspect of URL shortening and creating a specification for creating shortened URLs on the site that hosts a particular URL. These projects are not yet polished, but it is a start.</p>
<p>Taken as inspiration from <a href="http://www.readwriteweb.com/archives/this_message_will_self-destruct_new_tool_makes_online_postings_vanish.php" onclick="pageTracker._trackPageview('/outgoing/www.readwriteweb.com/archives/this_message_will_self-destruct_new_tool_makes_online_postings_vanish.php?referer=');">this article about a service called Vanish</a>, one interesting use for URL shortening that uses aliases may be in links that are intentionally made to &#8220;expire&#8221; after a certain period of time. Since a particular URL shortening service controls where an alias redirects to, they also can control for how long as well. However, if such a service was used more generally it would lead to the same issues of dead links (linkrot) as above.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anselmbradford.com/2009/08/17/why-url-shortening-as-we-know-it-is-bad/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating a date countdown timer in ActionScript 3 / Flash</title>
		<link>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/</link>
		<comments>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 15:23:41 +0000</pubDate>
		<dc:creator>Ans</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=873</guid>
		<description><![CDATA[Creating a countdown timer in ActionScript is quite easy. The essentials of it are:

Specify a target date to countdown to using the Date class.
Create a Timer instance to check the countdown time each second or so.
At each tick of the timer calculate the number of milliseconds between now and the target date.
Determine how many days, [...]]]></description>
			<content:encoded><![CDATA[<p>Creating a countdown timer in ActionScript is quite easy. The essentials of it are:</p>
<ol>
<li>Specify a target date to countdown to using the <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Date.html" onclick="pageTracker._trackPageview('/outgoing/livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Date.html?referer=');">Date</a> class.</li>
<li>Create a <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/utils/Timer.html" onclick="pageTracker._trackPageview('/outgoing/livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/utils/Timer.html?referer=');">Timer</a> instance to check the countdown time each second or so.</li>
<li>At each tick of the timer calculate the number of milliseconds between now and the target date.</li>
<li>Determine how many days, hours, minutes, seconds, etc. that number of milliseconds is equal to.</li>
<li>Update the graphics to reflect the amount of time left.</li>
</ol>
<p>The following is an example of a countdown timer, with a link to the source code below. This utilizes a reusable class file for the countdown timer. All code specific to this particular implementation can be found in com/anselmbradford/Main.as.<br />

<object width="200" height="45">
<param name="movie" value="/wp-content/uploads/2009/08/counter.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="200" height="45" src="/wp-content/uploads/2009/08/counter.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p><a href='/wp-content/uploads/2009/08/counter.zip'>Download Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-actionscript-3-flash/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Teaching at Auckland University of Technology (AUT)</title>
		<link>http://blog.anselmbradford.com/2009/07/23/teaching-at-auckland-university-of-technology-aut/</link>
		<comments>http://blog.anselmbradford.com/2009/07/23/teaching-at-auckland-university-of-technology-aut/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 13:37:34 +0000</pubDate>
		<dc:creator>Ans</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=863</guid>
		<description><![CDATA[
After all the rewards and hard work of putting together the 2009 Spring &#60;br /&#62; Conference last month, as well as finishing up my Master&#8217;s degree, I rather quickly and surprisingly found myself opening up an exciting new chapter in my life. I am now living in Auckland, New Zealand working as a lecturer at [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.anselmbradford.com/wp-content/uploads/2009/07/aut_logo.gif" alt="Auckland University of Technology" title="Auckland University of Technology" width="144" height="113" class="alignleft size-full wp-image-866" /><br />
After all the rewards and hard work of putting together the <a href="http://sbconference.com" onclick="pageTracker._trackPageview('/outgoing/sbconference.com?referer=');">2009 Spring &lt;br /&gt; Conference</a> last month, as well as finishing up my Master&#8217;s degree, I rather quickly and surprisingly found myself opening up an exciting new chapter in my life. I am now living in Auckland, New Zealand working as a lecturer at <a href="http://aut.ac.nz" onclick="pageTracker._trackPageview('/outgoing/aut.ac.nz?referer=');">AUT</a> teaching Interactive Media Production I &#038; II. Hopefully between exploring and teaching I&#8217;ll have some time to get more posts out here soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anselmbradford.com/2009/07/23/teaching-at-auckland-university-of-technology-aut/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to build an Object-Oriented ActionScript 3 Preloader in Flash CS4: 2 Methods</title>
		<link>http://blog.anselmbradford.com/2009/06/20/how-to-build-an-object-oriented-actionscript-3-preloader-in-flash-cs4-2-methods/</link>
		<comments>http://blog.anselmbradford.com/2009/06/20/how-to-build-an-object-oriented-actionscript-3-preloader-in-flash-cs4-2-methods/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 03:26:05 +0000</pubDate>
		<dc:creator>Ans</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.anselmbradford.com/?p=836</guid>
		<description><![CDATA[The magic of creating a preloader in ActionScript 3 lies in the LoaderInfo class. Every instantiated DisplayObject instance (all objects that appear on the stage, plus the stage itself) have a loaderInfo property that returns a LoaderInfo instance that contains information about the loading progress of that particular display object. Creating a preloader for the [...]]]></description>
			<content:encoded><![CDATA[<p>The magic of creating a preloader in ActionScript 3 lies in the <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/LoaderInfo.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/LoaderInfo.html?referer=');">LoaderInfo</a> class. Every instantiated DisplayObject instance (all objects that appear on the stage, plus the stage itself) have a <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#loaderInfo" onclick="pageTracker._trackPageview('/outgoing/livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html_loaderInfo?referer=');">loaderInfo</a> property that returns a LoaderInfo instance that contains information about the loading progress of that particular display object. Creating a preloader for the whole application is a matter of monitoring these LoaderInfo instances.</p>
<h3>Method 1: Monitor Stage LoaderInfo instance</h3>
<p>Under this method the loading progress is monitored via the LoaderInfo instance associated with the stage. Since all assets that will appear in the application need to be attached to the stage, the stage&#8217;s LoaderInfo instance will reflect the loading of all these assets.</p>
<h4>Graphics</h4>
<ol>
<li>Go to File &#8594; New&#8230; and select Flash File (ActionScript 3.0).</li>
<li>Using the Rectangle tool create a rectangle (include a stroke) on the stage that is 100 pixels wide by 10 pixels high.</li>
<li>Click on the fill of the newly created rectangle and select Modify &#8594; Convert to Symbol&#8230; Name the new instance <em>ProgBar</em> and set the registration point to left-middle. This will be the progress bar of the preloader.
<p><img class="border" src="http://blog.anselmbradford.com/wp-content/uploads/2009/06/preloader_pbar.png" alt="preloader_pbar" title="preloader_pbar" width="626" height="289" class="alignnone size-full wp-image-844" /></p>
</li>
<li>With the new ProgBar instance selected on the stage, go to the Properties panel and name the instance <em>progBar</em>.</li>
<li>Select the whole rectangle (stroke and progress bar instance). Select Modify &#8594; Convert to Symbol&#8230; Name the new instance <em>Preloader</em> and set the registration point to left-middle. Check the <em>Export for ActionScript</em> button.
<li>Click <em>OK</em>. If you get a warning that says the &#8220;definition for this class could not be found&#8221; click <em>OK</em> again.</li>
<li>With the new Preloader instance selected, go to the Properties panel and name the newly created instance <em>preloader</em>. Your library should look like the following:
<p><img class="border" src="http://blog.anselmbradford.com/wp-content/uploads/2009/06/preloader_library.png" alt="preloader_library" title="preloader_library" width="285" height="153" class="alignnone size-full wp-image-848" /></p>
</li>
<li>Select frame 2 of the main timeline, go to Insert &#8594; Timeline &#8594; Blank Keyframe. All content for the application will appear on frame 2 and beyond.</li>
<li>Go to Insert &#8594; New Symbol&#8230; Name the new instance <em>Content</em>. If you check <em>Export for ActionScript</em> be sure to <strong>uncheck <em>Export in frame 1</em></strong>, otherwise the preloader will not function properly.</li>
<li>Place all content of the application on the timeline of the newly created Content instance.</li>
<li>Return to the main timeline. Select frame 2 and drag an instance of the Content symbol from the library and place it on the stage.</li>
<li>In the Properties panel of the stage name the document class <em>Main</em>. If you get a warning that says the &#8220;definition for this class could not be found&#8221; click <em>OK</em>.
<p><img class="border" src="http://blog.anselmbradford.com/wp-content/uploads/2009/06/preloader_docclass.png" alt="preloader_docclass" title="preloader_docclass" width="283" height="200" class="alignnone size-full wp-image-854" /></p>
</li>
<li>Save the file.</li>
</ol>
<h4>Code</h4>
<ol>
<li>Go to File &#8594; New&#8230; and select ActionScript File.</li>
<li>Paste the following code and save the file as <em>Preloader.as</em> in the same directory as the .fla file saved earlier.

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">LoaderInfo</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Preloader <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #808080; font-style: italic;">/**
		* Alias for stage LoaderInfo instance
		*/</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _targetLoaderInfo:LoaderInfo;
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		* The percent loaded
		*/</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _loadPercent:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		* Constructor
		* Listen for when the preloader has been added to the stage 
		* so that the progress of the remaining load can be monitored.
		*/</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Preloader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ADDED_TO_STAGE</span> , _init <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		* Initialize variables.
		* Set initial width of the progress bar to 0 
		* and listen for enter frame event.
		*/</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _init<span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			_targetLoaderInfo = <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">loaderInfo</span>;
&nbsp;
			progBar.<span style="color: #006600;">scaleX</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ADDED_TO_STAGE</span> , _init <span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, _onCheckLoaded<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		* Check the status of the load, once complete dispatch a complete event.
		*/</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _onCheckLoaded<span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> 
		<span style="color: #66cc66;">&#123;</span>
			_loadPercent = _targetLoaderInfo.<span style="color: #0066CC;">bytesLoaded</span> <span style="color: #66cc66;">/</span> _targetLoaderInfo.<span style="color: #0066CC;">bytesTotal</span>;
			progBar.<span style="color: #006600;">scaleX</span> = _loadPercent;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>progBar.<span style="color: #006600;">scaleX</span> == <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #0066CC;">this</span>.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, _onCheckLoaded<span style="color: #66cc66;">&#41;</span>;
				<span style="color: #0066CC;">this</span>.<span style="color: #006600;">dispatchEvent</span><span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> Event<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>	
<span style="color: #66cc66;">&#125;</span></pre></div></div>

</li>
<li>Go to File &#8594; New&#8230; and select ActionScript File a second time.</li>
<li>Paste the following code and save the file as <em>Main.as</em> in the same directory as the .fla file saved earlier.

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package 
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span> 
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #808080; font-style: italic;">/**
		* Constructor
		* Stop timeline and add event listener to preloader.
		*/</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> 
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			preloader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">COMPLETE</span> , _initContent <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		* Load has finished, remove preloader and preceed to next frame.
		*/</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _initContent<span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> 
		<span style="color: #66cc66;">&#123;</span>
			preloader.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">COMPLETE</span> , _initContent <span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">removeChild</span><span style="color: #66cc66;">&#40;</span>preloader<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">nextFrame</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

</li>
<li>To test the preloader go to Control &#8594; Test Movie. Go to View &#8594; Simulate Download.</li>
<li><a href='/wp-content/uploads/2009/06/preloader_method1.zip'>Download method 1 complete source</a></li>
</ol>
<h3>Method 2: Monitor content SWF LoaderInfo instance</h3>
<p>Under this method two SWFs are created, one encapsulating the preloader and the other encapsulating all content. The content SWF is loaded inside of the preloader SWF, which monitors the loading progress.</p>
<h4>Graphics</h4>
<ol>
<li>Follow steps 1 &#8211; 7 in the previous method.</li>
<li>In the Properties panel of the stage name the document class <em>PreloaderWrapper</em>. If you get a warning that says the &#8220;definition for this class could not be found&#8221; click <em>OK</em>.</li>
<li>Save the file.</li>
<li>Go to File &#8594; New&#8230; and select Flash File (ActionScript 3.0).</li>
<li>Add the content for your application to the timeline of this file.</li>
<li>Save the file as <em>content.fla</em>.</li>
<li>Go to Control &#8594; Test Movie to create the content.swf that will be loaded by the preloader SWF.</li>
</ol>
<h4>Code</h4>
<ol>
<li>Go to File &#8594; New&#8230; and select ActionScript File.</li>
<li>Paste the following code and save the file as <em>PreloaderWrapper.as</em> in the same directory as the .fla file saved earlier.

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package 
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Loader</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">LoaderInfo</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">DisplayObject</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">ProgressEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> PreloaderWrapper <span style="color: #0066CC;">extends</span> Sprite 
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #808080; font-style: italic;">/**
		* Alias for content LoaderInfo instance
		*/</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _targetLoaderInfo:LoaderInfo;
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		* The percent loaded
		*/</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _loadPercent:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		* Constructor
		* Creates Loader instance, adds event listeners and begins loading content SWF.
		*/</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> PreloaderWrapper<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> 
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> loader:Loader = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_targetLoaderInfo = loader.<span style="color: #006600;">contentLoaderInfo</span>;
			_targetLoaderInfo.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> ProgressEvent.<span style="color: #006600;">PROGRESS</span>, _loadingData <span style="color: #66cc66;">&#41;</span>;
			_targetLoaderInfo.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">COMPLETE</span> , _finishedLoading <span style="color: #66cc66;">&#41;</span>;
			loader.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;content.swf&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		* Monitor loading progress and update progress bar.
		*/</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _loadingData<span style="color: #66cc66;">&#40;</span> evt:ProgressEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> 
		<span style="color: #66cc66;">&#123;</span>
			_loadPercent = _targetLoaderInfo.<span style="color: #0066CC;">bytesLoaded</span> <span style="color: #66cc66;">/</span> _targetLoaderInfo.<span style="color: #0066CC;">bytesTotal</span>;
			preloader.<span style="color: #006600;">progBar</span>.<span style="color: #006600;">scaleX</span> = _loadPercent;	
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		* Remove event listeners and preloader, and attach content SWF to stage.
		*/</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _finishedLoading<span style="color: #66cc66;">&#40;</span> evt:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> 
		<span style="color: #66cc66;">&#123;</span>
			_targetLoaderInfo.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span> ProgressEvent.<span style="color: #006600;">PROGRESS</span>, _loadingData <span style="color: #66cc66;">&#41;</span>;
			_targetLoaderInfo.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">COMPLETE</span> , _finishedLoading <span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">removeChild</span><span style="color: #66cc66;">&#40;</span>preloader<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span> DisplayObject<span style="color: #66cc66;">&#40;</span>LoaderInfo<span style="color: #66cc66;">&#40;</span>evt.<span style="color: #0066CC;">target</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">content</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

</li>
<li>To test the preloader go to Control &#8594; Test Movie. Go to View &#8594; Simulate Download.</li>
<li><a href='/wp-content/uploads/2009/06/preloader_method2.zip'>Download method 2 complete source</a></li>
</ol>
<p><strong>UPDATE July 30, 2009:</strong> I noticed I forgot the <em>private</em> designation on two of the methods in the PreloaderWrapper class. They have been added.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anselmbradford.com/2009/06/20/how-to-build-an-object-oriented-actionscript-3-preloader-in-flash-cs4-2-methods/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
	</channel>
</rss>
