00:00
00:00
Newgrounds Background Image Theme

SevsArtCave 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,572 Views | 42 Replies
New Topic Respond to this Topic

AS: Custem Cursor 2005-10-01 04:02:15


======
INTRO
======
ok so you want a custem cursor for your movies/games well you have came to the right place.
(i dont know if this has been done before but ohwell....)
Any questions please Email Me or post a reply here thanks.

http://flash-fantasy.com

=========
Let's Do It
=========
Ok so you wanna make a custom cursor for your flash movies?
well read below and find out how!

1. Create a Movie Clip (from now on it's MC) by going insert>new symbol name it cursor
2. Now draw the cursor you want.
3. Now this is an important part so LISTEN WELL.
You have to make sure the clicky part of the cursor is centered in the middle of the MC
4. Go to the main scene and open the libray (CTRL + L) and drag the cursor on to the stage
5. Now click on the cursor and open the actions panel (or push F9) and put these scripts onto the cursor

onClipEvent(load) { //when the movie clip loads
Mouse.hide(); // hide the normal mouse
startDrag(this,true); // and drag the cursor MC to follow the mouse
}

INFO
onClipEvent(load) means when the flash player loads the movie
Mouse.hide(); Means it will hide the normal mouse
startDrag(this,true); Means that the cursor MC will be draged in the center of the normal mouse position (which it is important why you center the clicky part)

6. Now push CTRL + ENTER and test the movie the cursor should follow the mouse

Finished, Enjoy!

**NOTE**
The mouse may lag when viewing the flash but you can make it more smoother by making the FPS (Frames-Per-Second AKA Frame Rate) more like about 20

Response to AS: Custem Cursor 2005-10-01 04:15:38


Yay. Another bookmark for me. Lol.

Great tutorial - and yes, its actually a proper tutorial not a CTRL+V job ;-)


"Actually, the server timed out trying to remove all your posts..."

-TomFulp

Response to AS: Custem Cursor 2005-10-01 04:42:15


thanks alot

PS: there are more tutorials at http://flash-fantasy.com

Response to AS: Custem Cursor 2005-10-01 04:42:50


thaxs

Response to AS: Custem Cursor 2005-10-01 04:56:21


Nice and detailed, but you mispelled "Custem" :P

Word corrects it to "Custom", but I'm not sure... =p


BBS Signature

Response to AS: Custem Cursor 2005-10-01 04:58:48


even better

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

But I dunno may be heavier


- Matt, Rustyarcade.com

Response to AS: Custem Cursor 2005-10-01 05:02:39


its a wicked way for a cursor but kinda hard cos you easy get muddled

Response to AS: Custem Cursor 2005-10-01 05:52:23


This topic is gay, custom cursors are in AS:Drag & Drop I believe (maybe not by Inglor but someone else posted it).


Sup, bitches :)

BBS Signature

Response to AS: Custem Cursor 2005-10-01 05:54:11


At 10/1/05 05:52 AM, -liam- wrote: This topic is gay, custom cursors are in AS:Drag & Drop I believe (maybe not by Inglor but someone else posted it).

Also, none of your tuts have a link back to AS: Main at the top.


- - Flash - Music - Images - -

BBS Signature

Response to AS: Custem Cursor 2005-10-01 05:58:21


At 10/1/05 05:54 AM, Denvish wrote: Also, none of your tuts have a link back to AS: Main at the top.

Me?

AS:Swap Depths, AS:Random Movement, AS:Upload/Download.


Sup, bitches :)

BBS Signature

Response to AS: Custem Cursor 2005-10-01 06:04:06


At 10/1/05 05:54 AM, Denvish wrote: Also, none of your tuts have a link back to AS: Main at the top.

ok sorry ill put it on the top from now on

Response to AS: Custem Cursor 2005-10-01 06:12:21


At 10/1/05 05:58 AM, -liam- wrote:
At 10/1/05 05:54 AM, Denvish wrote: Also, none of your tuts have a link back to AS: Main at the top.
Me?

AS:Swap Depths, AS:Random Movement, AS:Upload/Download.

No, not you, silly Liam :P


BBS Signature

Response to AS: Custem Cursor 2005-10-01 06:20:34


At 10/1/05 04:58 AM, Ninja-Chicken wrote: onClipEvent (enterFrame) {
this._x = _root._xmouse
this._y = _root._ymouse
updateAfterEvent ()
}

Yeah thats one of my favorites, heavy in-game but I generally only like custom cursors on the menu anyway.

What the fuck is this topic, I hate it when uninformed semi-n00bs try to make AS topics.

Response to AS: Custem Cursor 2005-10-01 06:25:21


At 10/1/05 06:12 AM, -Toast- wrote: No, not you, silly Liam :P

I wondered why he was quoting me, now I realise.. silly silly Liam =)


Sup, bitches :)

BBS Signature

Response to AS: Custem Cursor 2005-10-01 06:41:23


At 10/1/05 04:58 AM, Ninja-Chicken wrote: even better

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

But I dunno may be heavier

Call me Mr Silly-AS-N00b, but what does updateAfterEvent() do?

*Shame at stupid question*


BBS Signature

Response to AS: Custem Cursor 2005-10-01 06:46:14


It basically "updates" the cursor's _x and _y every time you move teh mouse.


BBS Signature

Response to AS: Custem Cursor 2005-10-01 06:48:51


At 10/1/05 06:46 AM, -Toast- wrote: It basically "updates" the cursor's _x and _y every time you move teh mouse.

Yeah I sorta could have guessed that... But I'm sure I've used that script before without the "updateAfterEvent()" and it still works fine. Won't the "onClipEvent(enterFrame)" have the same effect anyway?


BBS Signature

Response to AS: Custem Cursor 2005-10-01 07:11:47


updateAfterEvent

Availability
Flash Player 5.

Usage
updateAfterEvent()

Parameters
None.

Returns
Nothing.

Description
Action; updates the display (independent of the frames per second set for the movie) when you call it within an onClipEvent handler or as part of a function or method that you pass to setInterval. Flash ignores calls to updateAfterEvent that are not within an onClipEvent handler or part of a function or method passed to setInterval.


Sup, bitches :)

BBS Signature

Response to AS: Custem Cursor 2005-10-01 07:14:22


At 10/1/05 07:11 AM, -liam- wrote: ...(independent of the frames per second set for the movie)

Aha! Right I get that now...

Though wouldn't you a movie with a decent frame rate to have enough to allow for smooth sursor movement without the UpdateAfterEvent()? Meh, I dunno if its worth having that in...


BBS Signature

Response to AS: Custem Cursor 2005-10-01 07:16:39


The only problem with it is that it is laggy.


BBS Signature

Response to AS: Custem Cursor 2005-10-01 07:19:15


Yeah seems like a choice between (possible) reasonable smooth movement based on framerate and very smooth movement with more lag...


BBS Signature

Response to AS: Custem Cursor 2005-10-01 07:19:16


At 10/1/05 07:14 AM, -Paranoia- wrote: Though wouldn't you a movie with a decent frame rate to have enough to allow for smooth sursor movement without the UpdateAfterEvent()? Meh, I dunno if its worth having that in...

A higher framerate does help, but it still isn't as smooth. Also, even if you have a framerate of 120 the movie/game will not always run that fast, it depends on what Flash is doing (if it is having to render loads of vectors it will be slow).


Sup, bitches :)

BBS Signature

Response to AS: Custem Cursor 2005-10-01 08:04:17


At 10/1/05 07:19 AM, -Paranoia- wrote: Yeah seems like a choice between (possible) reasonable smooth movement based on framerate and very smooth movement with more lag...

thats doesnt make sense
Smooth movement with lag ?!?!
Trust me one extra little thing just on the menu or something really wont hurt the overall performance of the game : P


- Matt, Rustyarcade.com

Response to AS: Custem Cursor 2005-11-08 15:08:28


And also! If you want to animate the cursor, here's what you can do.

After you put in all that code, you can double click on the cursor. On the top of the screen, it should have the symbol name on it. You can now edit your symbol, and it will be an animated cursor! W007ness!

If you need anymore help, just E-mail and I'll do the best I can.

Response to AS: Custem Cursor 2006-03-17 10:21:21


The Tutorial is nice. It really helped me alot but I have a suggestion: Replace the "onClipEvent(load)" with "onClipEvent(enterFrame)"

If you are pressing the right click button, the actual cursor appeared. With this little change it doesn't

~ scrimpy

Response to AS: Custem Cursor 2006-06-26 15:41:35


thx that helped me!

Response to AS: Custem Cursor 2007-05-06 18:21:01


and right before the update after event, u can stick

this._rotation=_x

and make it cooler :)

Response to AS: Custem Cursor 2007-11-24 12:26:02


At 3/17/06 11:49 AM, Pyromaniac wrote: This is all outdated AS. Here is a much better way.
Custom Cursor
1-Make a Movieclip.
2-Make the clicky part on the little plus inside the MC.
3- Give it these actions
onClipEvent(load){ Mouse.hide();
}
onClipEvent(enterFrame){
this._x=_root._xmouse;
this._y=_root._ymouse;
}

i tried that...didn't work...and pyro....you created the tutorial collab '06 right? i have a question bout cursors..i have the actionscript for a cursor...I made the animation for a cursor...its kinda like the...
Unreal II cursor(wait for a while without movin the mouse and something happens...)problem is...how do i set the cursor to STOP playing the animation when the player is moving the mouse? i know how to do that for buttons though...

AS: Custem Cursor

Response to AS: Custem Cursor 2007-12-11 10:21:18


how do you change it or make it animate if you click


BBS Signature

Response to AS: Custem Cursor 2008-03-01 12:46:43


Hey, it works and all, but is there a way where you can keep the cursor there? like when you press play to go to the next scene. cause it keeps disappearimg. then pops out and lags XD