# How to check if a swf is loaded/prevent it from loading again?

**URL:** <https://forum.kirupa.com/t/how-to-check-if-a-swf-is-loaded-prevent-it-from-loading-again/215638>\
**Category:** flash\
**Created:** [February 8, 2007, 9:35pm UTC](https://forum.kirupa.com/t/how-to-check-if-a-swf-is-loaded-prevent-it-from-loading-again/215638 "2007-02-08T21:35:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![azukizero](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@azukizero](https://forum.kirupa.com/u/azukizero)\
**Post date:** [February 8, 2007, 9:35pm UTC](https://forum.kirupa.com/t/how-to-check-if-a-swf-is-loaded-prevent-it-from-loading-again/215638/1 "2007-02-08T21:35:38Z")

</div>

I think it’s summed up in the title pretty good but for even more fun, here’s the situation:

I have a menu nav that loads swfs into a container clip. Once the swf loads, the menu nav unloads and is replaced by a page-specific nav. If the user clicks on the menu button, the page-specific nav is unloaded and replaced by the menu nav. …this is to toggle back and forth between the two nav menus, as I’m sure you’ve noticed 😉

Once a swf has loaded and if the user loads the menu nav, the option to load the same swf (current swf) appears. Rather than reload the current swf, is there anyway I can have the button check if that specific swf is already loaded and if so, not load it again?

I’m guessing something like this but I’m not sure what the condition should be:

Btn1.onRelease = function() {  
if(movie1.swf = loaded){  
this.enabled = false;  
} else {  
movieLoader.loadClip(“movie1.swf”, movieHolder);  
}

Thanks for any advice!
