Quantcast
Channel: Adobe Community : All Content - AIR Development
Viewing all articles
Browse latest Browse all 2954

Custom cursor not applied to body

$
0
0

I have the following code which I run `onload` on the body tag in a HTML/JavaScript application:

 

var mcd = new window.runtime.flash.ui.MouseCursorData();

mcd.hotSpot = new air.Point(0,0);

mcd.frameRate = 24;

var loader = new air.Loader();

loader.contentLoaderInfo.addEventListener(air.Event.COMPLETE, function(event) {      

  var image = air.Bitmap(loader.content);    

  var bitmaps = new air.Vector["<flash.display.BitmapData>"]();

  bitmaps.push(image.bitmapData);

  mcd.data = bitmaps;

  air.Mouse.registerCursor('defaultCursor', mcd);

  air.Mouse.cursor = 'defaultCursor';

});

var request = new air.URLRequest('./assets/cursor.png');

loader.load(request);

 

However, this cursor ONLY appears when dragging the window chrome and doesn't appear anywhere else...

 

Is this a bug in AIR for HTML apps or do I need to call this code differently?


Viewing all articles
Browse latest Browse all 2954

Trending Articles



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