royale-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "prashakumar@gmail.com"<prashaku...@gmail.com>
Subject Re: Royale : Undefined FileReaer & Blob
Date Thu, 30 Nov 2017 18:40:44 GMT


On 2017-11-27 21:12, Prashant Kumar <prashakumar@gmail.com> wrote: 
> I m getting intelligence under VCode but import statement not added.
> 
> On 27-Nov-2017 9:02 PM, "Harbs" <harbs.lists@gmail.com> wrote:
> 
> > It sounds like you’re missing the js.swc references.
> >
> > > On Nov 27, 2017, at 5:04 PM, prashakumar@gmail.com wrote:
> > >
> > > Hi,
> > >
> > > I am trying to  Image preview with Royale  and used  Royale FileAPI but
> > gettign following error. Please suggest.
> > > var fileReader:FileReader = new FileReader();
> > > fileReader.addEventListener("onload",onFileLoad);
> > > fileReader.readAsDataURL((fileProxy.model as FileModel).blob as Blob);
> > >
> > >
> > > Error: Type was not found or was not a compile-time constant: FileReader.
> > >
> > >                var fileReader:FileReader = new FileReader();
> > >                               ^
> > > d:\ApacheFlex\workspace\FileUpload\src\FileUpload.mxml(34): col: 49
> > Error: Call to a possibly undefined method FileReader.
> > >
> > >                var fileReader:FileReader = new FileReader();
> > >                                                ^
> > > d:\ApacheFlex\workspace\FileUpload\src\FileUpload.mxml(36): col: 81
> > Error: Access of possibly undefined property Blob.
> > >                fileReader.readAsDataURL((fileProxy.model as
> > FileModel).blob as Blob);
> > >
> > > Thanks,
> > > Prashant Kumar
> > >
> >
> >
> I added  js.swc under the external-library-path and  it compiled successfully.  First
 time i used files API in Royale and create Image Preview Demo application.

Mime
View raw message