AS3 and php communication problem

Hello.
my problem is this:
i have a video player that on EVENT.COMPLETE
passes vars to a php file and then recives vars back.
when i run the swf on my localhost it works perfectly fine but when i use it from the server it doesn’t fire the EVENT.COMPLETE and the HttpStatus is 0
i have googled for days and i’m know close to commit suicide.
I would be greatfull if you saved my life :slight_smile:
P.S
the EVENT.INIT is something i saw in another site, without same result.
i tried puting the swf in an HTML on the serv in using iframe instaed of embeding in the php, no good
php file:


//some functions
if ($_POST['status']=="complete"){
$flag = true;
//writeFlashVar recives var name and value and echos it with = and & if more //then one flash var.
writeFlashVar("id",$_SESSION['vid']);
writeFlashVar("user",$_SESSION['username']);
}
//rest of the code like : includes,setting the html etc.

this is the AS3 code:
i use netstream instead of FLVPlayback component


//this function handles the EVENT.COMPLETE 
function UpdateResult():void{
debugText.text = " finished"; // just a textbox in the swf
debugText.visible = true;
var request:URLRequest = new URLRequest("mysite.com/video.php");
request.method = URLRequestMethod.POST; 
var variables:URLVariables = new URLVariables(); 
 
variables.status="complete"; 
request.data = variables; 
 
var loader:URLLoader = new URLLoader (request); 
loader.addEventListener(Event.COMPLETE, onComplete); 
loader.addEventListener(Event.INIT, onComplete);
loader.addEventListener(HTTPStatusEvent.HTTP_STATUS,onStatusChange);
loader.addEventListener(IOErrorEvent.IO_ERROR,onMessageFail);
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,onMessageFail);
loader.dataFormat = URLLoaderDataFormat.TEXT; 
// why text and not VARIABLES? saw that in another forum as possible //solution 
try
{
loader.load(request);
}
catch (err:SecurityError)
{
debugText.text = "security error: " + err.message;
}
 
 
}
function onStatusChange(e:HTTPStatusEvent){
debugText.text += "Status Changed to "+e.status;
trace("Status Changed to "+e.status);
}
function onMessageFail(e:Event){
debugText.text"ERROR: Could not send your request. Please try again later.";
}
function onComplete (event:Event):void{ 
if(this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
this.loaderInfo.removeEventListener (Event.INIT, onComplete);
this.loaderInfo.removeEventListener (Event.COMPLETE, onComplete);
}
debugText.text = event.target.data.toString();
trace(event.target.data);
if(event.target.data.id != ""){
var request:URLRequest = new URLRequest("mysite.com/processvideo.php");
request.method = URLRequestMethod.POST; 
var variables:URLVariables = new URLVariables(); 
variables.status="update"; 
variables.text = "text to be sent back";
variables.id = event.target.data.id;
request.data = variables;
var loader:URLLoader = new URLLoader (request); 
loader.addEventListener(Event.COMPLETE, onComplete2); 
loader.dataFormat = URLLoaderDataFormat.TEXT; 
loader.load(request);
}
if(event.target.data.result == "true"){
 
ptext.visible = true;
text1.visible = true;
text2.visible = true;
}
 
} 

thanks in advance!