Really lost with this code, their is a as file I will try to attach. I really get so many errors with this code. I want my composite of MC's to be able to
converted into a JPEG with a save button. I don't know what parts to change for my own work.
http://rapidshare.com/files/16234652...ncoder.as.html
here is the other file.
import SMP.Attila.booCrew.src.JPGEncoder;
function createJPG(m:MovieClip, q:Number, fileName:String)
{
var jpgSource:BitmapData = new BitmapData (m.width, m.height);
jpgSource.draw(m);
var jpgEncoder:JPGEncoder = new JPGEncoder(q);
var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);
var header:URLRequestHeader = new URLRequestHeader ("Content-type", "application/octet-stream");
//Make sure to use the correct path to jpg_encoder_download.php
var jpgURLRequest:URLRequest = new URLRequest ("jpg_encoder_download.php?name=" + fileName + ".jpg");
jpgURLRequest.requestHeaders.push(header);
jpgURLRequest.method = URLRequestMethod.POST;
jpgURLRequest.data = jpgStream;
var jpgURLLoader:URLLoader = new URLLoader();
navigateToURL(jpgURLRequest, "_blank");
}
//Call the function and pass in the movieclip that you want to encode,
//the quality, and the file name
createJPG(canvas12_mc, 90, "image");






Bookmarks