<?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>Big Bad Code &#187; xray</title>
	<atom:link href="http://bigbadcode.com/category/xray/feed/" rel="self" type="application/rss+xml" />
	<link>http://bigbadcode.com</link>
	<description>Don't blame me, I voted for Kodos</description>
	<lastBuildDate>Wed, 19 Aug 2009 21:49:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>XRay Logging with AS3</title>
		<link>http://bigbadcode.com/2007/10/30/xray-logging-with-as3/</link>
		<comments>http://bigbadcode.com/2007/10/30/xray-logging-with-as3/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 23:55:24 +0000</pubDate>
		<dc:creator>jbloom</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[xray]]></category>

		<guid isPermaLink="false">http://bigbadcode.com/2007/10/30/xray-logging-with-as3/</guid>
		<description><![CDATA[Using Xray you can utilize logging in your AS3 development in a nice clean manner. One of the great benefits here is that your logging/debugging process can be the same when developing locally and when you are running on your development and production servers.
To get started download the latest xray code from their SVN repository.
http://code.google.com/p/osflash-xray/source
Then [...]]]></description>
			<content:encoded><![CDATA[<p>Using <a href="http://osflash.org/xray">Xray</a> you can utilize logging in your AS3 development in a nice clean manner. One of the great benefits here is that your logging/debugging process can be the same when developing locally <strong>and</strong> when you are running on your development and production servers.</p>
<p>To get started download the latest xray code from their SVN repository.<br />
<a href="http://code.google.com/p/osflash-xray/source">http://code.google.com/p/osflash-xray/source</a></p>
<p>Then create a new AS3 flash document using the code below as the document class:<br />
Make sure that you add the &#8216;trunk&#8217; directory that you downloaded to your class path (so flash can find the xray files)</p>
<p>Once you are compiling correctly, launch the xray viewer in a browser from <a href="http://www.rockonflash.com/xray/flex/Xray.html">http://www.rockonflash.com/xray/flex/Xray.html</a>. You will get a notification about not finding a SWF to connect with, ignore this for now (full xray support is not yet therefor AS3 projects). Make sure that the Show Output checkbox along the bottom is checked.</p>
<p>Now if you click the red square in your swf player, you should see the following show up in the XRay viewer windows.</p>
<p>Congratulations you are now logging. Big thanks to <a href="http://rockonflash.com/blog/">John Grden </a> and everyone else contributing to Flash development methodologies.</p>
<p><a href="http://bigbadcode.com/wp-content/uploads/2007/10/picture-4.png" title="picture-4.png"><img src="http://bigbadcode.com/wp-content/uploads/2007/10/picture-4.thumbnail.png" alt="picture-4.png" /></a></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">package <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">blitzagency</span>.<span style="color: #006600;">xray</span>.<span style="color: #006600;">logger</span>.<span style="color: #006600;">XrayLog</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> testLoggingAS <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">log</span>:XrayLog = <span style="color: #000000; font-weight: bold;">new</span> XrayLog<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> mc:<span style="color: #0066CC;">MovieClip</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> testLoggingAS<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">log</span>.<span style="color: #006600;">debug</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Application starting up&quot;</span><span style="color: #66cc66;">&#41;</span>;
			createClickableMovieClip<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #0066CC;">log</span>.<span style="color: #006600;">debug</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Application has completed startup&quot;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> showTheClick<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">log</span>.<span style="color: #006600;">debug</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Square was clicked. Tracing out the Event&quot;</span>, <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">e</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createClickableMovieClip<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			mc = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">MovieClip</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			mc.<span style="color: #0066CC;">name</span> = <span style="color: #ff0000;">&quot;ClickableMovieClip&quot;</span>
			mc.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0xFF0000<span style="color: #66cc66;">&#41;</span>;
			mc.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span>0, 0, <span style="color: #cc66cc;">100</span>, <span style="color: #cc66cc;">80</span><span style="color: #66cc66;">&#41;</span>;
			mc.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			mc.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">80</span>;
			mc.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">60</span>;
			addChild<span style="color: #66cc66;">&#40;</span>mc<span style="color: #66cc66;">&#41;</span>;
			mc.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, showTheClick<span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://bigbadcode.com/2007/10/30/xray-logging-with-as3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
