<?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>Flassari.is &#187; error</title>
	<atom:link href="http://flassari.is/tag/error/feed/" rel="self" type="application/rss+xml" />
	<link>http://flassari.is</link>
	<description></description>
	<lastBuildDate>Sat, 28 Jan 2012 08:17:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Error #3692: All buffers need to be cleared every frame before drawing</title>
		<link>http://flassari.is/2011/11/error-3692-all-buffers-need-to-be-cleared-every-frame-before-drawing/</link>
		<comments>http://flassari.is/2011/11/error-3692-all-buffers-need-to-be-cleared-every-frame-before-drawing/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 09:12:26 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[3692]]></category>
		<category><![CDATA[bitmap]]></category>
		<category><![CDATA[bitmapdata]]></category>
		<category><![CDATA[buffer]]></category>
		<category><![CDATA[buffers]]></category>
		<category><![CDATA[context3d]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[Starling]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=457</guid>
		<description><![CDATA[So I have this Starling project and wanted to take a screenshot of the Stage3D currently in use. I was trying to use the Context3D.drawToBitmapData() function and kept getting this error: &#8220;Error #3692: All buffers need to be cleared every frame before drawing.&#8221; Googling around yielded no results, so after figuring out the problem I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>So I have this Starling project and wanted to take a screenshot of the Stage3D currently in use.<br />
I was trying to use the Context3D.drawToBitmapData() function and kept getting this error:<br />
&#8220;Error #3692: All buffers need to be cleared every frame before drawing.&#8221;</p>
<p>Googling around yielded no results, so after figuring out the problem I&#8217;m posting the solution here for anyone else having this problem.</p>
<p>The solution is short: you have to call drawToBitmapData() BEFORE the Context3D.present() call.</p>
<p>In my case with Starling I had to add the functionality in the Starling.render() function, between the call to mStage.render() and the call to mContext.present().</p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2011/11/error-3692-all-buffers-need-to-be-cleared-every-frame-before-drawing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mxmlc ANT compiler error: &#8220;Error: Java heap space&#8221;</title>
		<link>http://flassari.is/2011/09/mxmlc-ant-compiler-error-error-java-heap-space/</link>
		<comments>http://flassari.is/2011/09/mxmlc-ant-compiler-error-error-java-heap-space/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 12:34:08 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[ANT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[ANT_OPTS]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fork]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java heap space]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[maxmemory]]></category>
		<category><![CDATA[mxmlc]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=441</guid>
		<description><![CDATA[A simple error that causes a lot of headache that has a simple solution that is hard to find on the internet. Don&#8217;t you just love these problems? If you are calling mxmlc via ANT you&#8217;ve probably seen this error and had to resort to solutions like setting the ANT_OPTS or Java arguments for the [...]]]></description>
			<content:encoded><![CDATA[<p>A simple error that causes a lot of headache that has a simple solution that is hard to find on the internet.<br />
Don&#8217;t you just love these problems?</p>
<p>If you are calling mxmlc via ANT you&#8217;ve probably seen this error and had to resort to solutions like setting the ANT_OPTS or Java arguments for the SDK on every single computer that uses that build script.</p>
<p>The solution is actually much simpler than that, mxmlc allows you to set this in the ANT target itself. Just add the parameters fork=&#8221;true&#8221; to make it run on it&#8217;s own Java thread, and then set maxmemory to something like &#8220;1024m&#8221;.</p>
<pre class="brush: as3"><mxmlc
	file="Main.as"
	output="Output.swf"
	fork="true"
	maxmemory="1024m"
>
	<!-- Other configurations -->
</mxmlc></pre>
<p>It would have been nice if adobe had this in the <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=anttasks_1.html">documentation</a>, but no such luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2011/09/mxmlc-ant-compiler-error-error-java-heap-space/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Global error handling with Flash Player 10.1</title>
		<link>http://flassari.is/2010/06/global-error-handling-with-flash-player-10-1/</link>
		<comments>http://flassari.is/2010/06/global-error-handling-with-flash-player-10-1/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 12:25:44 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[10.1]]></category>
		<category><![CDATA[4.1]]></category>
		<category><![CDATA[as]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[exception]]></category>
		<category><![CDATA[global]]></category>
		<category><![CDATA[handler]]></category>
		<category><![CDATA[handling]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[SDK]]></category>
		<category><![CDATA[uncaught]]></category>
		<category><![CDATA[uncaughtError]]></category>
		<category><![CDATA[uncaughterrorhandler]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=303</guid>
		<description><![CDATA[Since the official release of Flash Player 10.1 is out, now might be a good time to start implementing the global error handler.

When this is written, flash builder 4 doesn't have a native way that lets you use it, so we have to do a little mix.
The global error handler works by adding an event to the uncaughtErrorEvents property of the loaderInfo of the application.
There are currently two methods of getting it to work [...] ]]></description>
			<content:encoded><![CDATA[<p>Since the official release of Flash Player 10.1 is out, now might be a good time to start implementing the global error handler.</p>
<p>When this is written, flash builder 4 doesn&#8217;t have a native way that lets you use it, so we have to do a little mix.<strong> (Update: The update is out.)</strong><br />
The global error handler works by adding an event to the uncaughtErrorEvents property of the loaderInfo of the application.<br />
There are currently two methods of getting it to work.</p>
<h3>Method 1 - The backwards compatible one:</h3>
<p>Here the code doesn&#8217;t crash in flash player 9/10, but the error handling will only work in 10.1.</p>
<pre class="brush: as3">if(loaderInfo.hasOwnProperty("uncaughtErrorEvents")){
	IEventDispatcher(loaderInfo["uncaughtErrorEvents"]) .addEventListener("uncaughtError", uncaughtErrorHandler);
}</pre>
<pre class="brush: as3">private function uncaughtErrorHandler(e:Event):void {
	trace("Global error:", e);
}</pre>
<h3>Method 2 - The type safe one:</h3>
<p>Get the <a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4">Flex 4.1 SDK</a> if you haven&#8217;t already and choose that one as your project&#8217;s SDK.</p>
<p>Now you can use the new global error handling like it was meant to be used:</p>
<pre class="brush: as3">import flash.events.UncaughtErrorEvent;

loaderInfo.uncaughtErrorEvents.addEventListener( UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorHandler);

private function uncaughtErrorHandler( e:UncaughtErrorEvent):void {
	trace("Global error:", e);
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2010/06/global-error-handling-with-flash-player-10-1/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

