# REMOVED\_FROM\_STAGE loaded swf + removeChild routines

**URL:** <https://forum.kirupa.com/t/removed-from-stage-loaded-swf-removechild-routines/312409>\
**Category:** flash\
**Created:** [August 2, 2010, 7:25pm UTC](https://forum.kirupa.com/t/removed-from-stage-loaded-swf-removechild-routines/312409 "2010-08-02T19:25:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrickjv](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@patrickjv](https://forum.kirupa.com/u/patrickjv)\
**Post date:** [August 2, 2010, 7:25pm UTC](https://forum.kirupa.com/t/removed-from-stage-loaded-swf-removechild-routines/312409/1 "2010-08-02T19:25:44Z")

</div>

I have a .swf file being loaded with a very large amount of internal objects/childs/loaded-contents.

Been preparing a general cleanup method removing listeners, timers, tweens, children, sound, netstreams and so on.

When i run the cleanup function with a simple internal button, all is performed perfectly.

But as soon as I load the .swf and unload it in a container .fla, then the REMOVED\_FROM\_STAGE which calls stopall() function doing the cleanup (in 2 steps), I get error

```auto
 
Error: Error #2069: The Loader class does not implement this method.
 at Error$/throwError()
 at flash.display::Loader/removeChildAt()
 at classes::presentor/checkifchildren()
 at classes::presentor/checkifchildren()
 at classes::presentor/checkifchildren()
 at classes::presentor/checkifchildren()
 at classes::presentor/checkifchildren()
 at classes::presentor/checkifchildren()
 at classes::presentor/checkifchildren()
 at classes::presentor/checkifchildren()
 at classes::presentor/removeallremainingchildren()
 at classes::presentor/cleanrest()
 at classes::presentor/stopall()
 at flash.display::DisplayObjectContainer/removeChild()
 at load_fla::MainTimeline/rem()
 at load_fla::MainTimeline/remove()

```

basically It looks like the Loader class is not allowed to perform the second cleanup part which removes all the child objects.

Why?

And also another minor detail, seems like URLLoader (loader which loads a CSS file) is not allowed to unload with line

```auto
 
loader.unload();

```

another weird thing.

So, anybody knows what I’m missing?
