Image load asynchronously - Forum

Forum Navigation
You need to log in to create posts and topics.

Image load asynchronously

I would like an image to display only when it has loaded. If not loaded yet, it should show a loading icon or some indicator. Is there a way I could achieve this?

I change src attr using this code:

SetObjectAttribute "Image10" "src" "[imgurl]"

 

 

This may not be quite what you are wanting, but I have put a PNG image that says "Loading..." into my image object in the IDE, which is then replaced later with the SetObjectAttribute code like what you are doing. The PNG placeholder image still needs to be loaded when the app first opens, but its file size is small (because it's mostly just white space) and so it appears quickly.

luishp and ZeroSquidward have reacted to this post.
luishpZeroSquidward

Thanks, it's a good cheat, I think it could work.