essa!!
gracias Juan!
*artur :.*
- *www.artur.com*
- [EMAIL PROTECTED]
- *ph:646.797.3320*
Juan Pablo Califano wrote:
PD: I've checked the Image control in Flex and what it ends up doing
is really simple. Just use a Loader and pass the raw data, and you're
done.
Quick and dirty example, assuming you're already listening for the
complete event and the user has loaded a valid image.
private function handleComplete(e:Event):void {
var loader:Loader = new Loader();
loader.loadBytes(_fileRef.data);
addChild(loader);
}
Cheers
Juan Pablo Califano
2008/11/17, Juan Pablo Califano <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>:
I realize my reply doesn't really answer you question (you were
asking about displaying the image rather than downloading it
back), but I think it must be also possible. You can access to the
file raw data as a ByteArray, but you still have to convert that
into a bitmap (or bitmapdata first?).
It's possible in Flex:
http://blog.flexexamples.com/2008/08/25/previewing-an-image-before-uploading-it-using-the-filereference-class-in-flash-player-10/
So, I think it should be possible in plain Actionscript.
Cheers
Juan Pablo Califano
2008/11/17, Juan Pablo Califano <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>:
Yes, it's possible.
The FileReference object now allows you to access the contents
of a file uploaded by the user directly. You can manipulate it
and pop-up a save dialog, again with FileReference (but the
action has to be initiated by the user, such as a button
click), and save the modified file locally, without bouncing
it to a server.
Cheers
Juan Pablo Califano
2008/11/17, artur <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:
using fp 10,
is it possible to generate a thumb preview of the user's
selected
local image files that they want to upload via
FileReference.load() ?
or some other method?
thanks,
artur
-
_______________________________________________
Flashcoders mailing list
[email protected]
<mailto:[email protected]>
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders