Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 541003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:17:55+00:00 2026-05-13T10:17:55+00:00

Is it possible in an air application to start a download, pause it and

  • 0

Is it possible in an air application to start a download, pause it and after that resume it?

I want to download very big files (1-3Gb) and I need to be sure if the connection is interrupted, then the next time the user tries to download the file it’s start from the last position.

Any ideas and source code samples would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:17:55+00:00Added an answer on May 13, 2026 at 10:17 am

    Yes, you would want to use the URLStream class (URLLoader doesn’t support partial downloads) and the HTTP Range header. Note that there are some onerous security restrictions on the Range header, but it should be fine in an AIR application. Here’s some untested code that should give you the general idea.

    private var _us:URLStream;
    private var _buf:ByteArray;
    private var _offs:uint;
    private var _paused:Boolean;
    private var _intervalId:uint;
    ...
    private function init():void {
        _buf = new ByteArray();
        _offs = 0;
    
        var ur:URLRequest = new URLRequest( ... uri ... );
        _us = new URLStream();
    
        _paused = false;
        _intervalId = setInterval(500, partialLoad);
    }
    ...
    private function partialLoad():void {
        var len:uint = _us.bytesAvailable;
        _us.readBytes(_buf, _offs, len);
        _offs += len;
    
        if (_paused) {
            _us.close();
            clearInterval(_intervalId);
        }
    }
    ...
    private function pause():void {
        _paused = true;
    }
    ...
    private function resume():void {
        var ur:URLRequest = new URLRequest(... uri ...);
        ur.requestHeaders = [new URLRequestHeader("Range", "bytes=" + _offs + "-")];
        _us.load(ur);
        _paused = false;
        _intervalId = setInterval(500, partialLoad);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible that an adobe air application that runs fine with an older
I want to create an Adobe AIR application that is L-shaped so that another
Is it possible to start a native application/service from Adobe Air? I guess this
I need to open popup window in my flex / air application that will
Is it possible to generate PDF Documents in an Adobe AIR application without resorting
Is it possible to directly access MySql databases through an Adobe AIR/Flex application? If
Is it possible to have an AIR application built in Flex run as process
It is possible to decompile an Adobe Air application to extract a SWF from
Hi Is it possible for an Adobe Air application to install, upgrade and execute
I'm writing an Air application which uses sockets. I need to connect to nexus.passport.com:443

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.