Skip to main content
Participant
November 3, 2017
Resuelto

Creating a movie clip from Image URL

  • November 3, 2017
  • 1 respuesta
  • 444 visualizaciones

First off, allow me to explain I'm completely new to Animate CC, so I apologize if I'm using incorrect terminology anywhere.  Basically, I'm wondering if it's possible in an HTML5 Canvas document to animate a character, but at the start of the animation load an image from an external URL to replace one of the existing animated movieclips. I'm trying to create a character holding a sign that I can update externally and frequently without having to supply all the images in the actual final animation. If it's possible, any pointers on how to achieve this would be greatly appreciated.

    Este tema ha sido cerrado para respuestas.
    Mejor respuesta de kglad

    welcome,

    yes, you can do that.  just create a movieclip character that holds an empty movieclip sign.  you can then load your bitmap of a sign and add the loaded sign to the empty sign:

    var queue = new createjs.LoadQueue(true);

    queue.addEventListener("fileload", loadF.bind(this));

    queue.loadManifest(var manifest = [{src: "yoursign.png",id: "myimage"}];);

    function loadF(e) {

    this.character.sign.addChild(new createjs.Bitmap(e.result););

    }

    1 respuesta

    kglad
    Community Expert
    kgladCommunity ExpertRespuesta
    Community Expert
    November 3, 2017

    welcome,

    yes, you can do that.  just create a movieclip character that holds an empty movieclip sign.  you can then load your bitmap of a sign and add the loaded sign to the empty sign:

    var queue = new createjs.LoadQueue(true);

    queue.addEventListener("fileload", loadF.bind(this));

    queue.loadManifest(var manifest = [{src: "yoursign.png",id: "myimage"}];);

    function loadF(e) {

    this.character.sign.addChild(new createjs.Bitmap(e.result););

    }

    Participant
    November 3, 2017

    Thank you so much! I was able to get this working perfectly!