# unloadAndStop and extending Loader

**URL:** <https://forum.kirupa.com/t/unloadandstop-and-extending-loader/288252>\
**Category:** flash\
**Created:** [May 13, 2009, 1:01pm UTC](https://forum.kirupa.com/t/unloadandstop-and-extending-loader/288252 "2009-05-13T13:01:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wakarimasen](https://avatars.discourse-cdn.com/v4/letter/w/ee59a6/32.png) [@wakarimasen](https://forum.kirupa.com/u/wakarimasen)\
**Post date:** [May 13, 2009, 1:01pm UTC](https://forum.kirupa.com/t/unloadandstop-and-extending-loader/288252/1 "2009-05-13T13:01:47Z")

</div>

hi all,

I have an asset management system which loads a bunch of external swfs, and when requested distributes copies of those swfs to other parts of an app (it creates instances of the classes to do this).

Anyway, when I use these loaded swfs somewhere and then remove them Flash does its trick of leaving the sounds running (as they are triggered by timers).

If they were Loader class items I could use .unloadAndStop() to shut them up and get them garbage collected, but they aren’t of course.

I thought I might be able to extend the Loader class and set the .content my self - which I have done by overiding the content getter in Loader. I was hoping I could then use unloadAndStop on that class but nothing happens. I’ve tried casting my fake Loader to a Loader as well and no joy.

Anyone know a way of giving my fake Loader class that unloadAndStop capability or possibly of another way of stopping all sounds/ timer s etc. on an instantied class over which you have no control?

thanks
