How do I get rid of pre loader bar when page loaded?
Ok why wont this work? (flash CS5 and action script 2)
Trying to do a
Navigation bar button , to preloader to abour me page with a photo component.
Not on the pre loader page the bar works, only it wont disappear.
siteLoader.loadMovie("AboutMe5.swf",4);
Frame_movie._alpha = 100;
loadingBar._alpha = 100;
loadingBar._xscale = 1;
loadingBar.onEnterFrame = function()
{
kBytesLoaded = this._parent.siteLoader.getBytesLoaded() / 1024;
kBytesTotal = this._parent.siteLoader.getBytesTotal() / 1024;
percentage = Math.round(kBytesLoaded / kBytesTotal * 100);
this._xscale = percentage;
if ("percentage" ==99) {
loadingBar._alpha=0;
Frame_movie._alpha=0;
delete this.onEnterFrame;
}
}
The nav bar has the following script
Button_AboutMe.onRelease = function(){
unloadMovie(4);
loadMovie("AboutMe_Loader.swf",4);
}
The loaded film used to just have as the script
stop();
now I added this script to the final AboutMe5.swf file to try and hide the bar but does not work, also tried using different layers and the unloadMovie(4); script. It did not work.
unloadMovie(4);
loadingBar._alpha=25;
Frame_movie._alpha=25;
SiteLoader._alpha = 10
// loadingBar._alpha=1;
// this._alpha=1;
//Frame_movie._alpha=1;
Now Frame_move is a mov (and tried button) and the laoding bar is a mov file. I can make these fade by adusting the alpah but this only works accross the film. I cannot trigger it with the line.
if ("percentage" ==99) {
Ive tried with and without single and double quotes. and plane.
tried replacing percentage with
this._xscale
loading bar
Nothing works.
it appears to be the if script thats the problem not triggering the fad or gettig red of the pre loader altogether.
Please help
Also tried
if (percentage >=99) {
it says syntax error
1 Attachment(s)
here is attached flash file