<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Learning Flash the Hard Way, from the Bottom Up</title>
	<atom:link href="http://bottomupflash.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bottomupflash.wordpress.com</link>
	<description>Developing ActionScript applications from the command line</description>
	<lastBuildDate>Mon, 24 Oct 2011 10:03:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='bottomupflash.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Learning Flash the Hard Way, from the Bottom Up</title>
		<link>http://bottomupflash.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://bottomupflash.wordpress.com/osd.xml" title="Learning Flash the Hard Way, from the Bottom Up" />
	<atom:link rel='hub' href='http://bottomupflash.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Deleting XML nodes: harder than it looks</title>
		<link>http://bottomupflash.wordpress.com/2008/03/26/deleting-xml-nodes-harder-than-it-looks/</link>
		<comments>http://bottomupflash.wordpress.com/2008/03/26/deleting-xml-nodes-harder-than-it-looks/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 08:24:34 +0000</pubDate>
		<dc:creator>David Barrett</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://bottomupflash.wordpress.com/?p=29</guid>
		<description><![CDATA[XML support in ActionScript is actually quite nice (though it&#8217;s a bit creepy to see raw XML inserted straight into the code). The whole E4X thing takes some getting used to, but in general everything just works surprisingly well. Except for deleting. That just doesn&#8217;t work at all like you&#8217;d expect. Consider the following ActionScript [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=29&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>XML support in ActionScript is actually quite nice (though it&#8217;s a bit creepy to see raw XML inserted straight into the code).  The whole E4X thing takes some getting used to, but in general everything just works surprisingly well.  Except for deleting.  That just doesn&#8217;t work at all like you&#8217;d expect.  Consider the following ActionScript code:</p>
<blockquote><p><span style="font-family:'Courier New';">var xml:XML = &lt;foo&gt;<br />
&lt;bar id=&#8221;1&#8243;/&gt;<br />
&lt;/bar&gt;<br />
&lt;bar id=&#8221;2&#8243;/&gt;<br />
&lt;/foo&gt;;</span></p></blockquote>
<p>That&#8217;s right, you can just assign XML straight to a variable.  Wiggy, right?  Anway, so the operations are a little weird, but not too bad.  <code>trace( xml )</code> spits out the entire &lt;foo&gt; tree in well-formatted XML to the log file, as you&#8217;d expect. <code>trace( xml.bar )</code> outputs the all the &lt;bar&gt; elements as an array, so that&#8217;s sorta reasonable.  <code>trace( xml.bar.(@id==1) )</code> starts to get trippy, as the dot before the parenthesis isn&#8217;t a typo but rather an E4X selector of all children of bar with an &#8220;id&#8221; equal to 1.  Anyway, all this is spelled out in way more detail in <a href="http://livedocs.adobe.com/flex/2/langref/XML.html" title="XML Zaniness">the docs</a>.</p>
<p>So hard-coding XML is incredibly easy, and accessing it is weird but pretty easy too.  It also turns out that adding more nodes to the tree is really easy: just assign some node to a variable, and then call appendChild().  Duh, what could be easier?</p>
<blockquote><p><span style="font-family:'Courier New';">var child:XML = xml.bar[0]; // xml.bar is an array, we want the first one<br />
var grandChild:XML = &lt;blah&gt;; // That&#8217;s right, this is valid<br />
child.appendChild( grandChild );</span></p></blockquote>
<p>Ok, so we&#8217;ve hard coded some XML, we&#8217;ve added some nodes, now all we need to do is remove it.  Everything else has been easy, this should be too, right?  Wrong.  At least for me, deleting nodes from an XML tree was really non-intuitive.  Here&#8217;s what I assumed I could do:</p>
<blockquote><p><span style="font-family:'Courier New';">child.removeChild( grandChild );</span></p></blockquote>
<p>I mean, we could add it that way, why not remove it?  Nope!  Doesn&#8217;t work that way.  That function doesn&#8217;t exist.  Ok, that&#8217;s fine you think &#8212; we still have a reference to grandChild; let&#8217;s just delete that:</p>
<blockquote><p><span style="font-family:'Courier New';">delete grandChild;</span></p></blockquote>
<p>Nope, that doesn&#8217;t work either &#8212; you get this message &#8220;Error: Attempt to delete the fixed property grandChild.  Only dynamically defined properties can be deleted.&#8221;  I&#8217;m not entirely sure what that means, but it sounds bad.  Maybe it&#8217;s because grandChild is just defined with a constant XML object that screws it up? Ok, let&#8217;s get a reference to grandchild and then try to delete that.  How to get the reference?  Well, you might notice that appendChild() returns an XML object.  And you might think that means it returns a reference to the new XML object it just allocated.  That would mean you could do this:</p>
<blockquote><p><span style="font-family:'Courier New';">var appended:XML = child.appendChild( grandChild );<br />
delete appended;</span></p></blockquote>
<p>Alas, that doesn&#8217;t work.  &#8220;appended&#8221; in this example is just set equal to &#8220;child&#8221;, for no reason I can surmise.  In other words, there&#8217;s no easy way to get a reference to the thing you just created.  You&#8217;ve got to turn to the black arts of E4X to dig it out:</p>
<blockquote><p><span style="font-family:'Courier New';">var grandChild:XML = &lt;blah&gt;;<br />
child.appendChild( grandChild );<br />
var appended:XML = child.blah[ child.blah.length()-1 ]; // The last one is the one we appended<br />
delete appended;</span></p></blockquote>
<p>So, append grandChild to child, then get a reference to appended, and then just delete appended, right?  Wrong!  You get that same mysterious &#8220;Attempt to delete the fixed property&#8221; compile error as before.  Hrm.  Ok, so how the hell do we delete something?  Turns out, the only way (that I can find) is to use more E4X magic, this time in conjunction with a special &#8220;delete&#8221; operator:</p>
<blockquote><p><span style="font-family:'Courier New';">delete child.blah[ child.blah.length()-1 ];</span></p></blockquote>
<p>So, you can use references to XML elements to query them and add children, but you need E4X in order to delete them.  Now, in the above example you might be thinking &#8220;why do the whole &#8220;length-1&#8243; bit &#8212; why not just use &#8220;blah[0]&#8220;?  The answer is &#8220;because generally you don&#8217;t know how many children are already there and thus need to find the last one&#8221;.  Which brings up a really, really excellent question: how do you delete an item from the *middle* of a child list.  So glad you asked!</p>
<p>Well, if you know its index, then you can just delete it with the array operator (eg, &#8220;delete child.blah[2];&#8221;).  But if you don&#8217;t know its index, then you need to give it an attribute (child.blah[2].@id=1337;) and then delete using that attribute (delete child.blah.(@id==1337);).  All in all, it sorta makes sense now that I know it, but it sure wasn&#8217;t an intuitive leap to get from there to here.  Anyway, that&#8217;s my learning process, I hope it helped you through yours.  Here&#8217;s some test code, as well as the output it generates:</p>
<blockquote><p><span style="font-family:'Courier New';">var xml:XML = &lt;foo&gt;<br />
    &lt;bar id=&#8221;1&#8243;/&gt;<br />
    &lt;bar id=&#8221;2&#8243;/&gt;<br />
&lt;/foo&gt;;<br />
trace( &#8220;&#8212;- xml &#8212;-&#8221; );<br />
trace( xml );<br />
trace( &#8220;&#8212;- xml.bar &#8212;-&#8221; );<br />
trace( xml.bar );<br />
trace( &#8220;&#8212;- xml.bar.(@id==1) &#8212;-&#8221; );<br />
trace( xml.bar.(@id==1).toXMLString() );<br />
trace( &#8220;&#8212;- before append &#8212;&#8221; );<br />
var child:XML = xml.bar[0];<br />
trace( child.toXMLString() );<br />
trace( &#8220;&#8212;- after append &#8212;-&#8221; );<br />
var grandChild:XML = &lt;blah/&gt;<br />
child.appendChild( grandChild );<br />
trace( child.toXMLString() );<br />
trace( &#8220;&#8212;- after delete &#8212;-&#8221; );<br />
delete child.blah[ child.blah.length()-1 ];<br />
trace( child.toXMLString() );</p>
<p>&#8212;- xml &#8212;-<br />
&lt;foo&gt;<br />
  &lt;bar id=&#8221;1&#8243;/&gt;<br />
  &lt;bar id=&#8221;2&#8243;/&gt;<br />
&lt;/foo&gt;<br />
&#8212;- xml.bar &#8212;-<br />
&lt;bar id=&#8221;1&#8243;/&gt;<br />
&lt;bar id=&#8221;2&#8243;/&gt;<br />
&#8212;- xml.bar.(@id==1) &#8212;-<br />
&lt;bar id=&#8221;1&#8243;/&gt;<br />
&#8212;- before append &#8212;<br />
&lt;bar id=&#8221;1&#8243;/&gt;<br />
&#8212;- after append &#8212;-<br />
&lt;bar id=&#8221;1&#8243;&gt;<br />
  &lt;blah/&gt;<br />
&lt;/bar&gt;<br />
&#8212;- after delete &#8212;-<br />
&lt;bar id=&#8221;1&#8243;/&gt;</span></p></blockquote>
<p><b>PS</b>: The &#8220;toXMLString()&#8221; is needed because if you don&#8217;t use it, then trace() outputs nothing for XML nodes that have no children (even if they have attributes).  Strange, but true.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bottomupflash.wordpress.com/29/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bottomupflash.wordpress.com/29/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bottomupflash.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bottomupflash.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bottomupflash.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bottomupflash.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bottomupflash.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bottomupflash.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bottomupflash.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bottomupflash.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bottomupflash.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bottomupflash.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bottomupflash.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bottomupflash.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bottomupflash.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bottomupflash.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=29&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bottomupflash.wordpress.com/2008/03/26/deleting-xml-nodes-harder-than-it-looks/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e3e2093d78d9baa1eaef6c79b0234d72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quinthar</media:title>
		</media:content>
	</item>
		<item>
		<title>Need a Global/Static FocusManager?  Try the Application!</title>
		<link>http://bottomupflash.wordpress.com/2008/03/23/need-a-globalstatic-focusmanager-try-the-application/</link>
		<comments>http://bottomupflash.wordpress.com/2008/03/23/need-a-globalstatic-focusmanager-try-the-application/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 02:06:22 +0000</pubDate>
		<dc:creator>David Barrett</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://bottomupflash.wordpress.com/?p=28</guid>
		<description><![CDATA[So I am capturing global keypress events, and I want to suppress my action if some component has focus.  A quick read of the docs and the FocusManager class looks like the ticket!  More specifically, FocusManager::getFocus() looks like exactly the function I need.  So I go ahead and call it, only to find it&#8217;s not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=28&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I am capturing global keypress events, and I want to suppress my action if some component has focus.  A quick read of the docs and the <a href="http://livedocs.adobe.com/flex/2/langref/mx/managers/FocusManager.html" title="FocusManager docs">FocusManager</a> class looks like the ticket!  More specifically, FocusManager::getFocus() looks like exactly the function I need.  So I go ahead and call it, only to find it&#8217;s not static &#8212; I can only call it on a FocusManager object.  Which brings to mind: how do I find one?  After a bit of searching, I see some sample code that just refers to a variable &#8220;focusManager&#8221;.  I don&#8217;t see it defined in the same, so I assume it&#8217;s some magic global &#8212; I drop that into my code, and it works!</p>
<p>So if you want a global FocusManager, just try &#8220;focusManager&#8221; and see if that works for you.</p>
<p>Why does that work?  Well, after a bit more thought, I consider: Perhaps focusManager is an attribute on the Application class?   And maybe the keypress handler function I&#8217;m writing in the &lt;mx:script&gt; section of my MXML file is actually a method extending the Application class, meaning all the Application protected attributes are accessible in my function?  A quick look at <a href="http://livedocs.adobe.com/flex/2/langref/mx/core/Application.html" title="Docs for Application">the Application docs</a>, and sure enough, that&#8217;s the case.  Cool!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bottomupflash.wordpress.com/28/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bottomupflash.wordpress.com/28/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bottomupflash.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bottomupflash.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bottomupflash.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bottomupflash.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bottomupflash.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bottomupflash.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bottomupflash.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bottomupflash.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bottomupflash.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bottomupflash.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bottomupflash.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bottomupflash.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bottomupflash.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bottomupflash.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=28&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bottomupflash.wordpress.com/2008/03/23/need-a-globalstatic-focusmanager-try-the-application/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e3e2093d78d9baa1eaef6c79b0234d72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quinthar</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Bindable&#8221;, not &#8220;bindable&#8221;</title>
		<link>http://bottomupflash.wordpress.com/2008/03/12/bindable-not-bindable/</link>
		<comments>http://bottomupflash.wordpress.com/2008/03/12/bindable-not-bindable/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 01:34:20 +0000</pubDate>
		<dc:creator>David Barrett</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://bottomupflash.wordpress.com/?p=27</guid>
		<description><![CDATA[That&#8217;s right, it needs to be capitalized.  How lame is that?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=27&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s right, it needs to be capitalized.  How lame is that?</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bottomupflash.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bottomupflash.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bottomupflash.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bottomupflash.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bottomupflash.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bottomupflash.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bottomupflash.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bottomupflash.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bottomupflash.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bottomupflash.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bottomupflash.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bottomupflash.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bottomupflash.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bottomupflash.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bottomupflash.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bottomupflash.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=27&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bottomupflash.wordpress.com/2008/03/12/bindable-not-bindable/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e3e2093d78d9baa1eaef6c79b0234d72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quinthar</media:title>
		</media:content>
	</item>
		<item>
		<title>Enabling Trace</title>
		<link>http://bottomupflash.wordpress.com/2008/02/29/enabling-trace/</link>
		<comments>http://bottomupflash.wordpress.com/2008/02/29/enabling-trace/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 07:17:39 +0000</pubDate>
		<dc:creator>David Barrett</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://bottomupflash.wordpress.com/?p=26</guid>
		<description><![CDATA[If you&#8217;re like me, you love logfiles. So you see the &#8220;trace&#8221; command and think &#8220;Sweet! I can log!&#8221; But then, if you&#8217;re like me, your hopes are dashed as nothing actually happens. Well, it&#8217;s probably due to one of two reasons: You don&#8217;t have the debug version of the Flash player installed You haven&#8217;t [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=26&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me, you love logfiles.  So you see the &#8220;trace&#8221; command and think &#8220;Sweet!  I can log!&#8221;  But then, if you&#8217;re like me, your hopes are dashed as nothing actually happens.  Well, it&#8217;s probably due to one of two reasons:</p>
<ol>
<li>You don&#8217;t have the debug version of the Flash player installed</li>
<li>You haven&#8217;t activated logging</li>
</ol>
<p>Here&#8217;s how you achieve this state of logging nirvana:</p>
<ol>
<li>Go to the <a href="http://www.adobe.com/support/flashplayer/downloads.html#fp9" title="Flash Players">Flash debug player install page</a> and install the relevant debug player for your platform.  If you&#8217;re lucky enough to be a Linux user, you can enjoy the following additional steps: download the <a href="http://download.macromedia.com/pub/flashplayer/updaters/9/flash_player_9_linux_dev.tar.gz" title="Linux Flash Bliss">Linux Flash Player</a>, find the file and run &#8220;tar xvfz flash_player_9_linux_dev.tar.gz&#8221;, then run &#8220;tar xvf install_flash_player_9_linux.tar.gz&#8221;, and <b>then</b> run &#8220;./flashplayer-installer&#8221;, and <u><b>then</b></u> delete &#8220;.mozilla/firefox/z270avvr.default/xpti.dat&#8221;. Easy!</li>
<li>Go to the <a href="http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&amp;file=logging_125_04.html" title="Debug Flash Player Configuration">Debug Flash Player Configuration Page</a> and create your mm.cfg file (in ~/mm.cfg for Linux) containing:<br />
ErrorReportingEnable=1<br />
MaxWarnings=0<br />
TraceOutputFileEnable=1</li>
<li>Restart Firefox and it should start spitting out logs into the logfile location stated on the page (~/.macromedia/Flash_Player/Logs/flashlog.txt for Linux)</li>
</ol>
<p>So&#8230; not *quite* as easy as a checkbox somewhere, but not horrendous.  But there <u>is</u> a slight problem with this: it, basically, doesn&#8217;t work.  Or, it only sorta works &#8212; I have to keep deleting the flashlog.txt file or nothing happens&#8230;  I&#8217;m still sorting it out.  Fun!</p>
<p><b>[Update]</b> Aha, that&#8217;s the story: it&#8217;s working fine, but it deletes and remakes the logfile every time.  Sorta annoying, but you can get around this with &#8220;tail &#8211;follow=name flashlog.txt&#8221;.  This will tail the file like &#8220;tail -f&#8221;, but will reload it if it gets deleted.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bottomupflash.wordpress.com/26/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bottomupflash.wordpress.com/26/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bottomupflash.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bottomupflash.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bottomupflash.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bottomupflash.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bottomupflash.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bottomupflash.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bottomupflash.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bottomupflash.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bottomupflash.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bottomupflash.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bottomupflash.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bottomupflash.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bottomupflash.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bottomupflash.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=26&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bottomupflash.wordpress.com/2008/02/29/enabling-trace/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e3e2093d78d9baa1eaef6c79b0234d72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quinthar</media:title>
		</media:content>
	</item>
		<item>
		<title>Note: Ubuntu 7.10 JRE blows; install sun-java6-jdk</title>
		<link>http://bottomupflash.wordpress.com/2008/02/20/note-ubuntu-710-jre-blows-install-sun-java6-jdk/</link>
		<comments>http://bottomupflash.wordpress.com/2008/02/20/note-ubuntu-710-jre-blows-install-sun-java6-jdk/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 03:28:06 +0000</pubDate>
		<dc:creator>David Barrett</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://bottomupflash.wordpress.com/?p=25</guid>
		<description><![CDATA[After much consternation, I&#8217;ve discovered that the Java runtime that comes with Ubuntu 7.10 just doesn&#8217;t quite cut it for MXML compilation.  Specifically, MXMLC pegs the CPU to 100% and eats up all available RAM &#8212; both physical and virtual &#8212; until your system grinds to a halt.  The solution, thankfully, is easy enough: just [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=25&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After much consternation, I&#8217;ve discovered that the Java runtime that comes with Ubuntu 7.10 just doesn&#8217;t quite cut it for MXML compilation.  Specifically, MXMLC pegs the CPU to 100% and eats up all available RAM &#8212; both physical and virtual &#8212; until your system grinds to a halt.  The solution, thankfully, is easy enough: just install the &#8220;real&#8221; JRE that comes with the Java 6 JDK, and welcome back to the sweet land of sunshine.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bottomupflash.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bottomupflash.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bottomupflash.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bottomupflash.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bottomupflash.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bottomupflash.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bottomupflash.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bottomupflash.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bottomupflash.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bottomupflash.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bottomupflash.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bottomupflash.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bottomupflash.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bottomupflash.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bottomupflash.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bottomupflash.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=25&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bottomupflash.wordpress.com/2008/02/20/note-ubuntu-710-jre-blows-install-sun-java6-jdk/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e3e2093d78d9baa1eaef6c79b0234d72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quinthar</media:title>
		</media:content>
	</item>
		<item>
		<title>Aha, Bindable</title>
		<link>http://bottomupflash.wordpress.com/2008/02/03/aha-bindable/</link>
		<comments>http://bottomupflash.wordpress.com/2008/02/03/aha-bindable/#comments</comments>
		<pubDate>Sun, 03 Feb 2008 00:56:20 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://bottomupflash.wordpress.com/2008/02/03/aha-bindable/</guid>
		<description><![CDATA[So that&#8217;s what it&#8217;s for: if you specify that an attribute of an object is &#8220;bindable&#8221;, then the UI automatically updates when it changes. (Or, more specifically, it generates a &#8220;propertyChanged&#8221; event, which is picked up by the MX framework to update.) Very handy!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=24&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So that&#8217;s what it&#8217;s for: if you specify that an attribute of an object is &#8220;bindable&#8221;, then the UI automatically updates when it changes. (Or, more specifically, it generates a &#8220;propertyChanged&#8221; event, which is picked up by the MX framework to update.) Very handy!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bottomupflash.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bottomupflash.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bottomupflash.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bottomupflash.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bottomupflash.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bottomupflash.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bottomupflash.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bottomupflash.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bottomupflash.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bottomupflash.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bottomupflash.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bottomupflash.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bottomupflash.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bottomupflash.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bottomupflash.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bottomupflash.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=24&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bottomupflash.wordpress.com/2008/02/03/aha-bindable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Security is Stupid</title>
		<link>http://bottomupflash.wordpress.com/2008/01/30/flash-security-is-stupid/</link>
		<comments>http://bottomupflash.wordpress.com/2008/01/30/flash-security-is-stupid/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 05:46:19 +0000</pubDate>
		<dc:creator>David Barrett</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://bottomupflash.wordpress.com/2008/01/30/flash-security-is-stupid/</guid>
		<description><![CDATA[Whoever invented the Flash security model is an idiot that should be shunned from society. I&#8217;m too tired and frustrated to make the complete argument, but here are some tips: If the web service you want to access is on HTTPS, you need to host the SWF on HTTPS too. The most permissive crossdomain.xml I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=23&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Whoever invented the Flash security model is an idiot that should be shunned from society. I&#8217;m too tired and frustrated to make the complete argument, but here are some tips:</p>
<ol>
<li>If the web service you want to access is on HTTPS, you need to host the SWF on HTTPS too.</li>
<li>The most permissive crossdomain.xml I can figure out how to write is:<br />
  <span style="font-family:'Courier New';">&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
  &lt;cross-domain-policy xmlns:xsi=&#8221;http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:noNamespaceSchemaLocation=&#8221;http://www.adobe.com/xml/schemas/PolicyFile.xsd&#8221;&gt;<br />
  &lt;allow-access-from domain=&#8221;*&#8221;/&gt;<br />
  &lt;site-control permitted-cross-domain-policies=&#8221;all&#8221;/&gt;<br />
  &lt;/cross-domain-policy&gt;</span></li>
<li>When hosting crossdomain.xml, set &#8220;Content-Type&#8221; to &#8220;text/x-cross-domain-policy&#8221;</li>
<li>Just to be safe, also set &#8220;X-Permitted-Cross-Domain-Policies&#8221; to &#8220;all&#8221;</li>
<li>And set &#8220;X-Just-Fucking-Work-Please-Goddamn-You&#8221; to &#8220;true&#8221;. That&#8217;s crucial.</li>
</ol>
<p>After that, it probably still won&#8217;t work for you. You can read this extremely long and boring document here:</p>
<p style="text-align:center;"><a href="http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html">http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html</a></p>
<p>But don&#8217;t bother, because it manages to say utterly fucking nothing in the longest way possible. For more futility, enable Flash logging with the convenient 1842-step process documented here:</p>
<p style="text-align:center;"><a href="http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&amp;file=logging_125_04.html">http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&amp;file=logging_125_04.html</a></p>
<p>If that isn&#8217;t inscrutable enough for you, dial up the pain by enable policy file logging (that&#8217;s right, let&#8217;s give it its own logfile, brilliant!) here:</p>
<p style="text-align:center;"><a href="http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_05.html">http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_05.html</a></p>
<p>Then you too can experience the joy of total confusion and anger at the most retarded security model ever invented.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bottomupflash.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bottomupflash.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bottomupflash.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bottomupflash.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bottomupflash.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bottomupflash.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bottomupflash.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bottomupflash.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bottomupflash.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bottomupflash.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bottomupflash.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bottomupflash.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bottomupflash.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bottomupflash.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bottomupflash.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bottomupflash.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=23&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bottomupflash.wordpress.com/2008/01/30/flash-security-is-stupid/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e3e2093d78d9baa1eaef6c79b0234d72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quinthar</media:title>
		</media:content>
	</item>
		<item>
		<title>Enter the Repeater</title>
		<link>http://bottomupflash.wordpress.com/2008/01/26/enter-the-repeater/</link>
		<comments>http://bottomupflash.wordpress.com/2008/01/26/enter-the-repeater/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 23:48:27 +0000</pubDate>
		<dc:creator>David Barrett</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://bottomupflash.wordpress.com/2008/01/26/enter-the-repeater/</guid>
		<description><![CDATA[So MXML is a slick tool for laying out UI components, but how do you interface the UI and the underlying application data structures? Meet the Repeater: &#60;mx:Application xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221;&#62; &#60;mx:Script&#62; &#60;![CDATA[ public var myArray:Array = [ "Hello", "World" ]; ]]&#62; &#60;/mx:Script&#62; &#60;mx:Repeater id=&#8221;myRepeater&#8221; dataProvider=&#8221;{myArray}&#8221;&#62; &#60;mx:Button label=&#8221;{myRepeater.currentItem}&#8221;/&#62; &#60;/mx:Repeater&#62;&#60;/mx:Application&#62; There&#8217;s a lot going on in that chunk [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=22&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So MXML is a slick tool for laying out UI components, but how do you interface the UI and the underlying application data structures? Meet the Repeater:</p>
<blockquote>
<p><span style="font-family:'Courier New';">&lt;mx:Application xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221;&gt;</span> <span style="font-family:'Courier New';">&lt;mx:Script&gt; &lt;![CDATA[</span> <span style="font-family:'Courier New';">public var myArray:Array = [ "Hello", "World" ];</span> <span style="font-family:'Courier New';">]]&gt; &lt;/mx:Script&gt;</span> <span style="font-family:'Courier New';">&lt;mx:Repeater id=&#8221;myRepeater&#8221; dataProvider=&#8221;{myArray}&#8221;&gt;</span> <span style="font-family:'Courier New';">&lt;mx:Button label=&#8221;{myRepeater.currentItem}&#8221;/&gt;</span> <span style="font-family:'Courier New';">&lt;/mx:Repeater&gt;</span><span style="font-family:'Courier New';">&lt;/mx:Application&gt;</span></p>
</blockquote>
<p>There&#8217;s a lot going on in that chunk of code, so follow along:</p>
<ol>
<li>The &#8220;&lt;mx:Script&gt; &lt;![CDATA[" tag is similar to &lt;?php -- basically, dropping out of XML and into ActionScript.</li>
<li>There, we define a normal array "myArray" containing a couple items.</li>
<li>Then "]]&gt; &lt;/mx:Script&gt;&#8221; drops us back into XML</li>
<li>Next we define the &lt;mx:Repeater&gt; tag, name it, and link it to the &#8220;myArray&#8221; created above</li>
<li>And now the magic: we define a &lt;mx:Button&gt; and set its label equal to the value of the &#8220;currentItem&#8221; of the repeater.</li>
</ol>
<p>Step 5 is the interesting one. Essentially, we define a template that is &#8220;repeated&#8221; for every item of the array. That can be anything. Here, I&#8217;ve made it a button. But it could be a Panel or a big huge compound object, or a custom tag, or whatever. This magic tag bridges the gap between ActionScript data and MXML UI. Cool!</p>
<p><strong>Note:</strong> When you compile the above code you&#8217;ll get the following warning:</p>
<blockquote>
<p><span style="font-family:'Courier New';">Warning: Data binding will not be able to detect assignments to &#8220;myArray</span>&#8220;.</p>
</blockquote>
<p>This is because we&#8217;re using a standard Array object as a &#8220;dataProvider&#8221;. This&#8217;ll work in a bind, except a real data provider would implement the ICollectionView interface, which lets the collection get events when the contents of the collection change. Or, said another way, if you were to modify the Array after the Repeater does its thing, the Repeater won&#8217;t notice and thus won&#8217;t update the UI to match the data structure. But if you were to use a real collection object (such as an ArrayCollection) instead of an Array, then the Repeater would automatically update the UI whenever the collection itself changes.</p>
<p><strong>Also note:</strong> I didn&#8217;t put [bindable] in front of the myArray, as other examples. I&#8217;m not sure what that&#8217;s supposed to do, but it seems to work fine without it.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bottomupflash.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bottomupflash.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bottomupflash.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bottomupflash.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bottomupflash.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bottomupflash.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bottomupflash.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bottomupflash.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bottomupflash.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bottomupflash.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bottomupflash.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bottomupflash.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bottomupflash.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bottomupflash.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bottomupflash.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bottomupflash.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=22&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bottomupflash.wordpress.com/2008/01/26/enter-the-repeater/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e3e2093d78d9baa1eaef6c79b0234d72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quinthar</media:title>
		</media:content>
	</item>
		<item>
		<title>Confounding MXML Namespaces</title>
		<link>http://bottomupflash.wordpress.com/2008/01/25/confounding-mxml-namespaces/</link>
		<comments>http://bottomupflash.wordpress.com/2008/01/25/confounding-mxml-namespaces/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 02:42:10 +0000</pubDate>
		<dc:creator>David Barrett</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://bottomupflash.wordpress.com/2008/01/25/confounding-mxml-namespaces/</guid>
		<description><![CDATA[So I can&#8217;t help but notice every tag but mine starts with &#8220;mx:&#8221; and that &#8220;xmlns:mx=&#8221; is defined in the Application tag. My guess is this is mapping the &#8220;mx&#8221; namespace to definitions contained at &#8220;http://www.adobe.com/2006/mxml&#8221;. Furthermore, because my tag doesn&#8217;t start with anything, that probably means it&#8217;s not in a namespace (or, rather, is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=21&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I can&#8217;t help but notice every tag but mine starts with &#8220;mx:&#8221; and that &#8220;xmlns:mx=&#8221; is defined in the Application tag. My guess is this is mapping the &#8220;mx&#8221; namespace to definitions contained at &#8220;http://www.adobe.com/2006/mxml&#8221;.</p>
<p>Furthermore, because my tag doesn&#8217;t start with anything, that probably means it&#8217;s not in a namespace (or, rather, is in a global namespace). And the line &#8220;xmlns=&#8221; maps the global namespace to &#8220;*&#8221;, which apparently means the current directory. I can confirm these assumptions by updating &#8220;HelloWorld.mxml&#8221; to create my own namespace &#8220;blah&#8221;, and mapping that to the current directory as follows:</p>
<blockquote>
<p><span style="font-family:'Courier New';">&lt;mx:Application xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221; xmlns<span style="color:#FF0000;">:blah</span>=&#8221;*&#8221;&gt;</span><span style="font-family:'Courier New';">&lt;<span style="color:#FF0000;">blah:</span>CustomPanel/&gt;</span><span style="font-family:'Courier New';">&lt;/mx:Application&gt;</span></p>
</blockquote>
<p>Works as you&#8217;d expect. However, I&#8217;m not sure how to put &#8220;blah&#8221; into a subdirectory. If I move &#8220;CustomPanel.mxml&#8221; into a subdirectory named &#8220;subdir/&#8221;, I&#8217;d expect to set &#8220;xmlns:blah=&#8221; to &#8220;subdir&#8221; or &#8220;/subdir&#8221; or &#8220;subdir/*&#8221; or something like that. But nothing works. Hm&#8230; Ah, here we go:</p>
<blockquote>
<p><span style="font-family:'Courier New';"><span style="color:black;">&lt;mx:Application xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221; xmlns:blah=</span><span style="color:#FF0000;">&#8220;subdir.*&#8221;</span><span style="color:black;">&gt;</span></span><span style="font-family:'Courier New';"><span style="color:black;">&lt;blah:CustomPanel/&gt;</span></span><span style="font-family:'Courier New';"><span style="color:black;">&lt;/mx:Application&gt;</span></span></p>
</blockquote>
<p>Not sure why languages love to get fancy and use dots instead of slashes, but so be it.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bottomupflash.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bottomupflash.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bottomupflash.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bottomupflash.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bottomupflash.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bottomupflash.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bottomupflash.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bottomupflash.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bottomupflash.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bottomupflash.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bottomupflash.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bottomupflash.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bottomupflash.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bottomupflash.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bottomupflash.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bottomupflash.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=21&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bottomupflash.wordpress.com/2008/01/25/confounding-mxml-namespaces/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e3e2093d78d9baa1eaef6c79b0234d72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quinthar</media:title>
		</media:content>
	</item>
		<item>
		<title>Custom MXML Tags</title>
		<link>http://bottomupflash.wordpress.com/2008/01/25/custom-mxml-tags/</link>
		<comments>http://bottomupflash.wordpress.com/2008/01/25/custom-mxml-tags/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 02:18:24 +0000</pubDate>
		<dc:creator>David Barrett</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://bottomupflash.wordpress.com/2008/01/25/custom-mxml-tags/</guid>
		<description><![CDATA[Ok, MXML is pretty sweet. We can make the panel tag in our HelloWorld application into a custom tag by simply creating a new file in the same directory as &#8220;HelloWorld.mxml&#8221; named &#8220;CustomPanel.mxml&#8221;: &#60;mx:Panel xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221; title=&#8221;Hello world!&#8221; width=&#8221;100%&#8221; height=&#8221;100%&#8221;/&#62; And let&#8217;s update &#8220;HelloWorld.mxml&#8221; to be: (Note the addition of the &#8220;xmlns=&#8221; attribute in the first [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=20&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ok, MXML is pretty sweet. We can make the panel tag in our HelloWorld application into a custom tag by simply creating a new file in the same directory as &#8220;HelloWorld.mxml&#8221; named &#8220;CustomPanel.mxml&#8221;:</p>
<blockquote><p>
  <span style="font-family:'Courier New';">&lt;mx:Panel xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221; title=&#8221;Hello world!&#8221; width=&#8221;100%&#8221; height=&#8221;100%&#8221;/&gt;</span>
</p></blockquote>
<p>And let&#8217;s update &#8220;HelloWorld.mxml&#8221; to be: (Note the addition of the &#8220;xmlns=&#8221; attribute in the first line)</p>
<blockquote>
<p><span style="font-family:'Courier New';">&lt;mx:Application xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221; xmlns=&#8221;*&#8221;&gt;<br /></span><span style="font-family:'Courier New';">&lt;CustomPanel/&gt;<br /></span><span style="font-family:'Courier New';">&lt;/mx:Application&gt;</span></p>
</blockquote>
<p>Compile it same as before, and it&#8217;ll spit out a &#8220;HelloWorld.swf&#8221; that works exactly like before.</p>
<p>So, a couple interesting things are happening here:</p>
<ul>
<li>You can create custom MXML tags with ease: just create a .MXML file with the name of the tag, and you&#8217;re done.</li>
<li>The &lt;?xml?&gt; tag on the first line is optional. I&#8217;m sure people will scream at me, but in my book that means leave it out.</li>
<li>The Adobe-supplied tags all start with &#8220;mx:&#8221;, whereas your custom tags don&#8217;t.</li>
</ul>
<p>Pretty slick! Next up are namespaces, which I&#8217;ll talk about once I figure them out.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bottomupflash.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bottomupflash.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bottomupflash.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bottomupflash.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bottomupflash.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bottomupflash.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bottomupflash.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bottomupflash.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bottomupflash.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bottomupflash.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bottomupflash.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bottomupflash.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bottomupflash.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bottomupflash.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bottomupflash.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bottomupflash.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bottomupflash.wordpress.com&amp;blog=1006658&amp;post=20&amp;subd=bottomupflash&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bottomupflash.wordpress.com/2008/01/25/custom-mxml-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e3e2093d78d9baa1eaef6c79b0234d72?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quinthar</media:title>
		</media:content>
	</item>
	</channel>
</rss>
