# Bypass Preloader if it is already loaded

**URL:** https://forum.kirupa.com/t/bypass-preloader-if-it-is-already-loaded/125353
**Category:** Uncategorized
**Created:** [October 12, 2004, 9:10pm UTC](https://forum.kirupa.com/t/bypass-preloader-if-it-is-already-loaded/125353 "2004-10-12T21:10:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Keith130](https://avatars.discourse-cdn.com/v4/letter/k/b38774/32.png) [@Keith130](https://forum.kirupa.com/u/Keith130)
#### Post date: [October 12, 2004, 9:10pm UTC](https://forum.kirupa.com/t/bypass-preloader-if-it-is-already-loaded/125353/1 "2004-10-12T21:10:33Z")

</div>

Is there anyway to bypass a preloader if the entire file is already loaded, e.g. missing the intro? I have tried using the ShardObject code quite unsucsessfully, the code I used was:

[AS]

//stop before running into the next scene  
stop();  
//check if there is already the SharedObject  
gn = SharedObject.getLocal(“GamesNetwork”);  
if (gn.data.visited == 1) {  
nextScene;  
} else {  
//create a variable in the SO  
gn.data.visited = 1;  
//write the SO  
gn.flush();  
//set the function “preloader” to run every 10ms  
myInterval = setInterval(preloader, 10);  
//define the function preloader  
function preloader() {  
//check to see if it is fully loaded  
if (getBytesLoaded()\>=getBytesTotal()) {  
clearInterval(myInterval);  
play();  
}  
// define the variable percentile as the percent loaded for future use  
percentile = (getBytesLoaded()/getBytesTotal()\*100);  
//set the alpha of the logo  
this.earthLogo.\_alpha = percentile;  
//set the length of the percent bar  
this.bar.\_xscale = percentile;  
}  
}

[/AS]
