Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

131
Visualizações
Issue with using Create JS in Animate to use external assets (images/audio)

Im trying to make an interactive html ad using Adobe Animate and I do know how to do with the tools it provides while having assets stored on a local drive. But the issue is that my client wants me to export the ad as HTML and wants me to use all the assets from the web (he's providing me with all the URL links) but I have no idea how to use create js' libraries and commands so I can use those links to import the assets into the project.

I'd really appreciate if someone could help!

I asked the same question on reddit and adobe forum Ive got one reply that was saying the following (that solution didn't work for me or maybe I didnt paste the code into Animate correctly):

to load images

if(!alreadyExecuted){
  this.imageA = \[\];
  var imagePaths("./images/image1", etc);
  alreadyExecuted = true;
  var index = 0;
  imageF.bind(this)(imagePathA\[0\])
}

function loadF(){
  imageF(imagePathA\[index\])
}

function imageF(imgPath) {
  var image = new Image();
  image.onload = onLoadF.bind(this);
  image.src=imgPath;
}

function onLoadF(e) {
  var img = new createjs.Bitmap(e.target);
  this.imageA.push(image);  // still hasn't been added to display list or positioned
  index++;
  if(index\<imagePathsA.length){
    imageF.bind(this)(imagePathA\[index\])
  } else {
    // loading complete. do whatever
  }
}

to load sound and play a sound:

createjs.Sound.registerSound(path to sound, "soundID");

this.your_button.addEventListener('click',playF.bind(this));

function playF(){
  var soundInstance = createjs.Sound.play("soundID");
  //soundInstance.addEventListener("complete",cF.bind(this));  // if you want to 
  know when sound completes play
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda