Spikeysonic Posted December 19, 2011 Share Posted December 19, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/253485-ok-why-does-this-not-work-trying-to-hide-a-pre-loader/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.