# MouseCursorData in Flash Professional 5.5 doesn't display my PNG

**URL:** <https://forum.kirupa.com/t/mousecursordata-in-flash-professional-5-5-doesnt-display-my-png/330263>\
**Category:** flash\
**Created:** [December 21, 2012, 2:53am UTC](https://forum.kirupa.com/t/mousecursordata-in-flash-professional-5-5-doesnt-display-my-png/330263 "2012-12-21T02:53:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ls\_ac](https://avatars.discourse-cdn.com/v4/letter/l/eada6e/32.png) [@ls\_ac](https://forum.kirupa.com/u/ls_ac)\
**Post date:** [December 21, 2012, 2:53am UTC](https://forum.kirupa.com/t/mousecursordata-in-flash-professional-5-5-doesnt-display-my-png/330263/1 "2012-12-21T02:53:13Z")

</div>

```auto
var bitmapDatas:Vector.<BitmapData> = new Vector.<BitmapData>( 1, true );
bitmapDatas[0] = new cursorTarget();
                
var cursorData:MouseCursorData = new MouseCursorData( );
cursorData.hotSpot = new Point( 15, 15 );
cursorData.data = bitmapDatas;
Mouse.registerCursor( CURSOR_TARGET, cursorData );
                
Mouse.cursor = CURSOR_TARGET;

```

The PNG I’m using is:  
 ![](http://forum.kirupa.com/uploads/kirupa/6653/a2fbea3159992ebb.png)  
In the library, I have target.png exported for ActionScript as Class ‘cursorTarget’

* * *

With the above code, I get a 32x32 opaque white box. I’ve tried a dozen different variations, including creating a blank transparent BitmapData and draw()ing the cursor onto it. This also results in a white box. If I draw() a sprite (something I built in Flash), then it’s an opaque black box.

The only time I can get it to draw “correctly” is if I do something like: new BitmapData( 32, 32, true, 0x80FF0000); Then I get a half-transparent red box. (Also, using graphics.drawPath, etc, it rendered correctly as well.)

What do I have to do to get the PNG displaying as a cursor?
