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

MovielClip Instance name is null after publishing Canvas app with Animate 20.0

Explorer ,
Nov 12, 2019 Nov 12, 2019

Copy link to clipboard

Copied

Actually all said in the title, you can test attached fla file,

Code is too simple:

 

 

 

console.log(exportRoot.someName); //lib.Symbol1
console.log(exportRoot.someName.name); //null

 

 

 

This code worked without a problem in the previous versions of Animate (at least last two ones, as I remember there was some kind of the problems before too) 

TOPICS
Other

Views

226

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 ,
Nov 12, 2019 Nov 12, 2019

Copy link to clipboard

Copied

Hi.

 

Yeah. It seems the Animate exporter doesn't assign this name property anymore.

But may I ask you why do you need this name property?

 

 

Regards,

JC

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
Explorer ,
Nov 12, 2019 Nov 12, 2019

Copy link to clipboard

Copied

Simple example might be:

Let's say I have 4 movieclips and set "click" eventListsner with one function on all of them, previosuly I could catch which one was clicked like this:

console.log(e.currentTarget.name);

But now I need to name movieclips manually first.

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
LEGEND ,
Nov 12, 2019 Nov 12, 2019

Copy link to clipboard

Copied

LATEST

Animate 2018 and prior don't set the .name property. 2019 does set it. If 2020 isn't setting it again, that's a regression, and should be reported as a bug.

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