Your attempt is spot on. However, there's a caveat to what you are attempting.
So what we need to do is take the contents of that onclick event and apply it to a new event. In this case we want the event to be controlled by the getURL event within Flash.
In this case, as long as the Flash is on the same page as where the function swapLayers is available, we can do the following.
I am not quite sure why the return false exists at the end of the statement, so I removed it. If you are afraid IE will enact upon some return value via this getURL call then you should use the following syntax to void the return.