00:00
00:00
Newgrounds Background Image Theme

slugjuicedotcom just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

AS: Custem Cursor

10,966 Views | 42 Replies
New Topic Respond to this Topic

Response to AS: Custem Cursor 2008-04-07 19:40:44


Awesome I have been trying to figure this out, I had it all worked out except the mouse would grab the far right side of the movie clip, which sucked....

From a few things I picked up around the forums I came up with a easy way to set the borders by borrowing from the original poster's script. The borders I used are for an odd sized flash though:

onClipEvent (load) { // movie clip is on current frame
Mouse.hide(); // hides the cursor
startDrag(this, true, 100, 100, 550, 360); // mouse drags this object, specifies borders
}

Thanks for the post!

Response to AS: Custem Cursor 2008-06-06 05:30:17


How do you get a cursor that stays for the whole flash.


Formerly known as mwmike | I'm moderately active on last.fm | Before you post, read these. Please.

BBS Signature

Response to AS: Custem Cursor 2008-08-11 00:50:21


k after some testing i found this code

onClipEvent(enterFrame){ Mouse.hide();
this._x = _root._xmouse
this._y = _root._ymouse
updateAfterEvent ()
}

this is the best code also since when u right click it will still be the custom cursor not the real one also if you set the FPS to 30 it will be very smooth


ill give you a ten because you let me give you a zero!, My only friend the end,

My latest game

My page

BBS Signature

Response to AS: Custem Cursor 2008-08-11 02:24:14


At 6/6/08 05:30 AM, mwmike wrote: How do you get a cursor that stays for the whole flash.

you put the cursor in each frame, duh


BBS Signature

Response to AS: Custem Cursor 2008-08-11 03:08:46


your grammar is terrible and it's Custom, not Custem...

Response to AS: Custem Cursor 2008-08-11 03:10:04


Or you could make it universal (go look in the constants menu of AS2.)

Response to AS: Custem Cursor 2009-02-09 23:49:55


dude that seems way harder then the code i would use for a custom cursor.....here this is what i would
do.............

onClipEvent(enterFrame) {
Mouse.hide();
this._x = _root._xmouse;
this._y = _root._ymouse;
}

Response to AS: Custem Cursor 2009-02-10 04:55:32


At 2/9/09 11:49 PM, baboop wrote: dude that seems way harder then the code i would use for a custom cursor.....here this is what i would
do.............

onClipEvent(enterFrame) {
Mouse.hide();
this._x = _root._xmouse;
this._y = _root._ymouse;
}

No offence, but games using that code cause irritating cursor flashing (particularly with Firefox) when the browser's not in focus. The movement of cursor to mouse should happen onMouseMove, not onEnterFrame, to save CPU, and the Mouse.hide() should only be run once in a while, not on every frame, to get rid of the original cursor in case someone right-clicks etc.

Something like this is better (untested)

onClipEvent(load){ cnt=0;targ=100;Mouse.hide(); } onClipEvent(mouseMove){ cnt++;if(cnt>targ){cnt=0;Mouse.hide();} _x=_root._xmouse; _y=_root._ymouse; }

- - Flash - Music - Images - -

BBS Signature

Response to AS: Custem Cursor 2022-10-09 20:41:30


thanks


Flash portable is trash in first time, later it gets better

BBS Signature

Response to AS: Custem Cursor 2022-10-09 21:41:00


At 10/9/22 08:41 PM, Gustavotonogamer wrote:thanks

again....don't bump old threads ...


Slint approves of me! | "This is Newgrounds.com, not Disney.com" - WadeFulp

"Sit look rub panda" - Alan Davies

BBS Signature

Response to AS: Custem Cursor 2022-10-10 11:29:39


At 10/9/22 09:41 PM, Gimmick wrote:
At 10/9/22 08:41 PM, Gustavotonogamer wrote:thanks
again....don't bump old threads ...

WHAT IS THE PROBLEM DUDE


Flash portable is trash in first time, later it gets better

BBS Signature

Response to AS: Custem Cursor 2022-10-10 14:47:19


At 10/10/22 11:29 AM, Gustavotonogamer wrote:
At 10/9/22 09:41 PM, Gimmick wrote:
At 10/9/22 08:41 PM, Gustavotonogamer wrote:thanks
again....don't bump old threads ...
WHAT IS THE PROBLEM DUDE

it's against the rules.


Slint approves of me! | "This is Newgrounds.com, not Disney.com" - WadeFulp

"Sit look rub panda" - Alan Davies

BBS Signature

Response to AS: Custem Cursor 2022-10-10 14:55:20


At 10/10/22 02:47 PM, Gimmick wrote:
At 10/10/22 11:29 AM, Gustavotonogamer wrote:
At 10/9/22 09:41 PM, Gimmick wrote:
At 10/9/22 08:41 PM, Gustavotonogamer wrote:thanks
again....don't bump old threads ...
WHAT IS THE PROBLEM DUDE
it's against the rules.

ok :)


Flash portable is trash in first time, later it gets better

BBS Signature