Flash combined with Javascript

Hi, I am working on a site essentially built with HTML and javascript but have decided to introduce a flash menu.

Currently I am using a dreamweaver command to make the buttons in the menu change the page shown on rollover.

I want this to happen now with my flash menu, but am not sure what commands I have to add to my flash buttons.

The script at the moment is:

<a href="javascript:;" onMouseOver="MM_swapImage('Image2','','images/button2.gif',1);MM_goToURL

('parent','accueil1.html');return document.MM_returnValue" onMouseOut="MM_swapImgRestore()">

<img src="images/button1.gif" alt="Soci&eacute;t&eacute;" name="Image2" width="24" height="24" border="0" id="Image2"></a>

[ That is Javascript not PHP & I have split it up to make it easier to read - there are no breaks in the code.

Should I put that command into a function and then call the function from Flash using getURL?

If thats what I should do please show me how to turn it into a function!

Help, as always, is very much appreciated.