# Access to parent swf functions

**URL:** <https://forum.kirupa.com/t/access-to-parent-swf-functions/247910>\
**Category:** flash\
**Created:** [January 1, 2008, 2:30pm UTC](https://forum.kirupa.com/t/access-to-parent-swf-functions/247910 "2008-01-01T14:30:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryebred](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@Ryebred](https://forum.kirupa.com/u/Ryebred)\
**Post date:** [January 1, 2008, 2:30pm UTC](https://forum.kirupa.com/t/access-to-parent-swf-functions/247910/1 "2008-01-01T14:30:24Z")

</div>

Hello,  
I was wondering if there was a way to reference methods in the parent movie from the child. The following is a snippet of what i am currently doing

Parent AS DocumentClass:

Security.allowDomain(domain+"\*");

displayObject = new Loader();  
displayObject.load(new URLRequest(list.location), new LoaderContext(false,ApplicationDomain.currentDomain));  
displayObject.contentLoaderInfo.addEventListener(Event.INIT,swfLoadComplete);  
addChild(displayObject);

```
private function swfLoadComplete(e:Event):void {

```

displayObject.contentLoaderInfo.removeEventListener(Event.INIT,swfLoadComplete);  
displayObject = e.target.content;  
loader.visible = false;  
}

```
    public function testfunction(){
        trace("this is a test");
    }

```

Child SWF:  
Security.allowDomain(domain+"\*");  
trace(parent) // returns null when loaded into the parent i would have thought that it would return the loader object
