# Best approach to this?

**URL:** <https://forum.kirupa.com/t/best-approach-to-this/265106>\
**Category:** flash\
**Created:** [July 4, 2008, 1:30am UTC](https://forum.kirupa.com/t/best-approach-to-this/265106 "2008-07-04T01:30:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [July 4, 2008, 1:30am UTC](https://forum.kirupa.com/t/best-approach-to-this/265106/1 "2008-07-04T01:30:28Z")

</div>

Was hoping someone could advice me on the best approach in this scenario;

[doc] class  
Has an instance of ‘BgSlide’ class addChilded

[BgSlide] class  
Has a few instances of BgLoader class in an array (they get added after they are loaded)

[BgLoader] class  
Loads a image into a sprite container.

Now… There’s a bunch of other stuff ‘above’ the BgSlide child back in the document class, and when an instance of ‘bgloader’ Loads, I’d like the mouse cursor to become the progress loader for that slide.

Not quite sure how to accomplish that… I mean the listener is inside the BgLoader class which is nested in another class. How would I get access to something all the way out in the doc class and update it ProgressEvent.Progress?

Thanks guys… :stare:

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [July 4, 2008, 1:39am UTC](https://forum.kirupa.com/t/best-approach-to-this/265106/2 "2008-07-04T01:39:37Z")

</div>

I’d have BgSlide listen to all of its BgLoader children and have it broadcast to the rest of the movie.

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [July 4, 2008, 2:02am UTC](https://forum.kirupa.com/t/best-approach-to-this/265106/3 "2008-07-04T02:02:43Z")

</div>

so essentially creating listeners all the way down the chain? Seems so clunky 😕

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [July 4, 2008, 2:31am UTC](https://forum.kirupa.com/t/best-approach-to-this/265106/4 "2008-07-04T02:31:02Z")

</div>

Think of BgSlide as a manger class. I assume that it handles the creation of the BgLoader instances. So when you create a new instance of BgLoader, just add BgSlide as a listener of it. Then you’ll have one function in BgSlide which listens for all the events from it’s children and re-broadcasts it to whoever wants it.
