<?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>Blue Flex &#187; rotations</title>
	<atom:link href="http://kennethsutherland.com/tag/rotations/feed/" rel="self" type="application/rss+xml" />
	<link>http://kennethsutherland.com</link>
	<description>Flex with a hint of cool</description>
	<lastBuildDate>Wed, 18 Apr 2012 21:22:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Fuzzy graphics after rotations</title>
		<link>http://kennethsutherland.com/2009/04/16/fuzzy-graphics-after-rotations/</link>
		<comments>http://kennethsutherland.com/2009/04/16/fuzzy-graphics-after-rotations/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 23:39:10 +0000</pubDate>
		<dc:creator>Kenneth</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[fuzzy]]></category>
		<category><![CDATA[rotations]]></category>

		<guid isPermaLink="false">http://kennethsutherland.com/?p=117</guid>
		<description><![CDATA[How to restore the rotated containers visuals after its been transformed/rotated.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever set the martix3D &amp; Z position for a flex object you&#8217;ll have noticed that as soon as you do it loses its sharpness.  <span>This is especially noticeable </span>if you&#8217;re container/object has text in it.</p>
<p> </p>
<p>Well here are the few simple steps to make sure that when you need you&#8217;re object to get its &#8216;sharpness&#8217; back you can.</p>
<ol>
<li>Before you set the Z property and while the matrix3D is null take a copy of the objects matrix.  You can do this by accessing object.transform.matrix, note as soon as you set the Z property the matrix3D will go from being null to being set and the matrix value will end up becoming null.</li>
<li>If using a tween or similar to go between a certain value (rotation) and 0 then I found that unless you <span>explicitly </span>use the value 0 in the end tween function that it may set the end value as 0.0001 or <span>something </span>very close to 0.  This will not be enough, so in the end tween function I always <span>explicitly </span>set the value to whatever I want it to be at the end.  e.g. if my tween was something like Tween(this , 90, 0) then in the onTweenEnd() I make sure that the value is 0 (rather than just using the value passed into the end function &#8211; which may or may not be exaclty 0).</li>
<li>As soon as the rotation value is 0, then I set the Z property to NaN, then set the object.transform.martrix3D to null and finally I make the object.transform.matrix = the previously copied matrix.</li>
<li>As soon as you copy the matrix to the transform.matrix property you should see your object become sharp again.</li>
<li>Thats it <img src='http://kennethsutherland.com/wordpress1/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</li>
</ol>
<p style="text-align: center;"><img class="aligncenter" title="Fuzzy canvas" src="/images/fuzzy.png" alt="" width="599" height="298" /></p>
<p>Hope this helps a bit.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7396620608505330";
google_ad_slot = "1277482570";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://kennethsutherland.com/2009/04/16/fuzzy-graphics-after-rotations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Side effect from cube effect</title>
		<link>http://kennethsutherland.com/2009/04/14/side-effect-from-cube-effect/</link>
		<comments>http://kennethsutherland.com/2009/04/14/side-effect-from-cube-effect/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 20:01:59 +0000</pubDate>
		<dc:creator>Kenneth</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Cos]]></category>
		<category><![CDATA[flash 10]]></category>
		<category><![CDATA[rotations]]></category>
		<category><![CDATA[Sin]]></category>

		<guid isPermaLink="false">http://kennethsutherland.com/?p=100</guid>
		<description><![CDATA[What happens when you get a Sin() and a Cos() mixed up when playing in 3D space.]]></description>
			<content:encoded><![CDATA[<p>Well I&#8217;ve been working on creating some cube style effects at my work and in particular an actionscript project that will take any number of containers and then rotate them in a cube style using the new flash 10 libaries.</p>
<p>Anyway I got a Sin() mixed up for a Cos() and the following effect happened which I thought was quite a cool effect. Ignore the colours and its roughness it&#8217;s just a prototype swf but I thought I stick it up just to show the side effect that I never expected <img src='http://kennethsutherland.com/wordpress1/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Not Expected</h3>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_WrongWay_1767361285"
			class="flashmovie"
			width="600"
			height="500">
	<param name="movie" value="/flex/3d_experiment_wrong/WrongWay.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/flex/3d_experiment_wrong/WrongWay.swf"
			name="fm_WrongWay_1767361285"
			width="600"
			height="500">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p> </p>
<p> </p>
<h3>Expected</h3>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_CorrectWay_1460905168"
			class="flashmovie"
			width="600"
			height="500">
	<param name="movie" value="/flex/3d_experiment_wrong/CorrectWay.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/flex/3d_experiment_wrong/CorrectWay.swf"
			name="fm_CorrectWay_1460905168"
			width="600"
			height="500">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p> </p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7396620608505330";
google_ad_slot = "1277482570";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://kennethsutherland.com/2009/04/14/side-effect-from-cube-effect/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

