<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flex Examples &#187; Mouse</title>
	<atom:link href="http://blog.flexexamples.com/category/mouse/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting mouse cursors in Flash Player 10</title>
		<link>http://blog.flexexamples.com/2008/11/03/setting-mouse-cursors-in-flash-player-10/</link>
		<comments>http://blog.flexexamples.com/2008/11/03/setting-mouse-cursors-in-flash-player-10/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 06:49:05 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Mouse]]></category>
		<category><![CDATA[MouseCursor]]></category>
		<category><![CDATA[cursor]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/11/03/setting-mouse-cursors-in-flash-player-10/</guid>
		<description><![CDATA[<p>The following example shows how you can set mouse cursors in Flash Player 10 by setting the Mouse object&#8217;s cursor property to one of the static constants in the MouseCursor class.</p> <p>Full code after the jump.</p> <p></p> <p class="alert">To use the following code, you must have Flash Player 10 and a Flex Gumbo SDK installed [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set mouse cursors in Flash Player 10 by setting the Mouse object&#8217;s <code>cursor</code> property to one of the static constants in the MouseCursor class.</p>
<p>Full code after the jump.</p>
<p><span id="more-849"></span></p>
<p class="alert">To use the following code, you must have Flash Player 10 and a Flex Gumbo SDK installed in your Flex Builder 3. For more information on downloading and installing the Gumbo SDK into Flex Builder 3, see <a href="http://blog.flexexamples.com/2008/08/02/using-the-beta-gumbo-sdk-in-flex-builder-3/">&#8220;Using the beta Gumbo SDK in Flex Builder 3&#8243;</a>.</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Mouse_cursor_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/11/03/setting-mouse-cursors-in-flash-player-10/ --&gt;
&lt;FxApplication name="Mouse_cursor_test"
        xmlns="http://ns.adobe.com/mxml/2009"&gt;
    &lt;layout&gt;
        &lt;BasicLayout /&gt;
    &lt;/layout&gt;

    &lt;HGroup horizontalCenter="0" top="10"&gt;
        &lt;FxButton label="{MouseCursor.ARROW}"
                click="Mouse.cursor = MouseCursor.ARROW;" /&gt;
        &lt;FxButton label="{MouseCursor.AUTO}"
                click="Mouse.cursor = MouseCursor.AUTO;" /&gt;
        &lt;FxButton label="{MouseCursor.BUTTON}"
                click="Mouse.cursor = MouseCursor.BUTTON;" /&gt;
        &lt;FxButton label="{MouseCursor.HAND}"
                click="Mouse.cursor = MouseCursor.HAND;" /&gt;
        &lt;FxButton label="{MouseCursor.IBEAM}"
                click="Mouse.cursor = MouseCursor.IBEAM;" /&gt;
    &lt;/HGroup&gt;

    &lt;VGroup horizontalCenter="0" verticalCenter="0"&gt;
        &lt;TextInput text="mx:TextInput" /&gt;
        &lt;Button label="mx:Button" buttonMode="true" /&gt;
    &lt;/VGroup&gt;

&lt;/FxApplication&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Mouse_cursor_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/Mouse_cursor_test/bin/main.html" width="100%" height="250"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex Gumbo SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Gumbo SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting mouse cursors in Flash Player 10 on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/11/03/setting-mouse-cursors-in-flash-player-10/',contentID: 'post-849',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'cursor',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/11/03/setting-mouse-cursors-in-flash-player-10/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Detecting the mouse scroll wheel in a Flex application</title>
		<link>http://blog.flexexamples.com/2007/08/28/detecting-the-mouse-scroll-wheel-in-a-flex-application/</link>
		<comments>http://blog.flexexamples.com/2007/08/28/detecting-the-mouse-scroll-wheel-in-a-flex-application/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 00:23:11 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Mouse]]></category>
		<category><![CDATA[MouseEvent]]></category>
		<category><![CDATA[delta]]></category>
		<category><![CDATA[mouseWheel]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/28/detecting-the-mouse-scroll-wheel-in-a-flex-application/</guid>
		<description><![CDATA[<p>The following example demonstrates a very simple Flex application which listens for the mouseWheel event (represented here by the MouseEvent.MOUSE_WHEEL constant) and updates a Label control on the display list.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2007/08/28/detecting-the-mouse-scroll-wheel-in-a-flex-application/ --&#62; &#60;mx:Application xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34; layout=&#34;vertical&#34; verticalAlign=&#34;middle&#34; backgroundColor=&#34;white&#34; creationComplete=&#34;init()&#34;&#62; &#160; &#60;mx:Script&#62; &#60;![CDATA[ private function init():void { systemManager.addEventListener(MouseEvent.MOUSE_WHEEL, doMouseWheel); } &#160; private [...]]]></description>
			<content:encoded><![CDATA[<p>The following example demonstrates a very simple Flex application which listens for the <code>mouseWheel</code> event (represented here by the <code>MouseEvent.MOUSE_WHEEL</code> constant) and updates a Label control on the display list.</p>
<p><span id="more-143"></span></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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2007/08/28/detecting-the-mouse-scroll-wheel-in-a-flex-application/ --&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>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span></span>
<span style="color: #000000;">        creationComplete=<span style="color: #ff0000;">&quot;init()&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            private function init():void {</span>
<span style="color: #339933;">                systemManager.addEventListener(MouseEvent.MOUSE_WHEEL, doMouseWheel);</span>
<span style="color: #339933;">            }</span>
&nbsp;
<span style="color: #339933;">            private function doMouseWheel(evt:MouseEvent):void {</span>
<span style="color: #339933;">                num += evt.delta;</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Number</span> id=<span style="color: #ff0000;">&quot;num&quot;</span><span style="color: #7400FF;">&gt;</span></span>0<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Number</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:NumberFormatter</span> id=<span style="color: #ff0000;">&quot;numberFormatter&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ApplicationControlBar</span> dock=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;Click the stage and scroll mouse wheel to begin.&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ApplicationControlBar</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;{numberFormatter.format(num)}&quot;</span></span>
<span style="color: #000000;">            fontSize=<span style="color: #ff0000;">&quot;96&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 class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/MouseWheel_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p class="alert">Oops, I had to remove the SWF since it was competing with IE&#8217;s scroll (I&#8217;m using a weird <code>&lt;iframe /&gt;</code> solution for inline samples). <a href="http://blog.flexexamples.com/wp-content/uploads/MouseWheel_test/bin/main.html">To see the sample, click here</a>.</p>
<p>And no, the number has absolutely no significance. It is just a quick way to see if the mouse wheel was responding.</p>
<p><!-- iframe src="http://blog.flexexamples.com/wp-content/uploads/MouseWheel_test/bin/main.html" width="100%" height="220"></iframe --></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Detecting the mouse scroll wheel in a Flex application on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/08/28/detecting-the-mouse-scroll-wheel-in-a-flex-application/',contentID: 'post-143',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'delta,mouseWheel',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/08/28/detecting-the-mouse-scroll-wheel-in-a-flex-application/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

