Can I call a function in my SWF and pass it a parameter from JavaScript in the page?

Hello.
I’m trying to call a function in frame 1 of my SWF and also pass it a parameter.

I need to do this from elsewhere on the embedding HTML page using JavaScript.

For example call the function flashFunction(foo);

Does this require a listener in Flash that listens for the call, excepts “foo” and then calls the flashFunction and passes “foo” to it?

Can this be called directly without a listener?
Can this be done at all?

Any help would be greatly appreciated.

// jOEL