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

Change src of images in library.

Community Beginner ,
Mar 15, 2018 Mar 15, 2018

Copy link to clipboard

Copied

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.

Views

122
Translate

Report

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