Need a method to call a function

HI Guys,

I just want to know if we can execute a function defined in flash in the SWF itself, when we pass on it through some external HTML ( Javascript )

if so How?

more details :

I have an swf… it has a button on click call a JS, it triggers the loading of SWF to a frame in the HTML… I want to get a variable from the 2nd SWF in the 1st.

Anyway out ?