# Preloader Adjustment

**URL:** <https://forum.kirupa.com/t/preloader-adjustment/306920>\
**Category:** flash\
**Created:** [March 24, 2010, 3:19pm UTC](https://forum.kirupa.com/t/preloader-adjustment/306920 "2010-03-24T15:19:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kitster79](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@kitster79](https://forum.kirupa.com/u/kitster79)\
**Post date:** [March 24, 2010, 3:19pm UTC](https://forum.kirupa.com/t/preloader-adjustment/306920/1 "2010-03-24T15:19:34Z")

</div>

Hello,

[FONT=Calibri, Verdana, Helvetica, Arial]I just launched my new website (I am a graphic designer) and I used a pre-existing flash pre-loader on my home page that was created for me from another project. The loading bar used to be shorter but I stretched it out to be wider. The problem is that now the actual progress bar does not go all the way across to 100%. I’m pretty sure it’s just a number change that needs to be done somewhere in the code – I just don’t know where.

If at all possible I would greatly appreciate it if you could point me in the right direction:)[/FONT]

[FONT=Calibri, Verdana, Helvetica, Arial]Here is the pre-loader I’m talking about – [COLOR=#0000ff][http://www.vojodesign.com](http://www.vojodesign.com/)  
 [/COLOR]  
Here is my script:[/FONT]

import fl.transitions.TweenEvent;  
import flash.utils.getDefinitionByName;  
import flash.events.Event;  
import flash.net.navigateToURL;  
import flash.net.URLRequest;

var links\_list:Array=[“index.php?option=com\_content&view=article&id=37&Itemid=14”,  
“index.php?option=com\_content&view=article&id=38&Itemid=9”,  
“index.php?option=com\_content&view=article&id=17&Itemid=10”,  
“index.php?option=com\_content&view=article&id=37&Itemid=11”];

this.StartPreloading();  
function StartPreloading(){  
this.addEventListener(Event.ENTER\_FRAME,this.onPreloaderEnterFrame);  
this.SetProgress(0);  
}  
function onPreloaderEnterFrame(ev:Event){  
var clip\_total=this.loaderInfo.bytesTotal;  
var clip\_loaded=this.loaderInfo.bytesLoaded;  
var clip\_progr=clip\_loaded/clip\_total;  
var progr=clip\_progr;  
this.SetProgress(progr);  
if(progr\>=1){  
this.removeEventListener(Event.ENTER\_FRAME,this.onPreloaderEnterFrame);  
this.gotoAndPlay(“go”);  
}  
}  
function SetProgress(val:Number){  
this.Preloader\_mc.Text\_txt.text=Math.round(val\*100);  
this.Preloader\_mc.Bar\_mc.Progress\_mc.Line\_mc.scaleX=val;  
}

var current\_tab:int=0;  
var current\_slide=null;

function SetupButtons(){  
for(var i=0;i\<5;i++){  
var button=this.Buttons\_mc.getChildByName(“bn”+i);  
button.AddListener(String(i),this.onMenuButton);  
if(i==this.current\_tab) button.is\_selected=true;  
}  
}  
function onMenuButton(cmd:String){  
var button=this.Buttons\_mc.getChildByName(“bn”+this.current\_tab);  
button.is\_selected=false;  
button=this.Buttons\_mc.getChildByName(“bn”+cmd);  
button.is\_selected=true;  
this.current\_tab=int(cmd);  
this.SwitchToSlide();  
}  
function SwitchToSlide(){  
var class\_ref:Class=getDefinitionByName(“slide”+String(this.current\_tab)) as Class;  
var slide=new class\_ref();  
slide.predecessor=this.current\_slide;  
if(this.current\_tab\>0){  
slide.link=this.links\_list[this.current\_tab-1];  
}  
this.addChild(slide);  
this.current\_slide=slide;  
this.current\_slide.Reveal();  
}  
function onSlideShown(ev:TweenEvent){  
}[FONT=Calibri, Verdana, Helvetica, Arial]

Thanks in advance.[/FONT]
