<?xml version="1.0" encoding="iso-8859-1"?><rss version="2.0">
<channel><title><![CDATA[ActionScript.org Flash, Flex and ActionScript Resources - Comments for article: Context Menus in Flash MX 2004]]></title><link>http://www.actionscript.org/resources</link><description /><language>en-us</language><copyright><![CDATA[http://www.actionscript.org/resources]]></copyright><generator>N/A</generator><webMaster>general.redirect@gmail.com</webMaster><lastBuildDate>Sun, 22 Nov 2009 17:00:06 CST</lastBuildDate><ttl>20</ttl><item><title><![CDATA[Comment #1]]></title><link>http://www.actionscript.org/resources/articles/15/1/Context-Menus-in-Flash-MX-2004/Page1.html#Comment2832</link><description><![CDATA[This helps with custom cursors in flash.
When you rightclick in flash, the cursor reappears. So, to make sure it hides correctly after the context menu is gone,  do a check to see if the menu was actually shown:
(only snippets shown, 
cursor is the name of the custom cursor,
customCM is the context menu,
the code was done on the main timeline)

[CODE]
var rightClicked = false;
customCM.onSelect = function(obj, cmObj)
{
	rightClicked = true;
}

//this is to check if the mouse buttons are pressed
_root.onEnterFrame = function()
{
	if (Key.isDown(2)) 
//show mouse when rightclick menu is visible
	{
		Mouse.show();//so the actual cursor comes back
//function in the custom cursor for animation etc.
//true means RMB was clicked (so menu appears)
		cursor.rightClick(true);
	}
	if (Key.isDown(1)) //hide mouse when menu disappears
	{
		Mouse.hide();
		if(rightClicked) 
//only does this if the context menu was shown.
		{
//closing animation, etc, when context menu closed
                        cursor.rightClick(false);
			cursor._x = _xmouse;
			cursor._y = _ymouse;
			rightClicked = false;
		}
	}
}
[/CODE]

The cursor.rightClick(inMenu:Boolean) is just a function that animates the cursor for opening/closing the context menu. I placed the custom cursor to the left of the current _xmouse pos and swapped it to a different cursor icon, so it looked like the menu appeared from the custom cursor.<br/><br/>
(Comment posted by axis at 3:21 am, Fri 4th May 2007)]]></description><author>no@spam.com (axis)</author><pubDate><![CDATA[Fri, 04 May 2007 03:21:26 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/15/1/Context-Menus-in-Flash-MX-2004/Page1.html#Comment2832</guid></item><item><title><![CDATA[Comment #2]]></title><link>http://www.actionscript.org/resources/blogs/0/Context-Menus-in-Flash-MX-2004.html#Comment12472</link><description><![CDATA[I've been having problems with your "Menu using Flash Player 10 in CS3 or CS4" tutorial, especially because in the sampleZsorter class, it calls for the matrix3d class, only available in the flash CS4 version.
How could I manage to fix this problem?<br/><br/>
(Comment posted by Christian Solon at 12:44 pm, Mon 5th Jan 2009)]]></description><author>no@spam.com (Christian Solon)</author><pubDate><![CDATA[Mon, 05 Jan 2009 12:44:12 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/blogs/0/Context-Menus-in-Flash-MX-2004.html#Comment12472</guid></item><item><title><![CDATA[Comment #3 (Reply to Comment #2)]]></title><link>http://www.actionscript.org/resources/blogs/0/Context-Menus-in-Flash-MX-2004.html#Comment12473</link><description><![CDATA[Yeah the issue is, as stated in my Flash CS3 workaround for Flash Player 1o (if you havn't watch that yet, check out http://www.flashtropolis.com) you have to test the movie in a browser, not in the flash CS3 IDE flash movie player. As long as you use the workaround and publish preview in a browser you can follow along with the tutorial no problems. Check out my website, watch the video tutorials and be sure to subscribe cause I've got about 10 new video tutorials coming out in the next couple of weeks. Thanks,

Jesse<br/><br/>
(Comment posted by Jesse at 12:49 pm, Mon 5th Jan 2009)]]></description><author>no@spam.com (Jesse)</author><pubDate><![CDATA[Mon, 05 Jan 2009 12:49:02 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/blogs/0/Context-Menus-in-Flash-MX-2004.html#Comment12473</guid></item><item><title><![CDATA[Comment #4]]></title><link>http://www.actionscript.org/resources/blogs/0/Context-Menus-in-Flash-MX-2004.html#Comment12480</link><description><![CDATA[I did all the swf decompiling of the playerglobal.swc, but still couldn't get the matrix3d class, which version of the nightly build flex sdk would you recommend me to download?<br/><br/>
(Comment posted by Christian Solon at 9:52 am, Tue 6th Jan 2009)]]></description><author>no@spam.com (Christian Solon)</author><pubDate><![CDATA[Tue, 06 Jan 2009 09:52:40 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/blogs/0/Context-Menus-in-Flash-MX-2004.html#Comment12480</guid></item></channel></rss>