Skip to main content
Inspiring
August 3, 2020
Question

Load movie animate HTML.

  • August 3, 2020
  • 1 reply
  • 235 views

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.

    This topic has been closed for replies.

    1 reply

    Legend
    August 3, 2020

    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