# Calling a function of a parent

**URL:** <https://forum.kirupa.com/t/calling-a-function-of-a-parent/293830>\
**Category:** Uncategorized\
**Created:** [August 4, 2009, 2:12pm UTC](https://forum.kirupa.com/t/calling-a-function-of-a-parent/293830 "2009-08-04T14:12:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashysite](https://avatars.discourse-cdn.com/v4/letter/f/e495f1/32.png) [@flashysite](https://forum.kirupa.com/u/flashysite)\
**Post date:** [August 4, 2009, 2:12pm UTC](https://forum.kirupa.com/t/calling-a-function-of-a-parent/293830/1 "2009-08-04T14:12:41Z")

</div>

I’ve been searching around the forum, and couldn’t find a solution. Any help would be very much appreciated…

Ok I have two movies… parent.swf and content.swf, and I’m trying to call a function in my main.swf from my content.swf. Here is the code…

//function in main.swf  
function appear (event:MouseEvent):void{  
TweenLite.to(title1, 1, {autoAlpha:1, overwrite:false});  
}

//try to call from content.swf  
close\_btn.addEventListener(MouseEvent.CLICK, btnClick);

function btnClick(event:MouseEvent):void {  
MovieClip(parent.parent).appear();  
}

I got an error message as soon as i click on close\_btn. It says appear() is not a property or method.

Would someone help me out on this please?

THANKS ALOT
