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

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!!