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

Change src of images in library.

Community Beginner ,
Mar 15, 2018 Mar 15, 2018

Good Evening,

I am currently making an animation that changes as I click buttons. Since it uses heavy raster images I have preloaded them in the cache and I want them to replace a current spritesheet by replacing the src and going back to frame 1.

The getelementbyid method will only read elements in the html. Any ideas on how to change src of images defined in the js?

Any ideas on how to do that.

130
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
no replies

Have something to add?

Join the conversation