CreateJS / EaselJS

The Easel Javascript library provides a full, hierarchical display list, a core interaction model, and helper classes to make working with the HTML5 Canvas element much easier.
http://createjs.com/
MIT License
8.13k stars 1.97k forks source link

Adobe Animate export bug: objects of the same type have the same 'unique id' #985

Closed Nestorferrando closed 5 years ago

Nestorferrando commented 6 years ago

Hi, I noticed that when I create two items (movieclip, sprites, ect), of the same type that have been designed with Animate, they share the same unique Id, causing errors on movieclip timelines when several objects of the same type are present.

This is caused by the javascript code created by Animate. For example:

(lib.B_8 = function() { this.spriteSheet = ss["Lucky Sevenatlas"]; this.gotoAndStop(122); }).prototype = p = new cjs.Sprite();

all objects of type B_8 share the properties of its prototype. This makes them to have the same id.

Sharing the same id can cause problems on movieclip timelines because managed children stored in '_managed' variable, are accessed by its id. If two items of the same type are added to the timeline, they will overwrite each other on the _managed list, causing incoherences.

Nestorferrando commented 6 years ago

Since it is a animate cc bug, I reported it to them. Maybe this can stay here for informative purposes.

If you consider this is not the place, just close it :D

lannymcnie commented 5 years ago

Unfortunately the spritesheet implementation is 100% Adobe-controlled. We are hoping to influence some better approaches to the template code, but in the mean time, we can't do anything.