Quantcast
Viewing all articles
Browse latest Browse all 21156

Can't hide cursor in AIR?

Boy this should be really easy but I'm stumped.

I can hide the cursor just fine using Mouse.hide() in a Flex app, but if I use the same code in an AIR app, the cursor doesn't hide. I'm using Flex Builder 3.

So, I tried using a transparent png and assigning it to the cursor with CursorManager. Once again, works fine when the application is a Flex app, but doesn't work when I create an AIR app.

Here's the code I'm using for the second technique. Again, this works as a Flex app but not AIR. Any thoughts?



<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="onCreationComplete()"
layout="absolute">

<mx:Script>
<![CDATA[

import mx.managers.CursorManager;

[Embed('invisible_cursor.png')]
[Bindable]
public var InvisibleCursor:Class

public function onCreationComplete()
{
CursorManager.setCursor(InvisibleCursor);
}

]]>

</mx:Script>
</mx:WindowedApplication>



Thanks,
Daniel

Viewing all articles
Browse latest Browse all 21156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>