<?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>Tiffany B. Brown &#187; flash and xml</title>
	<atom:link href="http://tiffanybbrown.com/tag/flash-and-xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://tiffanybbrown.com</link>
	<description>A web log about web development and internet culture with frequent detours into other stuff.</description>
	<lastBuildDate>Wed, 23 May 2012 16:23:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Debugging Flash applications with Firefox extensions</title>
		<link>http://tiffanybbrown.com/2009/05/01/debugging-flash-applications-with-firefox-extensions/</link>
		<comments>http://tiffanybbrown.com/2009/05/01/debugging-flash-applications-with-firefox-extensions/#comments</comments>
		<pubDate>Fri, 01 May 2009 11:00:18 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Web Development & Programming]]></category>
		<category><![CDATA[Alessandro Crugnola]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[externalinterface]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[flash and xml]]></category>
		<category><![CDATA[flash tracer]]></category>
		<category><![CDATA[livehttpheaders]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1969</guid>
		<description><![CDATA[Using ExternalInterface and Firebug Lately, the day job has had me busting booty on a Flash/ActionScript project that makes considerable use of the ExternalInterface class. ExternalInterface allows Flash to communicate with its HTML container using JavaScript. It&#8217;s a groovy feature, but one that changes the development process a bit. Unlike straight-up Flash development, ExternalInterface requires [...]]]></description>
			<content:encoded><![CDATA[<h3>Using ExternalInterface and Firebug</h3>
<p><img src="http://www.tiffanybbrown.com/images/firebug.png" alt="Firebug logo" style="float:right; margin: 0 0 1em 1em;" /><br />
Lately, the <a href="http://armchairmedia.com/">day job</a> has had me busting booty on a Flash/ActionScript project that makes considerable use of the <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html">ExternalInterface</a> class. </p>
<p>ExternalInterface allows Flash to communicate with its HTML container using JavaScript. It&#8217;s a groovy feature, but one that changes the development process a bit. Unlike straight-up Flash development, ExternalInterface requires you to test interaction between the movie and its container. </p>
<p>One way to do this is using the <a href="http://getfirebug.com/logging.html">Firebug console</a>. Set up a simple debug function embedded in your HTML or in an external JavaScript file: <code>function debug(data){ console.log(data); }</code>. Then pass troubleshooting data to it using <code>ExternalInterface.call('debug','data you want to write');</code> just as you would with <code>trace()</code>. </p>
<p>I even used this technique to dump XML data to the console. Works amazingly well.</p>
<p>A minor drawback: compiler errors won&#8217;t be written to the console. Instead you will see a generic error message, and your movie won&#8217;t load. </p>
<h3>Using Flash Tracer</h3>
<div class="video">
	<img src="http://www.tiffanybbrown.com/images/flashtracer.gif" alt="Image of Flash Tracer" />
</div>
<p>For a more robust option, try <a href="http://www.sephiroth.it/firefox/flashtracer/">Flash Tracer</a>, a Firefox extension by Alessandro Crugnola. Flash Tracer uses native Flash logging to deliver <code>trace()</code> messages directly to the browser. To use it, you&#8217;ll need to install a <a href="http://www.adobe.com/support/flashplayer/downloads.html">debug version</a> of the Flash Player.</p>
<h3>Using LiveHTTPHeaders</h3>
<p>Sometimes when sending and receiving data to and from a server, you can&#8217;t tell what&#8217;s wrong by looking at your Flash application. There could be an error in your server side code. Or perhaps there&#8217;s a problem with the data you&#8217;re sending. This is where <a href="https://addons.mozilla.org/en-US/firefox/addon/3829">LiveHTTPHeaders</a> comes in handy. </p>
<p>LiveHTTPHeaders shows both browser-and-Flash request headers and server response headers. It also sends encoded GET and POST data from HTML forms or ActionScript <code>URLRequest()</code> / <code>URLVariables()</code> / <code>URLLoader()</code> operations. </p>
<p>This extension won&#8217;t show the actual data the server has returned. But you can use it to spot things like <a href="http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/">invisible line break characters</a> and internal server errors.</p>
<h3>Related posts:</h3>
<ul>
<li><a href="http://tiffanybbrown.com/2006/07/13/essential-firefox-plug-ins/">Essential Firefox Extensions</a></li>
<li><a href="http://tiffanybbrown.com/2007/08/09/firefox-extensions/">My new favorite Firefox extensions</a></li>
<li><a href="http://tiffanybbrown.com/2008/05/09/clearing-loadvars-in-actionscript/">Clearing LoadVars() in ActionScript</a></li>
<li><a href="http://tiffanybbrown.com/2007/07/23/visited-links-in-flash/">OurIndustryIsBroken.com: Tracking site users and traffic with PHP, MySQL and ActionScript</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2009/05/01/debugging-flash-applications-with-firefox-extensions/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>

