# Loading images dynamically. Avoiding cache

**URL:** <https://forum.kirupa.com/t/loading-images-dynamically-avoiding-cache/65136>\
**Category:** Uncategorized\
**Created:** [September 23, 2004, 9:12am UTC](https://forum.kirupa.com/t/loading-images-dynamically-avoiding-cache/65136 "2004-09-23T09:12:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![superduper](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@superduper](https://forum.kirupa.com/u/superduper)\
**Post date:** [September 23, 2004, 9:12am UTC](https://forum.kirupa.com/t/loading-images-dynamically-avoiding-cache/65136/1 "2004-09-23T09:12:33Z")

</div>

[color=black]Hi! I used this code to load some images into my site. Does anybody know how my code should look like if I want to load it with an uniqe parameter. I’m truly sorry: my english isn’t very good![/color]

:p:my code:

```auto
_root.createEmptyMovieClip("container",1);
container.loadMovie("bilder/front.jpg");
container._x = 120 ;
container._y = 100 ;

```

låvv frode

---

<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:** [September 23, 2004, 4:53pm UTC](https://forum.kirupa.com/t/loading-images-dynamically-avoiding-cache/65136/2 "2004-09-23T16:53:38Z")

</div>

isn’t this possible? if it isn’t that is a major problem for me. cause I want my site to load new images every now and then!

---

<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:** [September 23, 2004, 8:57pm UTC](https://forum.kirupa.com/t/loading-images-dynamically-avoiding-cache/65136/3 "2004-09-23T20:57:01Z")

</div>

do a search (google or whatever) for flash cache issues, there is a way to use a randomly generated number to make each loadmovie unique… I can’t remember where i saw it now though, check the tutes at [actionscript.org](http://actionscript.org) as well…

good luck…

---

<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:** [September 23, 2004, 9:02pm UTC](https://forum.kirupa.com/t/loading-images-dynamically-avoiding-cache/65136/4 "2004-09-23T21:02:51Z")

</div>

what are you trying to do? load an external image, with the same name, but different content every few weeks? You want to avoid having the users browser cache the image??

---

<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:** [September 24, 2004, 10:54am UTC](https://forum.kirupa.com/t/loading-images-dynamically-avoiding-cache/65136/5 "2004-09-24T10:54:47Z")

</div>

> [@3rdeye](#):
>
> what are you trying to do? load an external image, with the same name, but different content every few weeks? You want to avoid having the users browser cache the image??

yeah, that’s pretty much what I’m trying to do.  
I have a code I’m using to load my text, and it works perfect. The problem is that I don’t know how I can use that code for the images.

```auto
 myIdentifier=Math.round(Math.random()*10000);
loadMovie("myAnim.swf?uniq="+myIdentifier,1);

```

I want this code to load an image named “front.jpg”, and whenever I upload a new “front.jpg”-image I want it to change in the swf.

---

<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:** [September 24, 2004, 12:43pm UTC](https://forum.kirupa.com/t/loading-images-dynamically-avoiding-cache/65136/6 "2004-09-24T12:43:30Z")

</div>

yeah, that looks familiar… you can use the same thing for loading your image file

---

<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:** [September 28, 2004, 8:25am UTC](https://forum.kirupa.com/t/loading-images-dynamically-avoiding-cache/65136/7 "2004-09-28T08:25:58Z")

</div>

Hi! I know that I can use the code, but I’m not sure how! Can u help me?

---

<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:** [September 28, 2004, 1:24pm UTC](https://forum.kirupa.com/t/loading-images-dynamically-avoiding-cache/65136/8 "2004-09-28T13:24:33Z")

</div>

```auto
 myIdentifier=Math.round(Math.random()*10000);
holder.loadMovie("myimage.jpg?uniq="+myIdentifier,1);

```

give that a shot

“holder” is the container MC you’re loading images into.
