Image from URL will not replace

Jim Lambert jplam at netrin.com
Mon Aug 19 17:41:01 CDT 2002


<After the initial run, it always shows the same image...Why does this not
work?

on mouseUp
  put "http://www.google.com/images/logo.gif" into myURLimage
  delete image "online image" of stack "Viewer"
  open stack "Viewer"
  create image "online image"
  set the fileName of image "online image" of stack "Viewer" to myURLimage
end mouseUp >

I've found that after setting the filename this can help:

   hide image "online image"
   show image "online image" with visual effect plain
   show image "online image" with visual effect plain  --yep twice

There may be a more elegant way to force a refresh.

Another tack would be:

     put url myURLimage into image "online image"

This shoves the data (file contents) found at the url into the image's data.

If you
    load url myURLimage
first, you could track the URLstatus of the loading and provide feedback if
you want.

Jim Lambert




More information about the use-livecode mailing list