# Cache Issues

**URL:** <https://forum.kirupa.com/t/cache-issues/66076>\
**Category:** flash\
**Created:** [October 2, 2004, 6:30am UTC](https://forum.kirupa.com/t/cache-issues/66076 "2004-10-02T06:30:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wizard](https://avatars.discourse-cdn.com/v4/letter/w/a87d85/32.png) [@wizard](https://forum.kirupa.com/u/wizard)\
**Post date:** [October 2, 2004, 6:30am UTC](https://forum.kirupa.com/t/cache-issues/66076/1 "2004-10-02T06:30:03Z")

</div>

Yep, it’s another question about cache issues.

Let me get down to it.

How would I incorporate this: [Cache tut., with this one: [URL=http://www.kirupa.com/developer/mx2004/transitions.htm]Transitions Between External Files](http://www.kirupa.com/developer/actionscript/tricks/cache.htm)?

The script on the transitions tutorial is:[AS]  
on (release) {

if (\_root.currMovie == undefined) {

\_root.currMovie = “main”;  
container.loadMovie(“main.swf”);  
} else if (\_root.currMovie != “main”) {  
if (container.\_currentframe \>= container.midframe) {

\_root.currMovie = “main”;  
container.play();

}

}

}  
[/AS]I think I may have an idea, but would like to hear it from someone else.

How would I add the script from the cache tutorial into this script?

---

<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:** [October 2, 2004, 11:14am UTC](https://forum.kirupa.com/t/cache-issues/66076/2 "2004-10-02T11:14:57Z")

</div>

Like this?

```auto

on (release) {
	if (_root.currMovie == undefined) {
		_root.currMovie = "main";
		myIdentifier = Math.round(Math.random()*1000000);
		container.loadMovie("main.swf?uniq="+myIdentifier);
	} else if (_root.currMovie != "main") {
		if (container._currentframe>=container.midframe) {
			_root.currMovie = "main";
			container.play();
		}
	}
}

```

---

<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:** [October 2, 2004, 5:50pm UTC](https://forum.kirupa.com/t/cache-issues/66076/3 "2004-10-02T17:50:50Z")

</div>

Well that’s what I was thinking but wanted someone else to either confirm it or correct it. Thanks for your reply… anyone else want to add something to this?

---

<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:** [October 2, 2004, 10:14pm UTC](https://forum.kirupa.com/t/cache-issues/66076/4 "2004-10-02T22:14:04Z")

</div>

Anyone? Anyone at all. :ne:

---

<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:** [October 3, 2004, 9:04am UTC](https://forum.kirupa.com/t/cache-issues/66076/5 "2004-10-03T09:04:02Z")

</div>

it’s correct, but I would use the date+time instead of a random number (more secure)
