Tuesday, 19 June 2012

[DAY 17] [DEVELOPMENT AND RESEARCH] Loading Bar for Comic

I thought what would be different and convenient for readers would be a loading bar. What a loading bar does is pre-loads the file so that there's no glitches or inconveniences when the person is going through a flash product, or reading through it in my case. I'm unable to say that is loading bar will be added, as I never really thought this through when I reached half of my comic and most of it was coded and connected to certain pages, but I thought I'd work with it and see whether I could make it work.
I wanted to add this loading bar at the start of the comic, where the reader would have to wait for the comic to load properly. Very glad to find a tutorial which explains and shows you how to really set out a loading bar, and how much help it is for the person viewing the file (it even gifted the coding which I spent trying to understand so that I can include it). No one likes to wait around for a file to load.


Quick look at the coding.
Thank you, Kirupa.
----------------------------------------------------------

(This part shows you how much is loaded of the file.)
bytes_loaded = Math.round(this.getBytesLoaded());


(This part shows you how much in total will be loaded.)
bytes_total = Math.round(this.getBytesTotal());


(This part is where a division is made, between 100 and what ever is left of the file to load.)
getPercent = bytes_loaded/bytes_total;


(This part determines the width of your loading bar and times it by 100.)
this.loadBar._width = getPercent*100;


(This part targets the text box this coding will work with when you connect it. Telling the viewer it's 100% done.)
this.loadText = Math.round(getPercent*100)+"%";


(This part commands the clip to play the file after the loading is complete.)
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}


----------------------------------------------------------


If I did this, the comic would feel more professional, and would show that I have truly thought about the reader, specially if they have a rubbish connection on their internet, they don't want to be interrupted by the long wait, stuck on a page they have been on for ages really isn't fair to them. Pre-loading is the best possible way to express the full potential of a file, at least.

Here are some small concept sketches of how I would like
the loading bar to look like, and where the percentage would
sit around the image.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.