Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

What will happen if downloading was interrupted

Contributor ,
Jun 27, 2014 Jun 27, 2014

Hi Guys

I was downloading a file using URLLoader. While it is downloading if any interruptions occurred like loosing internet connection. Does it fire EVENT.Complete event.

Thanks you

TOPICS
ActionScript
419
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 27, 2014 Jun 27, 2014

no, it should not trigger a complete event.  it should trigger an ioerrror event.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 30, 2014 Jun 30, 2014

But here seems different i was download a video using URLloader in the middle i interrupted the connection so COMPLETE event is firing

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 30, 2014 Jun 30, 2014

So to be very clear. We can download any kind of data using URLLoader weather it may be binary data, xml data, text data or object data, json data. So I am downloading the video using binary data by mentioning  _urlloader.format =  URLLoaderDataFormat.BINARY. When downloading is finished i am getting data in byte array format and using the byte array i am converting it into video and saving it to local disk.

I was bit confused when download was interrupted in middle  it should fire ioerror event but it is triggering complete event .

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 30, 2014 Jun 30, 2014

i see that, too.

i don't know what's causing the problem, and i don't have time to investigate.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 01, 2014 Jul 01, 2014
LATEST

Thanks Kglad for you answers. I assume that when we call load() method in URLLoader at that time it will check for IOerrors and Security errors. In the middle it wont check for ioerror and security errors. If some thing went wrong in middle of downloading it assumes downloading was finished and firing complete event. I was thinking this  was correct

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines