Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/11/2010, 00:05
Ghosty
 
Fecha de Ingreso: junio-2008
Mensajes: 292
Antigüedad: 15 años, 10 meses
Puntos: 4
Respuesta: Guardar imagen en el servidor

Cita:
Iniciado por pateketrueke Ver Mensaje
pues vaya lió...

¿si no sabes por donde viene la información de la imagen como pretendes recibirla?

así que la pregunta sería, ¿como envía dicho Flash la imagen al servidor?
Si mira la captura desde flash la hago asi

Código PHP:
function capture(nr)
{
    
snapshot = new BitmapData(950520);
    
//draw the current state of the Video object into 
    //the bitmap object with no transformations applied
    
snapshot.draw(_root ,new Matrix());
    var 
t:MovieClip createEmptyMovieClip("bitmap_mc"0);
    
t._x 0;
    
t._y 0;
    
t._xscale t._yscale 100;
    
//display the specified bitmap object inside the movie clip
    
t.attachBitmap(snapshot,1);
    var 
filterArray = new Array(myFilters[nr]);
    
t.filters filterArray;
    
attachMovie("print_but","bot",100,{_x:t._x t._width -450_y:t._y t._height 2});
    
    

y la envio al php asi

Código PHP:
function sendData(pixels:Array, h:Numberw:Number)
{
    
//Create the LoadVars object and pass data to PHP script
    
var output:LoadVars = new LoadVars();
    
output.img pixels.toString();
    
output.height h;
    
output.width w;
    
//The page (and this movie itself) should be in a server to work
    
output.send("show.php","output","POST");