-1

I am working on an older Flash project created in CS3 ActionScript 2.0 How can I make the pointer cursor change to the hand when hover over a list item?

_root.slidePanel.myList

'myList' is the list. I have traced out the contents of the List MC and it has a child MC called 'content_mc'. I assumed this was the object containing all of my list items but the only members of this MC I can see (when tracing them out) are 'setRGB' and 'searchKey'.

Can someone offer some help?

Nick
  • 19,198
  • 51
  • 185
  • 312
  • Do you mean the default angled cursor (default) turn to the hand cursor with the finger pointing (pointer), or the hand cursor with the finger pointing (pointer) turn to the open-hand cursor (move on Mac)? – zzzzBov Nov 09 '10 at 15:55
  • I mean change the 'arrow' to a 'pointing hand' - I believe the first thing you described. Just like you would expect when hovering over a link. – Nick Nov 09 '10 at 15:58
  • this shouldn't be tagged "actionscript-3". – jowie Nov 23 '11 at 15:37

1 Answers1

0

Not sure about AS2, but this should work in AS3. If you don't want AS3 answers, you may want to untag 'actionscript-3'

To get a custom cursor you'll need to attach MouseEvent.MOUSE_ENTER and MouseEvent.MOUSE_LEAVE to whatever it is you want to have the custom cursor.

function mouseEntered(e:MouseEvent):void
{
 Mouse.hide();
 stage.addEventListener(MouseEvent.MOUSE_MOVE, moveCursor);
 //create mouse cursor and add to stage
}

function mouseLeft(e:MouseEvent):void
{
 Mouse.show();
 stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveCursor);
 //remove mouse cursor from stage
}

function moveCursor(e:MouseEvent):void
{
 // move the mouse cursor to wherever the mouse is.
}

This is one way of handling a custom cursor. You'll need to design a cursor that can be moved around the stage as the mouse is moved.

EDIT to add:
In AS3, Sprites have a property: useHandCursor that can be set to true to show the pointer when hovered over.

zzzzBov
  • 174,988
  • 54
  • 320
  • 367
  • Ouch.. I wasn't expecting that I would have to design my own pointer. I assumed that I could make the list items behave like a link. – Nick Nov 09 '10 at 16:16
  • @Nick if useHandCursor works, you wont have to design your own. – zzzzBov Nov 09 '10 at 16:18
  • So your above solution would work. AS2 does not have useHandCursor property it would appear. – Nick Nov 18 '10 at 04:26