# How To Trigger A function on a Frame from a movieclip?

**URL:** <https://forum.kirupa.com/t/how-to-trigger-a-function-on-a-frame-from-a-movieclip/225744>\
**Category:** flash\
**Created:** [May 15, 2007, 10:52am UTC](https://forum.kirupa.com/t/how-to-trigger-a-function-on-a-frame-from-a-movieclip/225744 "2007-05-15T10:52:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lovejeet](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@lovejeet](https://forum.kirupa.com/u/lovejeet)\
**Post date:** [May 15, 2007, 10:52am UTC](https://forum.kirupa.com/t/how-to-trigger-a-function-on-a-frame-from-a-movieclip/225744/1 "2007-05-15T10:52:33Z")

</div>

hi all,  
well i have a function written on frame one but i want it to get triggered on the on ClipEvent handler of a movie clip that is placed on frame 2. but it doesn’t seems to work…

as on frame one  
function textBoxVal() {  
test2 = “hello”;  
}

as on frame two (on the movie clip)  
onClipEvent (data) {  
textBoxVal();  
}  
what should i change?any help is appreciated.

thanks in advance!!
