I am fairly new to actionscript. I have been trying to make my preloader look much more attractive and I was wondering how to achieve this mirrored effect for the dynamic text as seen on this site http://gallery.artofgregmartin.com/ . any help would be greatly appreciated. I have searched high and low but can’t find anything that touches on this. thanks again
just add another textfield and transform it vertical flip and add white gradient box with alpha transparency over it and then change dynamic value same as to upper textfield box
This is a rough answer, but you need to do something like this:
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
percent_done = int((loaded_bytes/total_bytes)*100);
As you can see, the percent_done variable will then be an integer showing how much of the swf is loaded, which you then just display in a dynamic text box.
You can even give it the same instance name so you dont have to change your code.
When I try this technice, it works fine when I duplicate the dynamic text field, but when I flip vertical it disappears.
this is the code that im using for the preloader
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent100;
this.loadText = Math.round(getPercent100)+“%”;
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
[AS]this.loadText = Math.round(getPercent100)+"%";[/AS]Should be [AS]this.loadText.text = Math.round(getPercent100)+"%";[/AS]
Hmmm… thanks for the suggestion, however when I try this method, the duplicated text field doesn’t show. Im not sure, but a friend was telling me the other day that I should put the dynamic text field into a movie clip and duplicate the movie clip. How would one go about doing that with the type of preloader im using? Thanks again for all the help.
did you embed the text??
n = 0;
onEnterFrame = function () {
if (n<100) {
n++;
l = "loaded: "+n+"%";
} else {
onEnterFrame = null;
}
};
wow cool greg martin changed his site. I remember before the dawn of time i always used his stuff for my desktop wallpapers. Excellant work.
I see that this method works, but I don’t quite understand how to use this technice with the preloader I’m using. I guess I’m still too new to this language. Thanks a lot for the example though. Any more suggestions are greatly appreciated.