Be a Supporter!

AS: Custem Cursor

  • 6,187 Views
  • 40 Replies
New Topic Respond to this Topic
BettaThanYou
BettaThanYou
  • Member since: Feb. 10, 2007
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to AS: Custem Cursor 2007-12-11 10:21:18 Reply

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


BBS Signature
AeroJenix
AeroJenix
  • Member since: Feb. 24, 2008
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to AS: Custem Cursor 2008-03-01 12:46:43 Reply

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

Foiz5000
Foiz5000
  • Member since: Mar. 22, 2008
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to AS: Custem Cursor 2008-04-07 19:40:44 Reply

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!

EmmDubya
EmmDubya
  • Member since: Feb. 23, 2008
  • Offline.
Forum Stats
Member
Level 22
Audiophile
Response to AS: Custem Cursor 2008-06-06 05:30:17 Reply

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
mustangman24
mustangman24
  • Member since: Feb. 14, 2007
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to AS: Custem Cursor 2008-08-11 00:50:21 Reply

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
Magical-Zorse
Magical-Zorse
  • Member since: May. 10, 2008
  • Offline.
Forum Stats
Member
Level 39
Melancholy
Response to AS: Custem Cursor 2008-08-11 02:24:14 Reply

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
zrb
zrb
  • Member since: Aug. 8, 2006
  • Offline.
Forum Stats
Member
Level 11
Blank Slate
Response to AS: Custem Cursor 2008-08-11 02:25:18 Reply

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

Make a new layer, and paste it on it, its the simplest way.


School Sux ! || As :Main || As3: Main || Animation: Main || Flash Tutorials ||

BBS Signature
RandomHuman
RandomHuman
  • Member since: Apr. 4, 2007
  • Offline.
Forum Stats
Member
Level 08
Audiophile
Response to AS: Custem Cursor 2008-08-11 03:08:46 Reply

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

RandomHuman
RandomHuman
  • Member since: Apr. 4, 2007
  • Offline.
Forum Stats
Member
Level 08
Audiophile
Response to AS: Custem Cursor 2008-08-11 03:10:04 Reply

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

baboop
baboop
  • Member since: Feb. 4, 2009
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to AS: Custem Cursor 2009-02-09 23:49:55 Reply

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;
}

Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to AS: Custem Cursor 2009-02-10 04:55:32 Reply

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