Skip to main content
aleksis63820686
Inspiring
January 9, 2017
Answered

I'm trying to get hand cursor to movie clip when I roll over it

  • January 9, 2017
  • 2 replies
  • 826 views

Hello!

I'm noob to this program (animate cc)

I'm trying to make a movie clip buttons to my website. I'm using action script 3.0, but I don't understand anything from that code language...

I added this code (below), but It draws rectangle and I want to add the hand cursor to the whole movie clip or layer inside the movie clip.

Any way to do this?

- Aleksi

var mc:MovieClip = new MovieClip();

mc.graphics.beginFill(0);

mc.graphics.drawRect(0,0,50,50);

mc.graphics.endFill();

mc.buttonMode = true;

addChild(mc);

mc.addEventListener(MouseEvent.CLICK, _click);

function _click(e:MouseEvent):void

{

    trace('a');

    This topic has been closed for replies.
    Correct answer aleksis63820686

    I found the code that works <3<3<3<3<3<3<3

    For actionscript 3.0 it's (btn1 is instance name for my button)

    btn1.buttonMode = true;

    I found answer from this link:

    How to make my movie clip SWF show hand cursor?

    2 replies

    aleksis63820686
    aleksis63820686AuthorCorrect answer
    Inspiring
    January 9, 2017

    I found the code that works <3<3<3<3<3<3<3

    For actionscript 3.0 it's (btn1 is instance name for my button)

    btn1.buttonMode = true;

    I found answer from this link:

    How to make my movie clip SWF show hand cursor?

    kglad
    Community Expert
    Community Expert
    January 9, 2017

    when you test that (after closing _click() ), you should see a 50x50 black square at the upper left of your stage.  when you mouseover that square your cursor should change to a hand. when you click the square you should see something in the output panel.

    do you see all that?

    aleksis63820686
    Inspiring
    January 9, 2017

    I tested that and I see the black rectangle and the hand appears when I roll over it. The output panel is blank when I press the square?