View Full Version : Change The Mouse Pointer
rajesh84
01-23-2007, 01:31 PM
HIi Friends,
I Have A Doubt.How To Change The mouse Pointer Inside A flash Movie.
I Create A Movie Clip Named m1.Then Use The Following scripts,
Mouse.hide();
m1.startDrag();
But The Problem Is It Can't Fit The Correct Mouse Position,And When I Click On a Button It Cant Work.
What Can I Do.
Mouse.hide();
onEnterFrame=function(){
m1._x=_xmouse;
m1._y=_ymouse;
}
3pepe3
01-23-2007, 10:17 PM
well noct's solution is ok, but i don't like to use onEnterFrames for the mouse... for the memory usage (well i always use so many onEnterFrames so i try to use some other ways for the things when it's posible
//
if you press f1 and go to see the info about onMouseMove you will find another solution
Oh yeah, good catch, I keep forgetting about that. It isn't exactly the same thing though. As implied by the name, you have to move the mouse for this work. The other script always keeps it on the mouse. (Like when the movie first loads for instance.)
Mouse.hide();
m1.onMouseMove = function() {
this._x = _root._xmouse;
this._y = _root._ymouse;
updateAfterEvent();
};
3pepe3
01-24-2007, 09:59 PM
And also the other option can be working directly in the object ussing the onClipEvent with the enterFrame or mouseMove
:)
masood_mj
01-29-2007, 07:49 PM
I used :
Mouse.hide();
startDrag(_root.m,true);
and that works, also the pivot is on the center of that movie clip
3pepe3
02-01-2007, 03:21 AM
I used :
Mouse.hide();
startDrag(_root.m,true);
and that works, also the pivot is on the center of that movie clip
But with this method what happend if you press some button and you start draging this?!?!?!
the cursor is going to stop working
masood_mj
02-01-2007, 07:02 AM
oh. yes i think there isn't any method to do this. else you write some code to add an instance of that object to the movieclip of the mouse pointer when you want to dragging it!!!
jcmoreno
02-01-2007, 04:36 PM
I made it work but... I need that the mouse pointer stays in the upper level, I'm using multiple levels on my mc and with the script that I saw here I manage to change the pointer, but when any of the other level start to play, the pointer stays in the lower level, I tryed w/
Mouse.hide();
m1.onMouseMove = function() {
m1.getNextHighestDepth () ;
m1._x = _xmouse;
m1._y = _ymouse;
};
but it stays below..
can anyone solve this puzzle??
masood_mj
02-01-2007, 06:40 PM
for changing the depth of a movieclip you can use DepthManager it is a managere class that can change layer or a movieclip
3pepe3
02-01-2007, 11:45 PM
I made it work but... I need that the mouse pointer stays in the upper level, I'm using multiple levels on my mc and with the script that I saw here I manage to change the pointer, but when any of the other level start to play, the pointer stays in the lower level, I tryed w/
Mouse.hide();
m1.onMouseMove = function() {
m1.getNextHighestDepth () ;
m1._x = _xmouse;
m1._y = _ymouse;
};
but it stays below..
can anyone solve this puzzle??
m1.swapDepths(this.getNextHighestDepth());
or the easy way would be to create just one SWF for the mouse and then load this movie_mouse.swf with:
loadMovieNum("movie_mouse.swf",2687)
because swaping and swaping deths must use a lot of resources if you use3 a lot of content
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.