|
-
Follower
Font For Flash Freloader
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 preloader 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 more actionscript )
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();
}
-
I don't konw if this is the answer you are looking for but why not write the word "stttttttttttttttttttttt" and mask it with the progress bar. You will get pretty much the same result with much less coding.
-
Follower
What I need is something like this...
Frame 1:
Total = _root.getBytesTotal();
Received = _root.getBytesLoaded();
Percentage = (Received/Total)*100;
play();
Frame 2:
if (Percentage == x) {
bar = "stu";
gotoAndPlay(1);
}
if (Percentage == 100) {
Play(1);
}
So now the only problem I am having is that I dont know how to tell the bar textField to have s, than x manu t's, than u. Thats pretty much what I need.
-
Follower
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|