AS: Custem Cursor
- BettaThanYou
-
BettaThanYou
- Member since: Feb. 10, 2007
- Offline.
-
- Forum Stats
- Member
- Level 10
- Blank Slate
how do you change it or make it animate if you click
- AeroJenix
-
AeroJenix
- Member since: Feb. 24, 2008
- Offline.
-
- Forum Stats
- Member
- Level 01
- Blank Slate
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
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
How do you get a cursor that stays for the whole flash.
- mustangman24
-
mustangman24
- Member since: Feb. 14, 2007
- Offline.
-
- Forum Stats
- Member
- Level 09
- Blank Slate
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
- Magical-Zorse
-
Magical-Zorse
- Member since: May. 10, 2008
- Offline.
-
- Forum Stats
- Member
- Level 39
- Melancholy
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
- zrb
-
zrb
- Member since: Aug. 8, 2006
- Offline.
-
- Forum Stats
- Member
- Level 11
- Blank Slate
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.
- RandomHuman
-
RandomHuman
- Member since: Apr. 4, 2007
- Offline.
-
- Forum Stats
- Member
- Level 08
- Audiophile
your grammar is terrible and it's Custom, not Custem...
- RandomHuman
-
RandomHuman
- Member since: Apr. 4, 2007
- Offline.
-
- Forum Stats
- Member
- Level 08
- Audiophile
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
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.
-
- Send Private Message
- Browse All Posts (15,977)
- Block
-
- Forum Stats
- Member
- Level 46
- Blank Slate
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;
} 

