<?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"
	>
<channel>
	<title>Comments on: Custom cursor &#8220;bug&#8221; in ActionScript3</title>
	<atom:link href="http://www.eclips3media.com/workshop/2007/12/11/custom-cursor-bug-in-actionscript3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eclips3media.com/workshop/2007/12/11/custom-cursor-bug-in-actionscript3/</link>
	<description>Smart web designing and web development. The eclips3.media (ECLM) development blog.</description>
	<pubDate>Fri, 21 Nov 2008 10:23:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: dain</title>
		<link>http://www.eclips3media.com/workshop/2007/12/11/custom-cursor-bug-in-actionscript3/#comment-830</link>
		<dc:creator>dain</dc:creator>
		<pubDate>Tue, 07 Oct 2008 13:59:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.eclips3media.com/workshop/2007/12/11/custom-cursor-bug-in-as3/#comment-830</guid>
		<description>hey Dan,

you can try this:
cursor.x = mouseX + 1;
cursor.y = mouseY + 1;
as i`m not sure if this is actually the same as offsetting the thing inside the movieclip.

otherwise what i was writing about is how to tackle the rollover/rollout problem, it shouldn`t really happen in your case at all.

one thing though, is there any specific reason why you`re setting the cursor to visible on every mouse movement?</description>
		<content:encoded><![CDATA[<p>hey Dan,</p>
<p>you can try this:<br />
cursor.x = mouseX + 1;<br />
cursor.y = mouseY + 1;<br />
as i`m not sure if this is actually the same as offsetting the thing inside the movieclip.</p>
<p>otherwise what i was writing about is how to tackle the rollover/rollout problem, it shouldn`t really happen in your case at all.</p>
<p>one thing though, is there any specific reason why you`re setting the cursor to visible on every mouse movement?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dandanthepizzman</title>
		<link>http://www.eclips3media.com/workshop/2007/12/11/custom-cursor-bug-in-actionscript3/#comment-829</link>
		<dc:creator>dandanthepizzman</dc:creator>
		<pubDate>Tue, 07 Oct 2008 12:48:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.eclips3media.com/workshop/2007/12/11/custom-cursor-bug-in-as3/#comment-829</guid>
		<description>Hi, 

Ive had the same problem, I have the MouseMove listener registered to the stage and the custom cursor tracks the coordinates of the mouse in the MouseMove handler function. I was still getting flickering occasionally over movieclips behaving like buttons. 

I tried offsetting the reg of the movieclips inside the custom cursor MC and this has greatly reduced the frequency of the rollout event being fired, though it still happens now and then.

Im not sure if I understand what you were trying to say in the 'workaround' paragraph, would you be kind enough to have a look at my code to see if im on the right track? 

Thanks Dan

stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);

initCursor();

function initCursor()
{
	cursor.mouseEnabled = false;
	Mouse.hide();
	addChild(cursor);
}
function mouseMoveHandler(event:MouseEvent):void 
{
	cursor.x = mouseX;
	cursor.y = mouseY;
	event.updateAfterEvent();
	cursor.visible = true;
}</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>Ive had the same problem, I have the MouseMove listener registered to the stage and the custom cursor tracks the coordinates of the mouse in the MouseMove handler function. I was still getting flickering occasionally over movieclips behaving like buttons. </p>
<p>I tried offsetting the reg of the movieclips inside the custom cursor MC and this has greatly reduced the frequency of the rollout event being fired, though it still happens now and then.</p>
<p>Im not sure if I understand what you were trying to say in the &#8216;workaround&#8217; paragraph, would you be kind enough to have a look at my code to see if im on the right track? </p>
<p>Thanks Dan</p>
<p>stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);</p>
<p>initCursor();</p>
<p>function initCursor()<br />
{<br />
	cursor.mouseEnabled = false;<br />
	Mouse.hide();<br />
	addChild(cursor);<br />
}<br />
function mouseMoveHandler(event:MouseEvent):void<br />
{<br />
	cursor.x = mouseX;<br />
	cursor.y = mouseY;<br />
	event.updateAfterEvent();<br />
	cursor.visible = true;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dain</title>
		<link>http://www.eclips3media.com/workshop/2007/12/11/custom-cursor-bug-in-actionscript3/#comment-348</link>
		<dc:creator>dain</dc:creator>
		<pubDate>Sun, 16 Mar 2008 18:54:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.eclips3media.com/workshop/2007/12/11/custom-cursor-bug-in-as3/#comment-348</guid>
		<description>@kms: that's a good idea, much simpler to do :)

@rhtx: no, because the problem lies in the rollout event of the - say - draggable item triggering the cursor change. it happens because the hidden mouse cursor goes over the custom cursor image, which is just a "neutral" item like the stage, so it triggers the rollout as the cursor is not directly over the draggable item any more.</description>
		<content:encoded><![CDATA[<p>@kms: that&#8217;s a good idea, much simpler to do <img src='http://www.eclips3media.com/workshop/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>@rhtx: no, because the problem lies in the rollout event of the - say - draggable item triggering the cursor change. it happens because the hidden mouse cursor goes over the custom cursor image, which is just a &#8220;neutral&#8221; item like the stage, so it triggers the rollout as the cursor is not directly over the draggable item any more.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rhtx</title>
		<link>http://www.eclips3media.com/workshop/2007/12/11/custom-cursor-bug-in-actionscript3/#comment-301</link>
		<dc:creator>rhtx</dc:creator>
		<pubDate>Wed, 30 Jan 2008 23:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.eclips3media.com/workshop/2007/12/11/custom-cursor-bug-in-as3/#comment-301</guid>
		<description>Would setting the mouseEnabled property of the custom cursor to false do essentially the same thing?</description>
		<content:encoded><![CDATA[<p>Would setting the mouseEnabled property of the custom cursor to false do essentially the same thing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kms</title>
		<link>http://www.eclips3media.com/workshop/2007/12/11/custom-cursor-bug-in-actionscript3/#comment-270</link>
		<dc:creator>kms</dc:creator>
		<pubDate>Tue, 01 Jan 2008 04:19:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.eclips3media.com/workshop/2007/12/11/custom-cursor-bug-in-as3/#comment-270</guid>
		<description>I just offset my custom cursor by one pixel in x &#38; y and it works fine. If you look closely, you can notice that rollover fires 1px too soon, but it's much better than flickering rollover/rollouts. Thanks for posting this... thought I was the only one having that problem.</description>
		<content:encoded><![CDATA[<p>I just offset my custom cursor by one pixel in x &amp; y and it works fine. If you look closely, you can notice that rollover fires 1px too soon, but it&#8217;s much better than flickering rollover/rollouts. Thanks for posting this&#8230; thought I was the only one having that problem.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
