Hello,
I have an image on a card. The image source is from a website, i.e.
set the filename of image "my_image" to "http://www.mydomain.com/images/scene.gif"
I also layout a "browse image" and "upload image" buttons on this card. Therefore users can upload a new image (scene.gif) to the website and replace with the old one.
I wish that the image on the card will be changed after the upload is finished. How can I do that? I don't wish to close the card and open it again.
I searched for "update image path" and "refresh image path" but no luck. I also tried to set the filename of image again at the end of the script after the upload but it does not work.
Please help.
Alex
How to refresh an image on card when a new image is uploaded
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How to refresh an image on card when a new image is uploaded
Alex
Nice to meet all of you.
Nice to meet all of you.
Hi Alex,
This should work:
Best,
Mark
This should work:
Code: Select all
put "http://www.mydomain.com/images/scene.gif" into myUrl
unload URL myUrl
lock screen
set the filename of img "My Image" to empty
set the filename of img "My Image" to myUrl
unlock screen
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode