This is a client side issue, nothing to do with server side and so PHP.
You cant interract between a flash object and javascript unless the Flash is deliberately written in a co-operative mode to pass some informations out to JavaScript.
Thats said, only two mouse events can be catched directly in javascript which been triggered by a flash object:
mouseover event and mouseout. {should be confirmed for all browsers!}
So, if an user trigger the mouseover event from Flash obj, made current window focus changed before any mouseout event from Flash obj been trigerred, you can assume that your user had clicked on Flash banner.
But its really tricky...