Jump to content

Ok why does this not work, Trying to hide a pre loader


Recommended Posts

Ok why wont this work?

 

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.

 

[pre]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;

}

}[/pre]

 

The nav bar has the following script

 

[pre] Button_AboutMe.onRelease = function(){

unloadMovie(4);

loadMovie("AboutMe_Loader.swf",4);

}[/pre]

 

 

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.

 

 

[pre] unloadMovie(4);

loadingBar._alpha=25;

Frame_movie._alpha=25;

 

SiteLoader._alpha = 10

// loadingBar._alpha=1;

// this._alpha=1;

//Frame_movie._alpha=1;[/pre]

 

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.

 

 

[pre]if ("percentage" ==99) {[/pre]

 

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

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.