<?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: Rotating images using the Rotate class</title>
	<atom:link href="http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sat, 11 Feb 2012 11:51:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Circass</title>
		<link>http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/comment-page-1/#comment-8214</link>
		<dc:creator>Circass</dc:creator>
		<pubDate>Wed, 11 Aug 2010 05:59:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/#comment-8214</guid>
		<description>Hello,
i am trying to rotate my image which is a child of my view panel.
I wrote something like that :

var rotate:mx.effects.Rotate = new mx.effects.Rotate();
//var iTmp:Image = new Image();
//iTmp = viewerPanel.getChildAt(0) as Image;
rotate.target= viewerPanel.getChildAt(0);
rotate.angleFrom=viewerPanel.getChildAt(0).rotation;
rotate.angleTo=viewerPanel.getChildAt(0).rotation – 90;
rotate.duration=1000;
rotate.originX=viewerPanel.getChildAt(0).width/2;
rotate.originY=viewerPanel.getChildAt(0).height/2;
rotate.play();

it rotates the panel from top left.

then i wrote something like that :
var iTmp:Image = new Image();
iTmp = viewerPanel.getChildAt(0) as Image;
var q:Number = 90 * Math.PI / 180 // 30 degrees in radians
var m:Matrix = new Matrix();
var centerX:Number = iTmp.width / 2;
var centerY:Number = iTmp.height /2;
m.translate(-1 * centerX, -1 * centerY);
m.rotate(q);
viewerPanel.removeChildAt(0);
viewerPanel.addChild(iTmp);
and this made the same thing.

So How can i rotate an image which is added to a panel as a child ?
Thank you.</description>
		<content:encoded><![CDATA[<p>Hello,<br />
i am trying to rotate my image which is a child of my view panel.<br />
I wrote something like that :</p>
<p>var rotate:mx.effects.Rotate = new mx.effects.Rotate();<br />
//var iTmp:Image = new Image();<br />
//iTmp = viewerPanel.getChildAt(0) as Image;<br />
rotate.target= viewerPanel.getChildAt(0);<br />
rotate.angleFrom=viewerPanel.getChildAt(0).rotation;<br />
rotate.angleTo=viewerPanel.getChildAt(0).rotation – 90;<br />
rotate.duration=1000;<br />
rotate.originX=viewerPanel.getChildAt(0).width/2;<br />
rotate.originY=viewerPanel.getChildAt(0).height/2;<br />
rotate.play();</p>
<p>it rotates the panel from top left.</p>
<p>then i wrote something like that :<br />
var iTmp:Image = new Image();<br />
iTmp = viewerPanel.getChildAt(0) as Image;<br />
var q:Number = 90 * Math.PI / 180 // 30 degrees in radians<br />
var m:Matrix = new Matrix();<br />
var centerX:Number = iTmp.width / 2;<br />
var centerY:Number = iTmp.height /2;<br />
m.translate(-1 * centerX, -1 * centerY);<br />
m.rotate(q);<br />
viewerPanel.removeChildAt(0);<br />
viewerPanel.addChild(iTmp);<br />
and this made the same thing.</p>
<p>So How can i rotate an image which is added to a panel as a child ?<br />
Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/comment-page-1/#comment-6945</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sat, 06 Feb 2010 18:17:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/#comment-6945</guid>
		<description>@Johnny Doe,

I believe it&#039;s possible in Flex 3 if you target Flash Player 10.

Peter</description>
		<content:encoded><![CDATA[<p>@Johnny Doe,</p>
<p>I believe it&#8217;s possible in Flex 3 if you target Flash Player 10.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johnny Doe</title>
		<link>http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/comment-page-1/#comment-6944</link>
		<dc:creator>Johnny Doe</dc:creator>
		<pubDate>Sat, 06 Feb 2010 17:56:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/#comment-6944</guid>
		<description>More importantly... How can I rotate an images rotateX, rotateY, and rotateZ?  3D rotation using Flex 3, without special libs or plugins...  is it possible?</description>
		<content:encoded><![CDATA[<p>More importantly&#8230; How can I rotate an images rotateX, rotateY, and rotateZ?  3D rotation using Flex 3, without special libs or plugins&#8230;  is it possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allen</title>
		<link>http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/comment-page-1/#comment-6922</link>
		<dc:creator>Allen</dc:creator>
		<pubDate>Thu, 04 Feb 2010 17:37:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/#comment-6922</guid>
		<description>Hi,

The rotation feature is good. I need to control the rotation angle by an external feed. Would you have any sample code? Thank You</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>The rotation feature is good. I need to control the rotation angle by an external feed. Would you have any sample code? Thank You</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mafaz</title>
		<link>http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/comment-page-1/#comment-6583</link>
		<dc:creator>Mafaz</dc:creator>
		<pubDate>Fri, 11 Dec 2009 15:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/#comment-6583</guid>
		<description>Hello there,
The example is a nice one. How can I control the rotation of an image with a mouseDown event?  Like I want control on the rotation of the image. What am I supposed to do. Any hints please?</description>
		<content:encoded><![CDATA[<p>Hello there,<br />
The example is a nice one. How can I control the rotation of an image with a mouseDown event?  Like I want control on the rotation of the image. What am I supposed to do. Any hints please?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: halflife_baby</title>
		<link>http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/comment-page-1/#comment-6568</link>
		<dc:creator>halflife_baby</dc:creator>
		<pubDate>Thu, 10 Dec 2009 06:24:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/#comment-6568</guid>
		<description>Hi,
How to rotate an image to 90 degree when the button is clicked? 
If i click the button again, it should totate to 180 degree. (ie) agian it should rotate to 90 degree from the last position.
I was working with this issue for the last 3 days. Can some one help me?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
How to rotate an image to 90 degree when the button is clicked?<br />
If i click the button again, it should totate to 180 degree. (ie) agian it should rotate to 90 degree from the last position.<br />
I was working with this issue for the last 3 days. Can some one help me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/comment-page-1/#comment-6028</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Thu, 15 Oct 2009 15:31:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/#comment-6028</guid>
		<description>@MechanisM,

&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;&gt;

    &lt;mx:Rotate id=&quot;rotatr&quot;
            angleFrom=&quot;0&quot;
            angleTo=&quot;360&quot;
            repeatCount=&quot;0&quot; /&gt;

    &lt;mx:Image id=&quot;logo&quot;
            source=&quot;flex_logo.jpg&quot;
            mouseOver=&quot;rotatr.play([event.currentTarget]);&quot;
            mouseOut=&quot;rotatr.stop();&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>@MechanisM,</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Rotate</span> id=<span style="color: #ff0000;">&quot;rotatr&quot;</span></span>
<span style="color: #000000;">            angleFrom=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">            angleTo=<span style="color: #ff0000;">&quot;360&quot;</span></span>
<span style="color: #000000;">            repeatCount=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> id=<span style="color: #ff0000;">&quot;logo&quot;</span></span>
<span style="color: #000000;">            source=<span style="color: #ff0000;">&quot;flex_logo.jpg&quot;</span></span>
<span style="color: #000000;">            mouseOver=<span style="color: #ff0000;">&quot;rotatr.play([event.currentTarget]);&quot;</span></span>
<span style="color: #000000;">            mouseOut=<span style="color: #ff0000;">&quot;rotatr.stop();&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MechanisM</title>
		<link>http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/comment-page-1/#comment-6024</link>
		<dc:creator>MechanisM</dc:creator>
		<pubDate>Thu, 15 Oct 2009 09:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/#comment-6024</guid>
		<description>How to set up rotate on rollOver in loop?
I mean when mouse over image its still rotating untill mouse gone out?</description>
		<content:encoded><![CDATA[<p>How to set up rotate on rollOver in loop?<br />
I mean when mouse over image its still rotating untill mouse gone out?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/comment-page-1/#comment-2092</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Fri, 03 Oct 2008 01:50:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/#comment-2092</guid>
		<description>lala,

You can try setting the &lt;code&gt;rollOverEffect&lt;/code&gt; style/effect:
&lt;pre class=&quot;code&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;

    &lt;mx:Rotate id=&quot;rotate&quot;
            target=&quot;{img}&quot;
            angleFrom=&quot;0&quot;
            angleTo=&quot;360&quot;
            duration=&quot;1000&quot;
            originX=&quot;{img.height/2}&quot;
            originY=&quot;{img.width/2}&quot; /&gt;

    &lt;mx:Image id=&quot;img&quot;
            source=&quot;fx_appicon-tn.gif&quot;
            rollOverEffect=&quot;{rotate}&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>lala,</p>
<p>You can try setting the <code>rollOverEffect</code> style/effect:</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Rotate id="rotate"
            target="{img}"
            angleFrom="0"
            angleTo="360"
            duration="1000"
            originX="{img.height/2}"
            originY="{img.width/2}" /&gt;

    &lt;mx:Image id="img"
            source="fx_appicon-tn.gif"
            rollOverEffect="{rotate}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lala</title>
		<link>http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/comment-page-1/#comment-2091</link>
		<dc:creator>lala</dc:creator>
		<pubDate>Fri, 03 Oct 2008 00:37:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/10/rotating-images-using-the-rotate-class/#comment-2091</guid>
		<description>i wante to do that when i rollOver why can i do that ??? please</description>
		<content:encoded><![CDATA[<p>i wante to do that when i rollOver why can i do that ??? please</p>
]]></content:encoded>
	</item>
</channel>
</rss>

