# Access child.swf function from parent.swf - 2

**URL:** <https://forum.kirupa.com/t/access-child-swf-function-from-parent-swf-2/278173>\
**Category:** flash\
**Created:** [December 23, 2008, 1:28pm UTC](https://forum.kirupa.com/t/access-child-swf-function-from-parent-swf-2/278173 "2008-12-23T13:28:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shubs6](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@shubs6](https://forum.kirupa.com/u/shubs6)\
**Post date:** [December 23, 2008, 1:28pm UTC](https://forum.kirupa.com/t/access-child-swf-function-from-parent-swf-2/278173/1 "2008-12-23T13:28:57Z")

</div>

Hi friends,  
I’m facing this disgusting problem and I’m sharing with you again for solution. I’m unable to call a child.swf’s function from Parent.swf.

1. Make a new Flex project and use child.mxml as the main mxml file.

```auto

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    
    <mx:Script>
        <![CDATA[
            public function dummy():void
            {
                var i:int = 0;
                i++;                
            }
            
        ]]>
    </mx:Script>
        
</mx:Application>

```

1. Create a build using Export Release Build option.
2. Make another new project and use Parent.mxml as the mail mxml file.

```auto

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
        
    <mx:Script>
        <![CDATA[
            private function callChildSwf():void
            {
                var loader:Loader = new Loader();
                loader.load(new URLRequest("child.swf"));                
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE , callFunc);                
            }
            private function callFunc(e:Event):void
            {
                (e.target.loader.content as MovieClip).dummy;                
            }
        ]]>
    </mx:Script>
    
    <mx:Button x="61" y="39" label="Button" id="btn" click="callChildSwf()"/>
    
</mx:Application>

```

1. Copy child.swf created in step 2 in second project.
2. Run the Parent.swf.

You will get a runtime error “ReferenceError: Error #1069: Property dummy not found on \_child\_mx\_managers\_SystemManager and there is no default value.”

How do i solve this?
