# Accessing a parent instance from a loaded swf

**URL:** <https://forum.kirupa.com/t/accessing-a-parent-instance-from-a-loaded-swf/311972>\
**Category:** flash\
**Created:** [July 21, 2010, 1:40pm UTC](https://forum.kirupa.com/t/accessing-a-parent-instance-from-a-loaded-swf/311972 "2010-07-21T13:40:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Orchard](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@Orchard](https://forum.kirupa.com/u/Orchard)\
**Post date:** [July 21, 2010, 1:40pm UTC](https://forum.kirupa.com/t/accessing-a-parent-instance-from-a-loaded-swf/311972/1 "2010-07-21T13:40:46Z")

</div>

I have a “MainSWF”, that loads and places other SWFs “LoadedSWF”. The LoadedSWF has buttons that are supposed to make some layers in the MainSWF visible/invisble. These layers are in a placed navigation bar that is defined as a symbol, was placed on the Main Stage and given the instance name “FlashStageMainNavigation”. I have a hard time figuring out how to address the layers in the MainSWF, because it seems I am missing something.

When I use a loop to trace all the child instances on the stage of the MainSWF with:

this.getChildAt(i).name

I get the following info:

instance1 this.name=0  
FlashStageMainNavigation this.name=4

When I trace stage.getChildByName(this.name) in MainSWF I get “FSMain”, which is the name of my main Class

My assumption was, that I could (from the LoadedSWF) address the Navigationbar in the MainSWF by using something like:

stage.FSMain.FlashStageMainNavigation.visible = false; //or  
stage.getChildByName(“FSMain”).FlashStageMainNavigation.visible = false; //or  
stage.getChildByName(“FlashStageMainNavigation”).visible = false;

neither of that worked.

To sum up/rephrase my question:  
How can I find out, which object instances are placed on the stage and how do I address them from the LoadedSWF?

Any help is greatly appreciated, because I am literally at my wits’ end.
