Groups | Blog | Home
all groups > flash actionscript > august 2005 >

flash actionscript : Set Action Time for Preloader


SGT_Hilton
8/7/2005 7:23:17 PM
Hi, been using Flash for a while but have not been using the full aspect of it
until now. I made a preloader bar and would like that bar to run until a
certain percentage of the main site is loaded in the background. Is there a way
to do this or maybe a way to not stop the preloader until the entire page is
loaded? I am trying not to upset the peeps with 56K dial-up and loadtime on my
page is great for cable and DSL just not Dial-Up.

Thanks,
SGT Hilton
rlprophett
8/7/2005 9:23:07 PM
Ahhhhh...hum
Use JavaScript and FSCommand

inside the root of the flash movie
isLoaded = 0;
getLoaded = function(){
return isLoaded;
}
setLoaded = function(loaded){
isLoaded = loaded;
if(loaded == 1)
{
///loaded actions
}
}
addProperty('loaded',getLoaded,setLoaded);

inside the javascript
<script language='javascript' src='loaded.js' defer></script>

inside the loaded.js file
FlashMovie.setVariable('loaded',1);
SGT_Hilton
8/8/2005 12:00:00 AM
Just wanted to put one other thing out and make sure and double check. The
preloader is on index.htm and the page that I want it to wait for to load is
home.htm. Will this still work and if so how? I am not familiar with java
scripting so spelling it out like I am in Kindergarden will not offend me.

SGT Hilton
AddThis Social Bookmark Button