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

Animate's cjs.MovieClip export vs Flash's cjs.Container

Community Beginner ,
Jul 31, 2019 Jul 31, 2019

Copy link to clipboard

Copied

Hi all,

I'm sorry if you consider the discussion's title inappropriate.

I've noticed that there are differences in the published JavaScript/HTML files.

Here is an example:

I have a *.fla file which contains a movie clip with only a guide layer nested inside.

// Flash

In the published JS file this movie clip extends cjs.Container and does not have any nominalbounds

(lib.mc = function() {

this.initialize();

}).prototype = p = new cjs.Container();

p.nominalBounds = null;

// Animate 2019

In the published JS file this movie clip extends cjs.MovieClip and does have nominalbounds

(lib.mc = function(mode, startPosition, loop) {

this.initialize(mode, startPosition, loop, {});

}).prototype = p = new cjs.MovieClip();

p.nominalBounds = new cjs.Rectangle(0,0,0,0);

From what I've read Animate is backward compatible (i.e. should break any previously working applications), but this doesn't seems completely true.

I wanted to check  if anyone knows more about this change and also if someone has experienced some problems with it, as I'm facing two problems described below.

With this change I can see two potential bugs:

1. If a certain code is checking for an cjs object has nominal bounds (i.e. if (mc.nominalBounds) do something; else do something else)

2. If the mc is being cloned by the cjs.Container.clone method. cjs.MovieClip does not have a clone method and throws an error.

Thank you in advance!

Views

260

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
no replies

Have something to add?

Join the conversation