You are currently browsing the category archive for the ‘AS3’ category.
Interesting game tutorials here
Interesting example here
A quite good open source flash video player
var header:URLRequestHeader = new URLRequestHeader(“Content-type”, “application/octet-stream”); var jpgURLRequest:URLRequest = new URLRequest(“http://kurisi3.no-ip.org/test/storejpg/save_jpg.php?name=sketch.jpg”); jpgURLRequest.requestHeaders.push(header); jpgURLRequest.method = URLRequestMethod.POST; jpgURLRequest.data = jpgStream; navigateToURL(jpgURLRequest, “_blank”);
PHP code here
if (isset($GLOBALS["HTTP_RAW_POST_DATA"]))
{
$fname = $_GET["name"];
// get bytearray
$jpgData = $GLOBALS["HTTP_RAW_POST_DATA"];
//save jpg file
$fp = fopen($fname,”w+”);
fwrite($fp, $jpgData);
fclose($fp);
// add headers for download dialog-box
header(‘Content-Type: image/jpeg’);
header(“Content-Disposition: attachment; filename=$fname”);
print $fname;
}
else print “no raw data received”;

Recent Comments