<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Displaying a hand cursor when mousing over a Flex control</title>
	<link>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Sat, 06 Sep 2008 17:44:13 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-14234</link>
		<author>peterd</author>
		<pubDate>Fri, 18 Jul 2008 22:30:12 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-14234</guid>
		<description>Actually, setting the &lt;code&gt;rollOver&lt;/code&gt; and &lt;code&gt;rollOut&lt;/code&gt; on the Canvas is better. Here's a better example which adds some effects when the top image is shown or hidden:

&lt;pre class="code"&gt;
&#60;?xml version="1.0" encoding="utf-8"?&#62;
&#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"&#62;

    &#60;mx:Canvas id="canvas"
                rollOver="rollOverImage.visible = true;"
                rollOut="rollOverImage.visible = false;"&#62;
        &#60;mx:Image id="rollOutImage"
                source="image1.jpg" /&#62;
        &#60;mx:Image id="rollOverImage"
                source="image2.jpg"
                visible="false"
                showEffect="Fade"
                hideEffect="Zoom" /&#62;
    &#60;/mx:Canvas&#62;

&#60;/mx:Application&#62;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>Actually, setting the <code>rollOver</code> and <code>rollOut</code> on the Canvas is better. Here&#8217;s a better example which adds some effects when the top image is shown or hidden:</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"&gt;

    &lt;mx:Canvas id="canvas"
                rollOver="rollOverImage.visible = true;"
                rollOut="rollOverImage.visible = false;"&gt;
        &lt;mx:Image id="rollOutImage"
                source="image1.jpg" /&gt;
        &lt;mx:Image id="rollOverImage"
                source="image2.jpg"
                visible="false"
                showEffect="Fade"
                hideEffect="Zoom" /&gt;
    &lt;/mx:Canvas&gt;

&lt;/mx:Application&gt;
</pre>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-14232</link>
		<author>peterd</author>
		<pubDate>Fri, 18 Jul 2008 21:33:02 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-14232</guid>
		<description>Ned,

There are probably a few different techniques you can use, but you may have to embed the images for this to work. I think what is happening in your example is that when the image is rolled over, the existing image disappears when the new image is loaded. I *think* this would cause the &lt;code&gt;rollOut&lt;/code&gt; event to get dispatched causing the first image to try and load again, putting it into a flickering loop.

Try this:
&lt;pre class="code"&gt;
&#60;?xml version="1.0" encoding="utf-8"?&#62;
&#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"&#62;

    &#60;mx:Script&#62;
        &#60;![CDATA[
            [Bindable]
            [Embed("image1.jpg")]
            private var img1:Class;

            [Bindable]
            [Embed("image2.jpg")]
            private var img2:Class;
        ]]&#62;
    &#60;/mx:Script&#62;

    &#60;mx:Image id="image"
            source="{img1}"
            rollOver="image.source=img2;"
            rollOut="image.source=img1;" /&#62;

&#60;/mx:Application&#62;
&lt;/pre&gt;

Another example may be to load both images at once, stack them on top of each other and toggle the topmost image's &lt;code&gt;visible&lt;/code&gt; property:
&lt;pre class="code"&gt;
&#60;?xml version="1.0" encoding="utf-8"?&#62;
&#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"&#62;

    &#60;mx:Canvas&#62;
        &#60;mx:Image id="rollOutImage"
                source="image1.jpg"
                rollOver="rollOverImage.visible = true;"  /&#62;
        &#60;mx:Image id="rollOverImage"
                source="image2.jpg"
                visible="false"
                rollOut="rollOverImage.visible = false;" /&#62;
    &#60;/mx:Canvas&#62;

&#60;/mx:Application&#62;
&lt;/pre&gt;

Happy Flexing!
Peter</description>
		<content:encoded><![CDATA[<p>Ned,</p>
<p>There are probably a few different techniques you can use, but you may have to embed the images for this to work. I think what is happening in your example is that when the image is rolled over, the existing image disappears when the new image is loaded. I *think* this would cause the <code>rollOut</code> event to get dispatched causing the first image to try and load again, putting it into a flickering loop.</p>
<p>Try this:</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            [Bindable]
            [Embed("image1.jpg")]
            private var img1:Class;

            [Bindable]
            [Embed("image2.jpg")]
            private var img2:Class;
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Image id="image"
            source="{img1}"
            rollOver="image.source=img2;"
            rollOut="image.source=img1;" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Another example may be to load both images at once, stack them on top of each other and toggle the topmost image&#8217;s <code>visible</code> property:</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"&gt;

    &lt;mx:Canvas&gt;
        &lt;mx:Image id="rollOutImage"
                source="image1.jpg"
                rollOver="rollOverImage.visible = true;"  /&gt;
        &lt;mx:Image id="rollOverImage"
                source="image2.jpg"
                visible="false"
                rollOut="rollOverImage.visible = false;" /&gt;
    &lt;/mx:Canvas&gt;

&lt;/mx:Application&gt;
</pre>
<p>Happy Flexing!<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ned</title>
		<link>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-14221</link>
		<author>Ned</author>
		<pubDate>Fri, 18 Jul 2008 19:22:04 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-14221</guid>
		<description>Is it possible to replace the image source on rollover to another image?  When I tried the following, the image would just sit there and flicker when the mouse was over it..

&lt;pre class="code"&gt;
&#60;mx:Image id="test" source="image1.jpg" rollOver="test.source = 'image2.jpg'" rollOut="test.source='image1.jpg'" /&#62;
&lt;/pre&gt;

I would just use a button (and skin it) instead, but I can't use embeded resources.  Any ideas?

Thanks!</description>
		<content:encoded><![CDATA[<p>Is it possible to replace the image source on rollover to another image?  When I tried the following, the image would just sit there and flicker when the mouse was over it..</p>
<pre class="code">
&lt;mx:Image id="test" source="image1.jpg" rollOver="test.source = 'image2.jpg'" rollOut="test.source='image1.jpg'" /&gt;
</pre>
<p>I would just use a button (and skin it) instead, but I can&#8217;t use embeded resources.  Any ideas?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gokul</title>
		<link>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-6323</link>
		<author>gokul</author>
		<pubDate>Thu, 24 Jan 2008 05:28:14 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-6323</guid>
		<description>Try this app it will be helpful for you to set hand cursor over any component








</description>
		<content:encoded><![CDATA[<p>Try this app it will be helpful for you to set hand cursor over any component</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gokul</title>
		<link>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-6324</link>
		<author>gokul</author>
		<pubDate>Thu, 24 Jan 2008 04:30:27 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-6324</guid>
		<description>&lt;pre class="code"&gt;
mouseOver="event.target.onRelease=null;event.target.useHandCursor=true;"
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<pre class="code">
mouseOver="event.target.onRelease=null;event.target.useHandCursor=true;"
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chew Pichai</title>
		<link>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-5855</link>
		<author>Chew Pichai</author>
		<pubDate>Mon, 07 Jan 2008 03:19:38 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-5855</guid>
		<description>Hi,

If you want to set hand cursor in Label you must set mouseChildren="false"</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>If you want to set hand cursor in Label you must set mouseChildren=&#8221;false&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: D.Adrian</title>
		<link>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-5796</link>
		<author>D.Adrian</author>
		<pubDate>Fri, 04 Jan 2008 10:06:45 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-5796</guid>
		<description>Hi,

What if I would want to have the hand cursor when I roll over a UITextField component (like Labal) ? 
In my case, I am creating a custom item renderer for the Tree component and right now I cannot use the hand cursor over the text.
Any help would be much appreciated !!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>What if I would want to have the hand cursor when I roll over a UITextField component (like Labal) ?<br />
In my case, I am creating a custom item renderer for the Tree component and right now I cannot use the hand cursor over the text.<br />
Any help would be much appreciated !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: judah</title>
		<link>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-4366</link>
		<author>judah</author>
		<pubDate>Mon, 19 Nov 2007 23:13:52 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/11/18/displaying-a-hand-cursor-when-mousing-over-a-flex-control/#comment-4366</guid>
		<description>In this example it seems you don't need to set useHandCursor. For example, uncheck useHandCursor. As long as you have buttonMode true it is always showing a hand cursor. Win XP FF2.0.0.9</description>
		<content:encoded><![CDATA[<p>In this example it seems you don&#8217;t need to set useHandCursor. For example, uncheck useHandCursor. As long as you have buttonMode true it is always showing a hand cursor. Win XP FF2.0.0.9</p>
]]></content:encoded>
	</item>
</channel>
</rss>
