Fonts For Flash Preloader
Hey guys, I have run into a problem trying to be tricky. I downloaded a great font from FFF called FFF Extras 2 and it features three letters (s,t,u) that make a small bar and the more "t's" the longer the bar. In trying to use this as a prrloader bar I made the following action script, however I know for a fact that there must me a better method for frame two. At the moment (as you can see below) for every percent I have a code and it is way to long and boring and well... wrong. So, my quesiton is
What is the best method for doing this?
(I realy should learn some better AS ;))
Frame 1:
Total = _root.getBytesTotal();
Received = _root.getBytesLoaded();
Percentage = (Received/Total)*100;
play();
Frame 2:
if (Percentage == 1) {
bar = "stu";
gotoAndPlay(1);
}
if (Percentage == 2) {
bar = "sttu";
gotoAndPlay(1);
}
if (Percentage == 3) {
bar = "stttu";
gotoAndPlay(1);
}
Etc. Etc. Etc. until...
if (Percentage == 99) {
bar = "stttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttttttttttt ttu";
gotoAndPlay(1);
}
if (Percentage == 100) {
Play();
}