Re: [flexcoders] Re: Capturing and Saving an image in Flex (BitmapData)

2010-03-05 Thread Brian Thompson
You'll need some server-side code to accept the image upload and save it to
disk.  It's pretty simple in PHP.

On the Flex side, you'll just need to use something like URLLoader or
HTTPService to POST the image to your upload form on the server.

-Brian



On Fri, Mar 5, 2010 at 10:50 AM, Wally Kolcz wko...@isavepets.com wrote:



 I have this so far. Where I have the ?? is where I would like to know a way
 to either transfer the newly created image to a folder on the server...or I
 am at the point I could just let them download it/save it and then reupload
 it (dont prefer that).

 public function saveImage():void {
 var bitmapData:BitmapData = new BitmapData(canvas.width,
 canvas.height);
 var rightNow:Date = new Date();
  bitmapData.draw(canvas,new Matrix());
  var bitmap : Bitmap = new Bitmap(bitmapData);
 var jpg:JPEGEncoder = new JPEGEncoder();
 var ba:ByteArray = jpg.encode(bitmapData);
 ??(UserDataModel.getInstance().person.username + '-' + rightNow +
 '.jpg');

 Alert.show(Your image has been saved and is in your photo
 gallery, Image Saved);

 }

 On 3/5/2010 10:21 AM, Michael wrote:



 In order to save the image file to disk, you need to use the AIR File API,
 which is available only to AIR applications.

 You can capture the image, encode it as PNG or JPEG using
 mx.graphics.codec.JPEGEncoder or mx.graphics.codec.PNGEncoder, then upload
 the resulting byte to a server. Then your server application can save the
 file to disk on the server.

 I found these two links helpful:


 http://stackoverflow.com/questions/780018/in-flex-how-do-i-create-populate-and-display-a-bitmap


 http://blog.everythingflex.com/2008/02/25/create-images-with-air-and-jpegencoder/

 Hope this helps,
 Michael Portuesi

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Wally
 Kolcz wko...@... wko...@... wrote:
 
  Can someone point me to an example of using the BitmapData.draw() to
  capture an image of a container on the screen and save it to the
  harddisk of the server. I see some that show me how to capture and
  process the image, but the saving it to the server is a mystery.
 
  I want my kids to be able to save their drawings/colorings to the web
  site art gallery. Thanks!
 




 


Re: [flexcoders] VideoDisplay - video is playing, but without audio

2010-03-04 Thread Brian Thompson
One of our projects has suffered from a similar issue.  We're
streaming audio from Flash Media Server, and sometimes the audio will
cut out - we still get cue points embedded in the audio, the NetStream
object doesn't register any errors, and the rest of the app acts like
the audio ends at the right time.

We also have a recording aspect to our project, and when the audio
cuts out, sometimes it will cut back in after we record something.

We've really only noticed this problem when running the app on Windows
7 -- and it's more prevalent when the computer is connected via
wireless.

Have you noticed any similar patterns in your app?

-Brian


On Wed, Mar 3, 2010 at 10:30 PM, joyh2002 joyh2...@yahoo.com wrote:
 I use VideoDisplay to play videos in my Flex app. The videos are hosted in 
 our local web server. The size of the video is around 10MB to 30MB. I need to 
 play 60 to 80 videos throughout the app.

 The videos are playing fine, but the audio is missing after playing some 
 videos - not reproducible all the time, but if that happens, all audio stops 
 playing till the end of the app.

 What could be the issue? any idea?

 Thanks,
 Joy





Re: [flexcoders] help - code assist stopped working

2010-03-04 Thread Brian Thompson
Are you using FB as an Eclipse plugin?  If so, you should be able to get the
error log by going to Window-Show View-Other, then picking Error Log from
the list.

-Brian



On Thu, Mar 4, 2010 at 11:55 AM, Chris Sheffield cmsheffi...@gmail.comwrote:



 I apologize. This is probably more of an Adobe Support issue, but since I'm
 using beta 2 of FB4, I wasn't sure what kind of support is currently
 available.

 Anyway, I was working on a project yesterday and all of a sudden my code
 assist stopped working in .as files. Still seems to work fine in .mxml
 files, so not sure what's going on. Has anyone run into this? Is there
 anything I can do? The error I receive is:

 Content Assist did not complete normally.  Please see the log for more
 information.

 java.lang.NullPointerException


 I haven't checked the log because I have no idea where it can be found.
 Running on a Mac, btw. I suppose my next step is to simply reinstall the
 product if I can't find another fix.

 Thanks,
 Chris


 --
 Chris Sheffield
 Read Naturally, Inc.
 www.readnaturally.com