# Refreshing a loadmovie(jpg)

**URL:** <https://forum.kirupa.com/t/refreshing-a-loadmovie-jpg/13873>\
**Category:** Uncategorized\
**Created:** [February 19, 2003, 5:44am UTC](https://forum.kirupa.com/t/refreshing-a-loadmovie-jpg/13873 "2003-02-19T05:44:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![afjcw](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@afjcw](https://forum.kirupa.com/u/afjcw)\
**Post date:** [February 19, 2003, 5:44am UTC](https://forum.kirupa.com/t/refreshing-a-loadmovie-jpg/13873/1 "2003-02-19T05:44:06Z")

</div>

I’m trying to use loadmovie to bring in jpg images which refresh every 30 seconds on the server. It seems that while the image refreshes on the server, the SWF uses a cached version–and so doesn’t refresh the image after 30 seconds passes.

what is the best way to tell it to check from the server everytime?

jeffwhite

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 19, 2003, 5:54am UTC](https://forum.kirupa.com/t/refreshing-a-loadmovie-jpg/13873/2 "2003-02-19T05:54:55Z")

</div>

Here is an excellent method…

[http://www.kirupaforum.com/showthread.php?s=&threadid=14268&perpage=15&pagenumber=3](http://www.kirupaforum.com/showthread.php?s=&threadid=14268&perpage=15&pagenumber=3)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 20, 2003, 12:53am UTC](https://forum.kirupa.com/t/refreshing-a-loadmovie-jpg/13873/3 "2003-02-20T00:53:58Z")

</div>

Thanks for pointing me to that page…I’m a newbie, though–I tried putting that script after the “on (release)” action of my button, and then following it up with the “load movie” command (still in the braces for the on (release)…and nothing happened. I’m not exactly sure which object to put this stuff on…

Can you be more direct…like Flash for Dumb Dummies!

Jwhite

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 20, 2003, 1:12am UTC](https://forum.kirupa.com/t/refreshing-a-loadmovie-jpg/13873/4 "2003-02-20T01:12:03Z")

</div>

String.prototype.noCache = function(){  
return (\_url.substr(0,4) != “file”) ? this + “?”+new Date().getTime() : this;  
}  
mybutton.onRelease = function(){  
loadMovieNum((“myMovie.swf”).noCache() ,1);  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 20, 2003, 1:31am UTC](https://forum.kirupa.com/t/refreshing-a-loadmovie-jpg/13873/5 "2003-02-20T01:31:52Z")

</div>

Okay, on the button called “show” I have this:

on (release) {String.prototype.noCache = function(){  
return (\_url.substr(0,4) != “file”) ? this + “?”+new Date().getTime() : this;  
}  
show.onRelease = function(){  
mcImage.loadMovie((txtImageURL).noCache() ,1);  
};}

It says there are no code errors–but it doesn’t do anything. I have an input box called “txtImageURL” into which I type the whole URL of the JPG I’m trying to get (including http://…). I’m trying to get the jpg to show where the mcImage instance is.

What am I missing?

jwhite

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 20, 2003, 2:13am UTC](https://forum.kirupa.com/t/refreshing-a-loadmovie-jpg/13873/6 "2003-02-20T02:13:57Z")

</div>

You should insert what i have posted above in the first frame actions!
