Hi all,
I have a small doubt I have uploaded my file to server. While downloading i
need to capture the file name which the user gives.How to go about it???
Cheers
Satish
On Fri, Nov 7, 2008 at 3:18 PM, Saravanan <[EMAIL PROTECTED]> wrote:
>
> Thats correct :)
> -sara
>
> On Nov 6, 9:07 pm, sirarthurtarp <[EMAIL PROTECTED]> wrote:
> > Ahhh got it
> >
> > private function browse():void {
> > var file:File = new File();
> > file.addEventListener(Event.SELECT, fileSelected);
> > file.browse( new Array( new FileFilter( "Images (*.jpg, *.jpeg,
> > *.gif, *.png)", "*.jpg;*.jpeg;*.gif;*.png" ) ) );
> >
> > }
> >
> > private function fileSelected(event:Event) {
> > var file:File = event.target as File;
> >
> > var loader:Loader = new Loader();
> > loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
> > completeHandler);
> > loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
> > ioErrorHandler);
> >
> > var request:URLRequest = new URLRequest(file.nativePath);
> > loader.load(request);
> >
> > }
> >
> > private function completeHandler(event:Event):void {
> > var loader:Loader = Loader(event.target.loader);
> > var image:Bitmap = Bitmap(loader.content);
> > //do stuff
> >
> > }
> >
> > private function ioErrorHandler(event:IOErrorEvent):void {
> > trace("Unable to load image: ");
> >
> > }
> >
> >
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---