This article explains how to make an HTML animation start upon view instead of pre-loading and starting/finishing before the user reads the Vertical.
Note: These scripts only work on Mag+ version 4.0 and above.
How Mag+ Loads Content within an App
A Mag+ app has at least three Verticals loaded at any given time (see illustration below).
The app has three boundaries in which it loads content:
- The "Outside" boundary is not visible at all to the user. The app loads as much content possible outside this boundary. If the device runs low on memory, the app will stop loading Verticals outside of this boundary.
- The "Safe Zone" boundary is approximately halfway down from the visible area of the screen. All content inside this boundary will begin loading so that images, HTML, media, and more is ready before the user scrolls it onto the screen.
- The "Inside" boundary is what is visible to the user.
Running an Animation During Loading Events
Using this callback will run the function when it is loaded within the Safe Zone boundary of the Mag+ app.
Using this callback will run the function when it is loaded within the Inside boundary of the Mag+ app.
var init = false;
init = true;
//<your Hype code here>