Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Explorer ,
Jan 09, 2017 Jan 09, 2017

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');

773
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jan 09, 2017 Jan 09, 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?

Translate
Community Expert ,
Jan 09, 2017 Jan 09, 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 09, 2017 Jan 09, 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 09, 2017 Jan 09, 2017

Oh the output panel was blank because I was testing it in browser...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 09, 2017 Jan 09, 2017
LATEST

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines