I am not quite sure how you send the request from the flashfile, but here is what I would try;
Specify a header from the swf-file, which would not be present in a request from a webbrowser, and then check if the header is present in the top of example.php, and end the script execution if not.
Example:
<?php
if( !isset($_SERVER['HTTP_MYSPECIALHEADER']) ){
die('You cannot access this file directly!');
}
// Do whatever the script should do if the request came from the .swf file.
As I said, I dont know how it works with communication from the swf file, but you could always take a var_dump of the $_SERVER variable to see if there already are any headers you could use to check if the request came from the swf-file.
Edit: How do i know if the request came from flash swf?
Check out this one. As said in that one, I dont think you can be a 100% sure that the request originated from the flash-file, as the user could alwasy manipulate what is sent to the server.