<?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>undefined-type &#187; debug</title>
	<atom:link href="http://undefined-type.com/tag/debug/feed/" rel="self" type="application/rss+xml" />
	<link>http://undefined-type.com</link>
	<description>Flex,Flash &#38; AIR</description>
	<lastBuildDate>Wed, 18 Nov 2009 09:48:23 +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>Screendump my Stage</title>
		<link>http://undefined-type.com/2009/11/screendump-my-stage/</link>
		<comments>http://undefined-type.com/2009/11/screendump-my-stage/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 09:48:23 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[screendump]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=601</guid>
		<description><![CDATA[Often in bug testing phase or just to show something it&#8217;s a tideus work to screendump your screen and it get as well a problem if you are dependent by the transparency.
Wrote a small debug class that takes a screen dump of the stage and puts the file on a server (PHP).
So put this PHP [...]]]></description>
			<content:encoded><![CDATA[<p>Often in bug testing phase or just to show something it&#8217;s a tideus work to screendump your screen and it get as well a problem if you are dependent by the transparency.</p>
<p>Wrote a small debug class that takes a screen dump of the stage and puts the file on a server (PHP).</p>
<p>So put this PHP on a server somewhere.<br />
<code><br />
&lt;?php<br />
$png = $GLOBALS["HTTP_RAW_POST_DATA"];<br />
$name = date('Y-m-d H.i.s');<br />
$filename = $name.'.png';<br />
file_put_contents($filename, $png);<br />
?&gt;<br />
</code></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;?php</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$jpg = $GLOBALS["HTTP_RAW_POST_DATA"];</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$name = date(&#8216;Y-m-d H.i.s&#8217;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$filename = $name.&#8217;.png&#8217;;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">file_put_contents($filename, $jpg);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">?&gt;</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;?php</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$jpg = $GLOBALS["HTTP_RAW_POST_DATA"];</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$name = date(&#8216;Y-m-d H.i.s&#8217;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$filename = $name.&#8217;.png&#8217;;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">file_put_contents($filename, $jpg);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">?&gt;</div>
</div>
<p>Then you can add this class to you project, required is the adobe core package (<a href="http://code.google.com/p/as3corelib/" target="_blank">http://code.google.com/p/as3corelib/</a>).<br />
<a href="http://undefined-type.com/wp-content/uploads/2009/11/Screendump.as">Download Screendump.as</a></p>
<p>To use it first set the URI and stage<br />
<span style="font-family: Monaco, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: normal; font-size: 11px;">Screendump.stage = <span style="color: #2529fd;">this</span>.stage;<br />
<span style="color: #b20000;"><span style="color: #000000;">Screendump.URI = </span>&#8220;http://localhost:8888/screendump/dump.php&#8221;<span style="color: #000000;">;</span></span></span></p>
<p>After that whenever you need to take a dump, run<br />
<span style="font-family: Monaco, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: normal; font-size: 11px;">Screendump.takeDump();</span></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/11/screendump-my-stage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

