Page 1 of 1

How to refresh an image on card when a new image is uploaded

Posted: Tue Apr 28, 2009 6:01 am
by alex298
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

Posted: Tue Apr 28, 2009 8:18 am
by Mark
Hi Alex,

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
Best,

Mark

Posted: Tue Apr 28, 2009 3:16 pm
by alex298
Dear Mark,

Thanks. It works! You are really amazing:)

Best regards