# How to interrupt preloading of external swfs?

**URL:** <https://forum.kirupa.com/t/how-to-interrupt-preloading-of-external-swfs/328545>\
**Category:** flash\
**Created:** [May 24, 2012, 9:03pm UTC](https://forum.kirupa.com/t/how-to-interrupt-preloading-of-external-swfs/328545 "2012-05-24T21:03:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ScarsOfDracula](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@ScarsOfDracula](https://forum.kirupa.com/u/ScarsOfDracula)\
**Post date:** [May 24, 2012, 9:03pm UTC](https://forum.kirupa.com/t/how-to-interrupt-preloading-of-external-swfs/328545/1 "2012-05-24T21:03:13Z")

</div>

Problem:  
I am loading a number of external swf files into one “master” swf. The user can press buttons to trigger the preloading of an external swf. Loading is working fine, except that rapidly pressing a button or pressing multiple buttons will start a huge list of preloads.

What I want:  
I want only one swf to be preloaded at a time. The project should allow a user to “switch” to loading a different swf while one is already in the process of preloading.

What I have:  
I have external swfs preloading properly using the typical Loader class methods. I have seen script like loader.close() and unloadAndStop(), but I can’t figure out how they apply.

Any direction to a sample, or code would be appreciated.
