Hi Rain,
           I need to send the image from flex to Java via RemoteObject.

2010/3/8 McRain <[email protected]>

> One of several options: send ByteArray
>
> PHP:
> $filename = $pathToMyFile."pics.png";
> if(file_exists($filename) && is_file($filename)){
>        return new ByteArray(file_get_contents($filename));
> }
>
> AS3
> private function getResult(event:ResultEvent):void{
>        var loader:Loader = new Loader();
>        loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
> loadByteArray);
>        loader.loadBytes(event.result as ByteArray);
> }
>
> private function loadByteArray(event:Event):void{
>                var icon:Sprite = new Sprite();
>                var iWidth:Number = event.target.content.width;
>                var iHeight:Number = event.target.content.height;
>            var bitmapfillImage:BitmapFill = new BitmapFill();
>                bitmapfillImage.source =
> Bitmap(event.target.content).bitmapData;
>            var rectangleArea:Rectangle = new Rectangle(0, 0, iWidth,
> iHeight);
>                bitmapfillImage.begin(icon.graphics, rectangleArea);
>                icon.graphics.drawRect(0, 0, iWidth, iHeight);
>                bitmapfillImage.end(icon.graphics);
>            addChild(icon);
> }
>
>
> On 8 мар, 13:28, Abdul Nizar <[email protected]> wrote:
> > Hi,
> >
> >    I want to send a image via RemoteObject in flex.
> >    Is it possible ?
> >    If possible means how?
> >
> >    Very urgent please any one help.
> >
> > --
> > With Regards,
> > Nizar.
> > Disturb @ (+91) 9790503327
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>


-- 
With Regards,
Nizar.
Disturb @ (+91) 9790503327

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to