views:

112

answers:

1

I wrote some very simple code to replace the mouse Cursor in a flash application I am writing in AS3/FlexSDK.

The code:

var cursor:MovieClip = new Cursor_addElement();
canvas.addChild(cursor);
cursor.startDrag(true);

It works perfectly fine on XP and 2x Vista machines, but on OSX the cursor does not follow along with the mouse - it just sits there at 0,0 on the screen. Has anyone encountered this?

A: 

Part of my program destroys the cursor and renews it every frame (it changes very rapidly), and on OSX it takes at least 1 frame to register the mouse's position (wheras on PC it registers the mouse position right on startDrag() initiation).

By waiting at least a frame before destroying the cursor again it worked out.

Andy Moore