<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: As3 Flip Vertical and Flip Horizontal</title>
	<atom:link href="http://www.dreaminginflash.com/2008/06/11/as3-flip-vertical-and-flip-horizontal/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dreaminginflash.com/2008/06/11/as3-flip-vertical-and-flip-horizontal/</link>
	<description>There is no universally agreed-upon biological definition of dreaming</description>
	<lastBuildDate>Fri, 21 Oct 2011 17:05:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Salman Sohail</title>
		<link>http://www.dreaminginflash.com/2008/06/11/as3-flip-vertical-and-flip-horizontal/comment-page-1/#comment-1256</link>
		<dc:creator>Salman Sohail</dc:creator>
		<pubDate>Tue, 26 Jul 2011 05:47:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/?p=147#comment-1256</guid>
		<description>Appriciate your work...Please use this for toggle flip :


public function flipHorizontal(event:Event):void
		{
			var matrix:Matrix = selectedGraphic.transform.matrix;
			trace(matrix.a);
			if(matrix.a == 1)
			{
				matrix.a=-1;
			}
			else
			{
				matrix.a=1;
			}			
			
			selectedGraphic.transform.matrix=matrix;
		}
				
		public function flipVertical(event:Event):void
		{
			
			var matrix:Matrix = selectedGraphic.transform.matrix;
			if(matrix.d == 1)
			{
				matrix.d=-1;
			}
			else
			{
				matrix.d=1;
			}
			
			
			selectedGraphic.transform.matrix=matrix;
		}</description>
		<content:encoded><![CDATA[<p>Appriciate your work&#8230;Please use this for toggle flip :</p>
<p>public function flipHorizontal(event:Event):void<br />
		{<br />
			var matrix:Matrix = selectedGraphic.transform.matrix;<br />
			trace(matrix.a);<br />
			if(matrix.a == 1)<br />
			{<br />
				matrix.a=-1;<br />
			}<br />
			else<br />
			{<br />
				matrix.a=1;<br />
			}			</p>
<p>			selectedGraphic.transform.matrix=matrix;<br />
		}</p>
<p>		public function flipVertical(event:Event):void<br />
		{</p>
<p>			var matrix:Matrix = selectedGraphic.transform.matrix;<br />
			if(matrix.d == 1)<br />
			{<br />
				matrix.d=-1;<br />
			}<br />
			else<br />
			{<br />
				matrix.d=1;<br />
			}</p>
<p>			selectedGraphic.transform.matrix=matrix;<br />
		}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giovanni</title>
		<link>http://www.dreaminginflash.com/2008/06/11/as3-flip-vertical-and-flip-horizontal/comment-page-1/#comment-1160</link>
		<dc:creator>Giovanni</dc:creator>
		<pubDate>Wed, 15 Dec 2010 00:55:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/?p=147#comment-1160</guid>
		<description>Thanks! It worked smoothly!</description>
		<content:encoded><![CDATA[<p>Thanks! It worked smoothly!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davidpaulrosser</title>
		<link>http://www.dreaminginflash.com/2008/06/11/as3-flip-vertical-and-flip-horizontal/comment-page-1/#comment-1115</link>
		<dc:creator>davidpaulrosser</dc:creator>
		<pubDate>Sun, 27 Jun 2010 11:23:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/?p=147#comment-1115</guid>
		<description>Thanks, just what I was looking for!</description>
		<content:encoded><![CDATA[<p>Thanks, just what I was looking for!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Danny</title>
		<link>http://www.dreaminginflash.com/2008/06/11/as3-flip-vertical-and-flip-horizontal/comment-page-1/#comment-1109</link>
		<dc:creator>Danny</dc:creator>
		<pubDate>Thu, 06 May 2010 12:50:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/?p=147#comment-1109</guid>
		<description>Fantastic!!

Thank you very much :)</description>
		<content:encoded><![CDATA[<p>Fantastic!!</p>
<p>Thank you very much <img src='http://www.dreaminginflash.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: underblob &#187; AS3 Flip Horizontal/Vertical</title>
		<link>http://www.dreaminginflash.com/2008/06/11/as3-flip-vertical-and-flip-horizontal/comment-page-1/#comment-1078</link>
		<dc:creator>underblob &#187; AS3 Flip Horizontal/Vertical</dc:creator>
		<pubDate>Tue, 16 Feb 2010 19:21:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/?p=147#comment-1078</guid>
		<description>[...] dreaminginflash.com   Comments (0) [...]</description>
		<content:encoded><![CDATA[<div style="padding: 1em; background: #fbfbfb; border: 1px solid #457AA5;">
<p>[...] dreaminginflash.com   Comments (0) [...]</p>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: gm</title>
		<link>http://www.dreaminginflash.com/2008/06/11/as3-flip-vertical-and-flip-horizontal/comment-page-1/#comment-822</link>
		<dc:creator>gm</dc:creator>
		<pubDate>Thu, 05 Mar 2009 06:19:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/?p=147#comment-822</guid>
		<description>Can anybody help in maintaining the same position while flipping.</description>
		<content:encoded><![CDATA[<p>Can anybody help in maintaining the same position while flipping.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Brito</title>
		<link>http://www.dreaminginflash.com/2008/06/11/as3-flip-vertical-and-flip-horizontal/comment-page-1/#comment-560</link>
		<dc:creator>Eric Brito</dc:creator>
		<pubDate>Fri, 24 Oct 2008 19:34:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/?p=147#comment-560</guid>
		<description>Does anyone know how the Michael&#039;s code woulde be if the image had a bigger or smaller scale and a rotation angle?</description>
		<content:encoded><![CDATA[<p>Does anyone know how the Michael&#8217;s code woulde be if the image had a bigger or smaller scale and a rotation angle?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.dreaminginflash.com/2008/06/11/as3-flip-vertical-and-flip-horizontal/comment-page-1/#comment-456</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Wed, 27 Aug 2008 12:49:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/?p=147#comment-456</guid>
		<description>to switch back and forth, use this:

function flipHorizontal(dsp:DisplayObject):void
{
	var matrix:Matrix = dsp.transform.matrix;
	//matrix.a = -1;
	matrix.a *= -1;
	//matrix.tx = dsp.width + dsp.x;
	matrix.tx = -matrix.a * dsp.width + dsp.x;
	dsp.transform.matrix = matrix;
}
		
function flipVertical(dsp:DisplayObject):void
{
	var matrix:Matrix = dsp.transform.matrix;
	//matrix.d = -1;
	matrix.d *= -1;
	matrix.ty = -matrix.d * dsp.height + dsp.y;
	//matrix.ty = dsp.height + dsp.y;
	dsp.transform.matrix = matrix;
}</description>
		<content:encoded><![CDATA[<p>to switch back and forth, use this:</p>
<p>function flipHorizontal(dsp:DisplayObject):void<br />
{<br />
	var matrix:Matrix = dsp.transform.matrix;<br />
	//matrix.a = -1;<br />
	matrix.a *= -1;<br />
	//matrix.tx = dsp.width + dsp.x;<br />
	matrix.tx = -matrix.a * dsp.width + dsp.x;<br />
	dsp.transform.matrix = matrix;<br />
}</p>
<p>function flipVertical(dsp:DisplayObject):void<br />
{<br />
	var matrix:Matrix = dsp.transform.matrix;<br />
	//matrix.d = -1;<br />
	matrix.d *= -1;<br />
	matrix.ty = -matrix.d * dsp.height + dsp.y;<br />
	//matrix.ty = dsp.height + dsp.y;<br />
	dsp.transform.matrix = matrix;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: g</title>
		<link>http://www.dreaminginflash.com/2008/06/11/as3-flip-vertical-and-flip-horizontal/comment-page-1/#comment-449</link>
		<dc:creator>g</dc:creator>
		<pubDate>Mon, 18 Aug 2008 23:59:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/?p=147#comment-449</guid>
		<description>xleon,

Your method doesn&#039;t work with video, while the others do.</description>
		<content:encoded><![CDATA[<p>xleon,</p>
<p>Your method doesn&#8217;t work with video, while the others do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xleon</title>
		<link>http://www.dreaminginflash.com/2008/06/11/as3-flip-vertical-and-flip-horizontal/comment-page-1/#comment-446</link>
		<dc:creator>xleon</dc:creator>
		<pubDate>Fri, 15 Aug 2008 14:36:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/?p=147#comment-446</guid>
		<description>Hi, IÂ´m not sure what your code does, but I think itÂ´s easier like this:

vertical: 
dsp.scaleY = -dsp.scaleY;

horizontal: 
dsp.scaleX = -dsp.scaleX;</description>
		<content:encoded><![CDATA[<p>Hi, IÂ´m not sure what your code does, but I think itÂ´s easier like this:</p>
<p>vertical:<br />
dsp.scaleY = -dsp.scaleY;</p>
<p>horizontal:<br />
dsp.scaleX = -dsp.scaleX;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

