flash button1
on (release) {
import flash.net.FileReference;
var allTypes:Array = new Array();
var imageTypes:Object = new Object();
imageTypes.description = "Images (*.jpg, *.jpeg, *.gif, *.png)";
imageTypes.extension = "*.jpg; *.jpeg; *.gif; *.png";
allTypes.push(imageTypes);
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
fileRef.browse(allTypes);
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void {
test = file.name;
};
}
flash button2
on (release) {
loadVariablesNum("check.php", "", "POST");
if (action == 2) {
_root.gotoAndPlay(13);
}
}
NOTE: test is a dynamic text feild and i have entered test into the vars box in the properties.
php
<?php
$imported = $_post['test'];
$filename = "http://www.whoarewe.info/images/$imported";
if (file_exists($filename)) {
echo "status=The file exits&action=1";
} else {
echo "The file does not exis&action=2";
}
?>
now i thought that was all correct. The file anme appears in the "test" box but the php don't seem to be checkign to see if the file exist on the server. also i have to choose the file fromt he browser and then do it again before the name appears in test.
anyway, any help you guys can give would be fantastic!
