Disclaimer: I have no practical experience, so this is purely hypothetical.
The best option would be if the ad network company offered a Flash API / guide to show ads in Flash applications, because then it's no different in megazine than in any other Flash app. If not there's the hurdle of the crossdomain loading stuff. If the network doesn't have a crossdomain.xml allowing everyone / all their customers (second highly unlikely) a direct load probably won't work. So you could try a PHP / whatever script on your server to act as a kind of proxy. The other tricky part could be the links, depending on how they're realized. If it's just a "GET" request, you can do the same from within Flash (by just adding the query string, obviously). If it's post a little more Flash hackery would be needed, but not that bad (just a custom URLRequest object with POST as its method).
Anyway, as I said, that's just hypothesis. Nothing's certain until you observe it