PDA

View Full Version : cursor


sandman9
11-26-2002, 05:29 PM
I made a custom cursor ........ how do I make something appear on it (could be anything, a red line, wiggle, etc) ........ when the mouse is pressed

PS-if i didn't explain that properly let me know

thx
Sandman9

jimburton
11-26-2002, 06:54 PM
make it an mc with two or more frames, eg "up" (frame 1) and "down" (frame 2) and stop() action on frame one then create event handlers:

coursor_mc.onMouseDown = function() {
this.gotoAndStop("down");
}
cursor_mc.onMouseUp = function() {
this.gotoAndStop("up");
}

sandman9
11-26-2002, 10:33 PM
thx Jim

sandman9
11-27-2002, 05:37 AM
where do i attach that code Jim .... i put it with the rest of my code in the main screen .... have a look (i just added your code to the end of my code-and mycursor is the instance name of my cursor)

onClipEvent (mouseMove) {
setProperty("_root.mycursor", _x, _root._xmouse);
setProperty("_root.mycursor", _y, _root._ymouse);
Mouse.hide();
updateAfterEvent();
cursor_mycursor.onMouseDown = function() {
this.gotoAndStop("Down");
}
cursor_mycursor.onMouseUp = function() {
this.gotoAndStop("Up");
}
}

Thx
Sandman9

jimburton
11-27-2002, 08:42 AM
put it on frame 1 of the main timeline, not on a clip and use startDrag rather than following the mouse:


Mouse.hide();
startDrag("cursor_mycursor",true);//dont know if instance name should be in quotes offhand...
cursor_mycursor.onMouseDown = function() {
this.gotoAndStop("Down");
}
cursor_mycursor.onMouseUp = function() {
this.gotoAndStop("Up");
}

sandman9
11-28-2002, 07:21 AM
so i make the graphic in a movie clip with two states made and labeled (down and up) ...... then is it in the main screen that I add that code in?

thx
Sandman9

jimburton
11-28-2002, 10:27 PM
yes, but read "frames" by "states" and "main timeline" by "main screen"......

sandman9
11-29-2002, 05:55 AM
thx guys

Sandman9