Hi Scott, Are you running on Windows with anti-virus software? See this post [1]. I've had similar experiences with Flash/AIR and File I/O. To the runtime, the write happens quickly, into a memory buffer, then the AV software takes 1-2 mins to scan it before writing it.
HTH, -Alex [1] https://stackoverflow.com/questions/2930513/monitoring-file-upload-progress -in-actionscript-3 On 12/11/17, 2:51 AM, "scott matheson" <sc...@matheson.it> wrote: >Alex > The buffer is the default size, the save take 1-2 mins elapsed >time, thats way I wanted to add a indicator , i can spoof something if i >need too > >Scott > > > >> On 11 Dec 2017, at 02:20, Alex Harui <aha...@adobe.com.INVALID> wrote: >> >> How big is the buffer ByteArray and where are you writing the file? If >> the write can happen fast enough, no Progress events are fired. From >>the >> link you posted: >> >> "In some cases, progress events are not received. For example, when the >> file being transmitted is very small or the upload or download happens >> very quickly a progress event might not be dispatched." >> >> HTH, >> -Alex >> >> On 12/10/17, 11:04 AM, "scott matheson" <sc...@matheson.it> wrote: >> >>> Hi >>> i have copied this code off the flex site >>> >>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhelp.ad >>>ob >>> >>>e.com%2Fen_US%2FFlashPlatform%2Freference%2Factionscript%2F3%2Fflash%2Fn >>>et >>> >>>%2FFileReference.html%23event%3Aprogress&data=02%7C01%7Caharui%40adobe.c >>>om >>> >>>%7C5145f08e886e42dd00ef08d54000d165%7Cfa7b1b5a7b34438794aed2c178decee1%7 >>>C0 >>> >>>%7C0%7C636485294617358223&sdata=t0JXnVPLx%2BtytYlHob%2B2kjcAm4VexBH%2FYr >>>ls >>> PTnyOTY%3D&reserved=0 >>> >>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhelp.a >>>do >>> >>>be.com%2Fen_US%2FFlashPlatform%2Freference%2Factionscript%2F3%2Fflash%2F >>>ne >>> >>>t%2FFileReference.html%23event%3Aprogress&data=02%7C01%7Caharui%40adobe. >>>co >>> >>>m%7C5145f08e886e42dd00ef08d54000d165%7Cfa7b1b5a7b34438794aed2c178decee1% >>>7C >>> >>>0%7C0%7C636485294617358223&sdata=t0JXnVPLx%2BtytYlHob%2B2kjcAm4VexBH%2FY >>>rl >>> sPTnyOTY%3D&reserved=0> >>> >>> but the progress does not seem to fire, >>> >>> >>> private function saveReport():void { >>> >>> cursorManager.removeBusyCursor(); >>> var buffer:ByteArray = myPDF.save(Method.LOCAL); >>> var file:FileReference = new FileReference(); >>> configureListeners(file); >>> file.save(buffer, "Overview Report.pdf"); >>> >>> } >>> >>> private function configureListeners(dispatcher:IEventDispatcher):void >>>{ >>> >>> dispatcher.addEventListener(ProgressEvent.PROGRESS, >>> progressHandler); >>> >>> } >>> >>> >>> protected function progressHandler(event:ProgressEvent):void >>> { >>> var file:FileReference = FileReference(event.target); >>> trace("progressHandler name=" + file.name + " bytesLoaded=" + >>> event.bytesLoaded + " bytesTotal=" + event.bytesTotal); >>> } >>> >> >