How to call a function in an iframe?

Hi there
I am wondering if anyone can tell me the best way to access the functions of an Iframe from the parent of the frame.
I have tried

var myFrame = document.getElementById('gigmap');
myFrame.flashMouseover(gid);

and

window.frames['gigmap'].document.flashMouseover(gid);

though these didn’t work.

In case you are wondering what I am doing is sending an id of a gig in my database when its button rolled over in a flash swf to a Google Map (inside the Iframe 'gigmap) and make the corresponding marker on the map jump. I have it so the iframed map markers send to the flash file on rollover though not the other way round…yet!

I may not have explained the problem well enough.
here is a better explanation of the problem.

Mainpage function a(‘number’) receives flash variable ‘number’ then sends variable ‘number’ to iframe function b()
The part in red is where I have the problem.