PDA

View Full Version : Call function in form application?


rachel-ny
02-08-2006, 05:25 PM
I'm new to Flash...

If I have an application and on the main application form, on Layer 1 : Frame 1 I made a function: MyTestFunction()

With a button on the main application form, I can call it no problem, but if I have a button on form1 or form2, I can't seem to make the function on the main application form run...

What is the simple answer to this that I know I am missing?

Thanks!
Rachel

reyco1
02-08-2006, 05:45 PM
Hi Rachel:

make it a global function, then it can be called from anywhere:

_global.MyTestFunction = function(msg:String) {
trace(msg);
};

rachel-ny
02-08-2006, 05:56 PM
Works great ... thanks!