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

Load movie animate HTML.

Explorer ,
Aug 03, 2020 Aug 03, 2020

Hello,

The following code:
var myClip = new lib.LibraryClipl();
this.addChild(myClip);

works to load a graphical occurrence of the library but does not seem to work to load a movieClip occurrence. Did I make a mistake or is there another code? Also, is there a way to delete this loaded clip?

Thank you very much for all your help.

204
Translate
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 ,
Aug 03, 2020 Aug 03, 2020
LATEST

You can't "load" movieclips in HTML5 Canvas documents. What you're attempting to do there is instantiate an already-loaded symbol from the library.

 

There is no difference between the code for adding graphics vs adding movieclips. If your movieclip-adding code isn't working, you've messed something up.

 

And yes, there's a way to delete added clips.

https://www.createjs.com/docs/easeljs/classes/Container.html#method_removeChild

 

Translate
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