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

132
Visualizações
Phaser 3 image is unable to load when I host the website

so I am working on a game using Phaser framework. Everything is going smoothly until I deploy using firebase. For some reason, when I try to host the game using firebase, I get an error which shows that the image cannot be foundenter image description here

The error that I get is as such: "Failed to load resource: the server responded with a status of 404 () ". When I change that asset to another image, it also has the same issue. However, when if I were to open the html file in browser, the asset does load and I can see the image. I am not sure why there is an issue like such, but if you are able to help me out, it would be much appreciated

The code below is how I add the image into the picture

preload() {
    this.load.image("engineershirt", "SLICES/upperpri/sm1.png/");
}

create() {
    const engineershirttop = this.add.image(320, 550, "engineershirt");
    engineershirttop.setScale(0.55);
    engineershirttop.setDepth(12);
    engineershirttop.setVisible(true);
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

the slash /at the end is too much, it should only be this.load.image("engineershirt", "SLICES/upperpri/sm1.png");

about 4 years ago · Juan Pablo Isaza Relatório
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