Re: [flexcoders] Save a BitmapData as a local file
I don't quite understand the question here. Are you asking can you save some var myPic:BitmapData to your localSharedObject? That's how I understand it. I have never tried but I assume that you could. We have been able to save some very complex object type to our LSOs without any issue. On 2/28/07, ecpmaz [EMAIL PROTECTED] wrote: ... and that without passing by the server :S I don't know if my question is stupid.. but all I've been able to do till now was to send as a POST var my bytes to my server to assemble them, and send them back to the user as a JPEG... It seems not to be an optimal solution, do you have any solution ? {Maz} -- justin w. opitz 617.771.6639 jwopitz(at)gmail.com
Re: [flexcoders] Save a BitmapData as a local file
ecpmaz wrote: ... and that without passing by the server :S I don't know if my question is stupid.. but all I've been able to do till now was to send as a POST var my bytes to my server to assemble them, and send them back to the user as a JPEG... It seems not to be an optimal solution, do you have any solution ? For a cross-browser solution that you can immediately deploy today, you'll need to round-trip them to your server since there isn't a out-of-the-box solution for saving arbitrary bytes from within the player to their local filesystem. However, the soon-to-be-released Apollo is slated to support local filesystem access, so if you can wait for that and can deploy your application as a desktop application, that might suit you. Alternatively, for those browsers that support the data URI, you could use Javascript as a bridge and pass the bytes to your JPEG over to it in Base64-encoded format, and then create a data URI link from which the user can download the file off of the HTML page. Before you get overly excited about going down this route though, keep in mind that data URIs aren't supported by Internet Explorer, among other browsers. See: http://www.ietf.org/rfc/rfc2397 http://software.hixie.ch/utilities/cgi/data/data Jim
Re: [flexcoders] Save a BitmapData as a local file
jwopitz wrote: I don't quite understand the question here. Are you asking can you save some var myPic:BitmapData to your localSharedObject? That's how I understand it. I have never tried but I assume that you could. We have been able to save some very complex object type to our LSOs without any issue. Unfortunately, there's a few non-primitive data types that can't be saved to shared objects owing to an apparent lack of serialization support in the native code. Among these are BitmapData and ByteArray. To persist these data into shared objects, they must first serialized into primitives before they can be persisted into shared objects, for instance, as Base64-encoded string or a packed array of 8-byte Numbers. Jim Cheng effectiveUI
RE: [flexcoders] Save a BitmapData as a local file
Even if you could, you'd run into SharedObject size restrictions for most users as per their player default settings. Jason Merrill Bank of America Global Technology Operations, Learning Leadership Development eTools Multimedia Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jim Cheng Sent: Thursday, March 01, 2007 3:22 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Save a BitmapData as a local file jwopitz wrote: I don't quite understand the question here. Are you asking can you save some var myPic:BitmapData to your localSharedObject? That's how I understand it. I have never tried but I assume that you could. We have been able to save some very complex object type to our LSOs without any issue. Unfortunately, there's a few non-primitive data types that can't be saved to shared objects owing to an apparent lack of serialization support in the native code. Among these are BitmapData and ByteArray. To persist these data into shared objects, they must first serialized into primitives before they can be persisted into shared objects, for instance, as Base64-encoded string or a packed array of 8-byte Numbers. Jim Cheng effectiveUI
Re: [flexcoders] Save a BitmapData as a local file
ahhh. well that makes sense now. Thanks for the education on the subject. I have only used LSO's to store XML data with simple types. Thanks guys. On 3/1/07, Merrill, Jason [EMAIL PROTECTED] wrote: Even if you could, you'd run into SharedObject size restrictions for most users as per their player default settings. Jason Merrill Bank of America Global Technology Operations, Learning Leadership Development eTools Multimedia Team -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Jim Cheng *Sent:* Thursday, March 01, 2007 3:22 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Save a BitmapData as a local file jwopitz wrote: I don't quite understand the question here. Are you asking can you save some var myPic:BitmapData to your localSharedObject? That's how I understand it. I have never tried but I assume that you could. We have been able to save some very complex object type to our LSOs without any issue. Unfortunately, there's a few non-primitive data types that can't be saved to shared objects owing to an apparent lack of serialization support in the native code. Among these are BitmapData and ByteArray. To persist these data into shared objects, they must first serialized into primitives before they can be persisted into shared objects, for instance, as Base64-encoded string or a packed array of 8-byte Numbers. Jim Cheng effectiveUI -- justin w. opitz 617.771.6639 jwopitz(at)gmail.com