is it possible to load pages or images and files from server on request

  1. 8 years ago

    hi,

    I am working on a animated story book app of around 300 stories.
    I don't want to make the app heavy in size , is it possible to load stories or images and files from server as the user requests, or any other solution to keep app size as less as possible.

    Please do reply if any one has same issue or have any solution on this.

    Thanks

    Regards
    Prachi

  2. Giancarlo N

    4 Dec 2015 Administrator

    Hi,
    basically size of epub and apps closely depends on your assets and pixel density option in project preferences. Images are also rendered to best fit the output needs every time you ask for a preview or publish. audio and video are exported as they are, so you need to reduce their weight externally.
    Another option is to ask for remote content, but consider epub is defined as a self-contained package, therefore epub reader could refuse to load remote content.
    On the other hand if you export an app (iOS or Android) you could technically achieve this by using the run javascript action. For example if you have a Rectangle with id=obj4 (you can see object ids by clicking # on layers panel), you can set up a run javascript upon the touch down event and writing something like:
    $("#obj4").append("<img style='max-width:100%; hieght:auto;' id='img_obj4_added' src='<img_url>'/>");
    where <img_url> is a remote url.

  3. Thanks for the solution
    I will try to do this with javascript.

 

or Sign Up to reply!