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

Custom Cursor error in Animate

New Here ,
Jan 30, 2020 Jan 30, 2020

Copy link to clipboard

Copied

Hello, I'm trying to make a custom cursor for my project in actionscript and I'm having a bit of problem with the codes. The custom cursor works fine until I turn on the camera. The project is to make an interactive comic and the camera moves around the panels, and for this one specific panel I wanted to change the cursor for the interaction. The cursor changes just fine but as soon as I publish it with the camera on I get a 1120: Access of undefined property error. The error doesn't pop up if I publish it without the camera. Is there a way I can fix this?

TOPICS
ActionScript , Code , Error , How to

Views

470

Translate

Translate

Report

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
Community Expert ,
Jan 30, 2020 Jan 30, 2020

Copy link to clipboard

Copied

you have a reference change.  on the custom cursor's timeline put:

 

trace(this)

 

to see its reference and how it changes when you enable the camera.

 

https://community.adobe.com/t5/animate/debugging-actionscript-3-0-errors/td-p/4788610?page=1

Votes

Translate

Translate

Report

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
New Here ,
Jan 30, 2020 Jan 30, 2020

Copy link to clipboard

Copied

hello, thank you for taking your time answering my question, but I'm not sure if I follow, I just started learning how to use animate and we barely learned anything so I barely have knowledge about coding. I've tried reading the linked source but it was very difficult to understand. If you can, may I request some elaboration on this?

Votes

Translate

Translate

Report

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
Community Expert ,
Jan 30, 2020 Jan 30, 2020

Copy link to clipboard

Copied

on the custom cursor's timeline put:

 

trace(this);

 

1. what do you see in the output panel?

2. what code are you using that's triggering the 1120 error?

Votes

Translate

Translate

Report

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
New Here ,
Jan 30, 2020 Jan 30, 2020

Copy link to clipboard

Copied

1. It still shows the same error codes 1120: Access of undefined property

 

2. I am using a code snipplet of "Custom Mouse Cursor" from adobe itself

 

stage.addChild(name);

name.mouseEnabled = false;

name.addEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor_2);

 

function fl_CustomMouseCursor_2(event:EVENT)

{

name.x = stage.mouseX;

name.y = stage.mouseY;

}

Mouse.hide();

Votes

Translate

Translate

Report

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
Community Expert ,
Jan 30, 2020 Jan 30, 2020

Copy link to clipboard

Copied

LATEST

comment out your code and retest so you can report that trace output.

Votes

Translate

Translate

Report

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