Adding a preloader in Hype

Hype doesn’t really support a preloader. Either it loads, or it’s done loading. It has an option to add a loading bar, but that is just a simple bar that cannot be changed.
But with a little scripting we can add our own peloader, which can be just a simple image, or even a gif.

You will need the following scripts:
jQuery
anyPreloader v1.0

And this code:

	<script>
		anyPreloader({
			
			background_color	:"#000000",
			background_image	:"preloader.gif",
			background_size		:"auto",
			background_repeat	:"no-repeat",

			file_root:"${resourcesFolderName}"
		});
	</script>

Here is the tutorial that explains the different options:

And here are some examples for the different options:

background_color  :"#000000",
                  :"rgb(0,255,0)",
                  :"green",

background_size   :"auto",
                  :"20px",
                  :"50%",
                  :"contain",
                  :"cover",

background_repeat :"no-repeat",
                  :"repeat",
                  :"repeat-x",
                  :"repeat-y",