bibixx / react-adobe-animate

Component helping to embed animations from Adobe Animate
MIT License
30 stars 11 forks source link

How to deal with createjs 1.0.0? #24

Closed ksuess closed 4 years ago

ksuess commented 4 years ago

My export from Adobe Animate 20.0 uses StageGL. So I switched from https://code.createjs.com/createjs-2015.11.26.min.js to https://code.createjs.com/1.0.0/createjs.min.js Now I get the error

TypeError: f is undefined createjs_1_0_0.min.js:12:19290 _parseData createjs_1_0_0.min.js:12 a createjs_1_0_0.min.js:12 handleComplete index.js:1 initAdobeAn index.js:1 _dispatchEvent createjs_1_0_0.min.js:12 _dispatchEvent createjs_1_0_0.min.js:12 dispatchEvent createjs_1_0_0.min.js:12 _sendComplete createjs_1_0_0.min.js:16 _loadNext createjs_1_0_0.min.js:17 _handleError createjs_1_0_0.min.js:17 on createjs_1_0_0.min.js:12 _dispatchEvent createjs_1_0_0.min.js:12 _dispatchEvent createjs_1_0_0.min.js:12 dispatchEvent createjs_1_0_0.min.js:12 _sendError createjs_1_0_0.min.js:16 handleEvent createjs_1_0_0.min.js:16 on createjs_1_0_0.min.js:12 _dispatchEvent createjs_1_0_0.min.js:12 _dispatchEvent createjs_1_0_0.min.js:12 dispatchEvent createjs_1_0_0.min.js:12 _handleError createjs_1_0_0.min.js:16 proxy createjs_1_0_0.min.js:15

Any hint how to fix this?

Also I think that some code is missing, thats included in the exported file myanimation.html for example AdobeAn.makeResponsive(true,'both',false,1,[canvas,anim_container,dom_overlay_container]);

bibixx commented 4 years ago

Hey! I haven't tried the new version of AA yet, so I'll have to take a look at it. About the makeResponsive method it was implemented quite recently and it is mainly a wrapper around some functions that were present previously, so I think I am implementing it myself in the component. However in the rewrite of the package to TypeScript I am using the makeResponsive inside the component. So... I hope to have some time tomorrow to take a look at this

ksuess commented 4 years ago

Thank you @bibixx for your prompt response. I'm a little step further. After switching to the minified version of createjs 1.0.0 I realised that an image resource was missing.

No I get another error TypeError: this.lib is undefined and Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.

I'll look at it later and come back to create an updated issue. In the meantime I'll close this issue that changed its topic / is obsolte.

Thank you! Katja