Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
- <!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
- <!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
- <!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
- <!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
- <head>
- <meta charset="utf-8">
- <title>Global Trust Gaming</title>
- <link href='http://fonts.googleapis.com/css?family=Audiowide' rel='stylesheet' type='text/css'>
- <style>
- * { margin: 0; padding: 0; }
- html, body{
- margin: 0;
- padding: 0;
- width: 100%;
- height: 100%;
- overflow: hidden;
- }
- body{
- background:url(http://i.imgur.com/xIVcCyf.png) no-repeat center center fixed;
- background-size: cover;
- COLOR: #fc6a2c
- }
- </style>
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width; initial-scale=1.0">
- <script type="text/javascript" src="http://code.jquery.com/jquery-2.0.0.min.js"></script>
- </head>
- <body>
- <div id="gameLoadingText" style="position: absolute; top: 45%; text-align: center; width: 100%; font-family: 'Audiowide'; font-size: xx-large;">Please wait<br>your game is loading...</div>
- <div id="loadingText" style="position: absolute; top: 45%; text-align: center; width: 100%; font-family: 'Audiowide'; font-size: xx-large;"></div>
- <div id="debug" style="position: absolute; top: 70%; text-align: center; width: 100%; font-family: 'Audiowide'; font-size: xx-large;"></div>
- <script type="text/javascript">
- var iFilesNeeded = 0;
- var iFilesBeginning = 0;
- var iFilesTotal = 0;
- var filesDownloaded = -1;
- var pct = 0;
- var isDownloading = false;
- function SetFilesNeeded( iNeeded ) {
- iFilesNeeded = iNeeded;
- iFilesBeginning = iNeeded;
- RefreshFileBox();
- }
- function SetFilesTotal( iTotal ) {
- iFilesTotal = iTotal;
- RefreshFileBox();
- }
- function RefreshPct() {
- pct = Math.floor((filesDownloaded / iFilesBeginning) * 100) + 1;
- }
- function DownloadingFile( filename ) {
- if (isDownloading)
- {
- iFilesNeeded = iFilesNeeded - 1;
- filesDownloaded = filesDownloaded + 1;
- }
- isDownloading = true;
- RefreshPct();
- RefreshFileBox();
- }
- function SetStatusChanged(strStatus)
- {
- isDownloading = false;
- RefreshFileBox();
- }
- function RefreshFileBox() {
- if (iFilesNeeded > 5)
- $('#loadingText').html(iFilesNeeded + " downloads remaining<br>"+pct+"%");
- else if (iFilesNeeded === 1 && filesDownloaded > 5)
- $('#loadingText').html(iFilesNeeded + " download remaining<br>"+pct+"%");
- if (isDownloading && iFilesNeeded > 5) {
- $("#loadingText").show();
- $('#gameLoadingText').hide();
- }else{
- $("#loadingText").hide();
- $('#gameLoadingText').show();
- }
- }
- RefreshFileBox();
- </script>
- <div id="loaderImage" style="position: absolute; left: 50%; margin-left: -64px; top: 25%; width: 100%;">
- <script type="text/javascript">
- var cSpeed=12;
- var cWidth=128;
- var cHeight=128;
- var cTotalFrames=8;
- var cFrameWidth=128;
- var cImageSrc='http://i.imgur.com/TtjBQHr.png';
- var cImageTimeout=false;
- var cIndex=0;
- var cXpos=0;
- var SECONDS_BETWEEN_FRAMES=0;
- function startAnimation(){
- document.getElementById('loaderImage').style.backgroundImage='url('+cImageSrc+')';
- document.getElementById('loaderImage').style.width=cWidth+'px';
- document.getElementById('loaderImage').style.height=cHeight+'px';
- //FPS = Math.round(100/(maxSpeed+2-speed));
- FPS = Math.round(100/cSpeed);
- SECONDS_BETWEEN_FRAMES = 1 / FPS;
- setTimeout('continueAnimation()', SECONDS_BETWEEN_FRAMES/1000);
- }
- function continueAnimation(){
- cXpos += cFrameWidth;
- //increase the index so we know which frame of our animation we are currently on
- cIndex += 1;
- //if our cIndex is higher than our total number of frames, we're at the end and should restart
- if (cIndex >= cTotalFrames) {
- cXpos =0;
- cIndex=0;
- }
- document.getElementById('loaderImage').style.backgroundPosition=(-cXpos)+'px 0';
- setTimeout('continueAnimation()', SECONDS_BETWEEN_FRAMES*1000);
- }
- function imageLoader(s, fun)//Pre-loads the sprites image
- {
- clearTimeout(cImageTimeout);
- cImageTimeout=0;
- genImage = new Image();
- genImage.onload=function (){cImageTimeout=setTimeout(fun, 0)};
- genImage.onerror=new Function('alert(\'Could not load the image\')');
- genImage.src=s;
- }
- //The following code starts the animation
- new imageLoader(cImageSrc, 'startAnimation()');
- </script>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement