# Delete child created in another function

**URL:** https://forum.kirupa.com/t/delete-child-created-in-another-function/332548
**Category:** flash
**Created:** [July 21, 2014, 3:48am UTC](https://forum.kirupa.com/t/delete-child-created-in-another-function/332548 "2014-07-21T03:48:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![newtome](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtome](https://forum.kirupa.com/u/newtome)
#### Post date: [July 21, 2014, 3:48am UTC](https://forum.kirupa.com/t/delete-child-created-in-another-function/332548/1 "2014-07-21T03:48:11Z")

</div>

This is my first venture into the world of classes so apologies in advance for my newbie terminology. I have implemented a very nice “Busy” indicator courtesy of Daniels Tech Ramblings and it’s initiated by:

var loadInd = new LoadIndicator(this, 250, 200);

and is stopped via:

loadInd.destroy();

My problem is that the variable ‘loadind’ is created in one function and I need to stop it in another function where said variable is unknown - Variable loadind is not defined.

How do I get around this?
