PDA

View Full Version : How to change the cursor image?


Aquamenti
12-01-2007, 11:58 AM
How to change the mouse cursor image in my movie?

Matt
12-01-2007, 12:09 PM
//on frames action panel
cursor.onEnterFrame=function(){
//cursor is the custom cursors instance name
Mouse.hide()
this._x=_xmouse
this._y=_ymouse
}

Aquamenti
12-01-2007, 12:34 PM
thanks.

Govenator
12-01-2007, 01:07 PM
Nice sig, matt

truimagz
12-02-2007, 12:12 AM
//on frames action panel
cursor.onEnterFrame=function(){
//cursor is the custom cursors instance name
Mouse.hide()
this._x=_xmouse
this._y=_ymouse
}


VERY BAD



cursor.onEnterFrame=function(){ <--- creates an unnessary loop

Mouse.hide() <--- hides the mouse every frame, very bad when the mouse is already hidden


At the least put

this._x=_xmouse
this._y=_ymouse


in your main game loop. but prefered you should be using....


/* CURSOR */

var Cursor:MovieClip = this.attachMovie("Cursor", "Cursor", 0)
var mouseListener:Object = new Object();

mouseListener.onMouseMove = function() {

Cursor._x = _xmouse;
Cursor._y = _ymouse;

}

Mouse.addListener(mouseListener);

magcius
12-03-2007, 06:58 AM
AQUEMENTI, please don't hide the mouse cursor in your sig..

It makes my mouse cursor go on and off, even when outside of your movie.

It's VERY annoying.

Aquamenti
12-03-2007, 07:43 AM
Yes I know, I'm trying to get it fixed.

HELP ME, MATT!

(Matt will save me. Not Jesus)

truimagz
12-03-2007, 07:49 AM
you should listen to what i said, haiving it on an onenterframe is WRONG

Aquamenti
12-03-2007, 09:40 AM
truimagz, it works, but doesn't hide the Windows cursor.

LizardRob
12-03-2007, 10:07 AM
Use a code to listener to check if the mouse is on the stage or not, when it's not, don't hide the mouse, when it is, do hide it.

I don't know the code for this, but I imagine that's what you need to do to not get that annoying effect magicius said.

Aquamenti
12-03-2007, 12:47 PM
As long as it takes to fix that signature, I'm without one
*looks @ his sig*

Matt
12-03-2007, 12:56 PM
Yeh I already said (in SL) that you could simple have it show when you roll off the window and hide when you roll on.
And truimagz, you are right. I wasn't thinking about it constantly looping, my bad.

Aquamenti
12-04-2007, 06:39 AM
And now back on topic again? Anyone help me?

Truimagz's version is ALMOST perfect, it doesn't hide the real cursor, though.
Maybe I did something wrong.

edit: I am not in my computer so I will give you my script later.

truimagz
12-04-2007, 10:36 AM
just put an invisible movie clip down over your whole movie, and do onRollOver hide mouse

Aquamenti
12-04-2007, 11:18 AM
Thanks, triumagz.

EDIT: <nevermind, my bad>

Matt
12-04-2007, 02:17 PM
Thanks, triumagz.

EDIT: <nevermind, my bad>
>_<
my_cursor.onEnterFrame=function(){
//my_cursor is the INSTANCE NAME of the CUSTOM cursor
this._x=_xmouse
//MOVE TO THE X POS of the MOUSE
this._y=_ymouse
//SAME FOR Y AXIS
}
_root.button_that_covers_all.onRollOver=function() {
//the instance name of the button that covers the entire sig
Mouse.hide()
//HIDE the mouse
}
_root.button_that_covers_all.onRollOut=function(){
//the instance name of the button that covers the entire sig
Mouse.show()
//SHOW the mouse
}
We gave you all the parts then you look at us to put it together. THERE HAPPY?

Mikeh
12-09-2007, 09:29 PM
I'm new to this stuff, but here we go anyway:

On Frame:
Mouse.hide();
startDrag("INSTANCE NAME OF MOVIE CLIP", true);

Aquamenti
12-18-2007, 08:15 AM
>_<
my_cursor.onEnterFrame=function(){
//my_cursor is the INSTANCE NAME of the CUSTOM cursor
this._x=_xmouse
//MOVE TO THE X POS of the MOUSE
this._y=_ymouse
//SAME FOR Y AXIS
}
_root.button_that_covers_all.onRollOver=function() {
//the instance name of the button that covers the entire sig
Mouse.hide()
//HIDE the mouse
}
_root.button_that_covers_all.onRollOut=function(){
//the instance name of the button that covers the entire sig
Mouse.show()
//SHOW the mouse
}
We gave you all the parts then you look at us to put it together. THERE HAPPY?
I already solved that.