I guess I can send the ByteArray to the php that will handle its insertion
to the database. Right?

On Fri, Aug 15, 2008 at 7:07 PM, Juan Pablo Califano <
[EMAIL PROTECTED]> wrote:

> With the newest player, I think, it's possible to save data into the USER's
> hard drive without a trip to the server, but you want to store the data on
> the server side, you need to send it to the server...
>
> You have to post that data using a URLLoader object, and specifying the
> input as binary data.
>
> I've wrapped up some code to do that and being able to pass variables as
> well. If you want to check it out:
>
> http://pastebin.com/f11a897cf
>
> (Sorry, comments are in Spanish, but the indentifiers are in English)
>
> A example of use (it's a copy & paste from some wortking code, just to give
> you an idea):
>
>
> import ar.com.califa010.utils.FormData;
>
>   // getEncodedImg() is a method that returns a JPG as a byteArray
>
>   var rawJpg:ByteArray = getEncodedImg();
>   var formData:FormData = new FormData();
>
>   var imageMimeType:String = FormData.JPG_FILE;
>   var fileName:String = "imageFile.jpg";
>
>   formData.addFile("imageFile", rawJpg, fileName, imageMimeType);
>
>
>   formData.addField("sFormat",imgFormat);
>   formData.addField("idImagen",_idImagen);
>
>   var req:URLRequest  = new URLRequest(url);
>
>   req.method   = "POST";
>   req.contentType  = formData.contentType;
>   req.data   = formData.getPostData();
>
>   var loader:URLLoader = new URLLoader();
>   configureListeners(loader);
>
>    loader.load(req);
>
>
>
> 2008/8/15, Omar Fouad <[EMAIL PROTECTED]>:
> >
> > I see, all those tutorials shows how to save the image on the Hard Drive
> > (now with flash player is possible to do this without any server side
> > script).
> >
> > But considering my question, what I should be putting in my database row,
> > the byteArray encoded by JPGEncoder?
> > Is there a method into this class that takes the ByteArray from the
> > database
> > back, and translates it into a bitmap to be shown in the swf?
> >
> > On Fri, Aug 15, 2008 at 12:42 PM, Glen Pike <[EMAIL PROTECTED]
> > >wrote:
> >
> > > Hi,
> > >
> > >   Sorry, I put this in the wrong thread before - here is my 2c
> > >
> > >   Hi,
> > >
> > >  There are a few examples on the www about sending Bitmap data to the
> > > server Mario's is a good starting point -
> > > http://www.quasimondo.com/archives/000572.php      Anyway, there are
> > other
> > > examples about which do compression/decompression on your data so you
> > could
> > > save it into your DB too..
> > >
> > >  Hope this is useful
> > >
> > >  Glen
> > > --
> > >
> > > Glen Pike
> > > 01326 218440
> > > www.glenpike.co.uk <http://www.glenpike.co.uk>
> > >
> > >
> > > ______________________________________________
> > > Flashcoders mailing list
> > > [email protected]
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> >
> >
> >
> > --
> > Omar M. Fouad - Digital Emotions
> > http://www.omarfouad.net
> >
> > This e-mail and any attachment is for authorised use by the intended
> > recipient(s) only. It may contain proprietary material, confidential
> > information and/or be subject to legal privilege. It should not be
> copied,
> > disclosed to, retained or used by, any other party. If you are not an
> > intended recipient then please promptly delete this e-mail and any
> > attachment and all copies and inform the sender. Thank you.
> > _______________________________________________
> > Flashcoders mailing list
> > [email protected]
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to