you can use as3 encoding class to convert the ByteArray to Base64 String,  then 
send it with httpservice:

a)bytearray  to base64 string:
http://www.dynamicflash.com/goodies/base64

b)base64 to byte[] in java:
http://www.source-code.biz/snippets/java/2.htm



----- Original Message ----
From: Abdul Qabiz <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, October 30, 2007 12:23:56 PM
Subject: Re: [flexcoders] Re: JS - How to send a byteArray using HTTPService??

I think, you can use AMFPHP on server-side. You can refer the following 
tutorial:-

http://www.sephirot h.it/tutorials/ flashPHP/ amfphp_bytearray / 
http://www.bytearra y.org/?p= 90

-abdul


On 10/29/07, Jeff Schuenke < [EMAIL PROTECTED] com> wrote:
Hello Abdul,

I have looked at URLLoader and see how to send. On the server side, 
I see the data in a byte array but am not sure how to pull this inot 
a variable. Any samples from either php or java?
Thanks,

Jeff

--- In [EMAIL PROTECTED] ups.com, "Abdul Qabiz" <abdul.qabiz@ ...> 
wrote:
>
> Note sure, if HTTPService allows anything beyond text.... You can 
use
> URLLoader to send the data to server..
> 
> -abdul
> 

> On 10/25/07, Jeff Schuenke <[EMAIL PROTECTED] .> wrote:
> >
> > Hello All,
> >
> > I need to do a screen capture of a UIComponenet and allow the 
user to save
> > this to their local drive. I understand thsi will need to go 
throu the
> > server. I have read about the ImageSnapshot and PNGEncode 
methods in SDK 3
> > so I can get the BitmapData ( this example is using SDK 2). What 
I don't
> > see how to do is send this to the server. I am trying this:
> >
> > //get the data
> > var exportImage: BitmapData = new BitmapData(100, 100);
> > exportImage. draw(UIComponene t_name);
> >
> > var outData:ByteArray = new ByteArray();
> > outData.readBytes( exportImage. getPixels( new Rectangle
(0,0,100,100) ));
> >
> > var sendImage:HTTPServi ce = new HTTPService( );
> > sendImage.method = "POST";
> > sendImage.url = "http://www.host. com/serverSave. php";
> > sendImage.send( {HTTP_RAW_ POST_DATA: outData.writeByt es(outData) , 
name:'
> > image.png'});
> >
> >
> > This is not working and it is only a guess. How can I send the 
data or
> > is it possibile to do this as a POST??
> >
> > Thanks,
> >
> >
> >
> > Jeff
> >
> > 
> >
> 
> 
> 

> -- 
> -abdul
> ------------ --------- --------- ---------
> http://abdulqabiz. com/blog/
> ------------ --------- --------- ---------
>





-- 
-abdul
------------ --------- --------- ---------
http://abdulqabiz. com/blog/
------------ --------- --------- --------- 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to