# How do I achieve this effect?

**URL:** <https://forum.kirupa.com/t/how-do-i-achieve-this-effect/182802>\
**Category:** flash\
**Created:** [March 21, 2006, 3:16pm UTC](https://forum.kirupa.com/t/how-do-i-achieve-this-effect/182802 "2006-03-21T15:16:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![WyteDragN](https://avatars.discourse-cdn.com/v4/letter/w/5f8ce5/32.png) [@WyteDragN](https://forum.kirupa.com/u/WyteDragN)\
**Post date:** [March 21, 2006, 3:16pm UTC](https://forum.kirupa.com/t/how-do-i-achieve-this-effect/182802/1 "2006-03-21T15:16:39Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![gvozden](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gvozden/32/1084_2.png) [@gvozden](https://forum.kirupa.com/u/gvozden)\
**Post date:** [March 21, 2006, 4:22pm UTC](https://forum.kirupa.com/t/how-do-i-achieve-this-effect/182802/2 "2006-03-21T16:22:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nickf828](https://avatars.discourse-cdn.com/v4/letter/n/5daacb/32.png) [@nickf828](https://forum.kirupa.com/u/nickf828)\
**Post date:** [March 21, 2006, 4:24pm UTC](https://forum.kirupa.com/t/how-do-i-achieve-this-effect/182802/3 "2006-03-21T16:24:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [March 21, 2006, 4:25pm UTC](https://forum.kirupa.com/t/how-do-i-achieve-this-effect/182802/4 "2006-03-21T16:25:19Z")

</div>

You can even give it the same instance name so you dont have to change your code.

---

<div class="post-metadata">

**Author:** ![WyteDragN](https://avatars.discourse-cdn.com/v4/letter/w/5f8ce5/32.png) [@WyteDragN](https://forum.kirupa.com/u/WyteDragN)\
**Post date:** [March 21, 2006, 4:41pm UTC](https://forum.kirupa.com/t/how-do-i-achieve-this-effect/182802/5 "2006-03-21T16:41:32Z")

</div>

> [@gvozden](#):
>
> 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

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 = getPercent_100;  
this.loadText = Math.round(getPercent_100)+“%”;  
if (bytes\_loaded == bytes\_total) {  
this.gotoAndPlay(3);  
}

---

<div class="post-metadata">

**Author:** ![B\_L\_U\_E](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@B\_L\_U\_E](https://forum.kirupa.com/u/B_L_U_E)\
**Post date:** [March 21, 2006, 5:08pm UTC](https://forum.kirupa.com/t/how-do-i-achieve-this-effect/182802/6 "2006-03-21T17:08:50Z")

</div>

[AS]this.loadText = Math.round(getPercent_100)+"%";[/AS]Should be [AS]this.loadText.text = Math.round(getPercent_100)+"%";[/AS]

---

<div class="post-metadata">

**Author:** ![WyteDragN](https://avatars.discourse-cdn.com/v4/letter/w/5f8ce5/32.png) [@WyteDragN](https://forum.kirupa.com/u/WyteDragN)\
**Post date:** [March 21, 2006, 7:11pm UTC](https://forum.kirupa.com/t/how-do-i-achieve-this-effect/182802/7 "2006-03-21T19:11:27Z")

</div>

> [@BlueNar](#):
>
> ```
> ActionScript Code:
> [FONT=Courier New][LEFT][COLOR=#0000FF]this[/COLOR].[COLOR=#000080]loadText[/COLOR] = [COLOR=#0000FF]Math[/COLOR].[COLOR=#0000FF]round[/COLOR][COLOR=#000000]([/COLOR]getPercent*[COLOR=#000080]100[/COLOR][COLOR=#000000])[/COLOR]+[COLOR=#FF0000]"%"[/COLOR];
> 
> ```
> 
> [/LEFT]  
> [/FONT]
> 
> Should be ActionScript Code:  
> [FONT=Courier New][LEFT][COLOR=#0000FF]this[/COLOR].[COLOR=#000080]loadText[/COLOR].[COLOR=#0000FF]text[/COLOR] = [COLOR=#0000FF]Math[/COLOR].[COLOR=#0000FF]round[/COLOR]COLOR=#000000[/COLOR]+[COLOR=#FF0000]“%”[/COLOR];  
> [/LEFT]  
> [/FONT]

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.

---

<div class="post-metadata">

**Author:** ![NinoScript](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ninoscript/32/1484_2.png) [@NinoScript](https://forum.kirupa.com/u/NinoScript)\
**Post date:** [March 21, 2006, 10:07pm UTC](https://forum.kirupa.com/t/how-do-i-achieve-this-effect/182802/8 "2006-03-21T22:07:40Z")

</div>

did you embed the text??

```auto

n = 0;
onEnterFrame = function () {
	if (n<100) {
		n++;
		l = "loaded: "+n+"%";
	} else {
		onEnterFrame = null;
	}
};

```

---

<div class="post-metadata">

**Author:** ![hkl](https://avatars.discourse-cdn.com/v4/letter/h/a8b319/32.png) [@hkl](https://forum.kirupa.com/u/hkl)\
**Post date:** [March 22, 2006, 11:29am UTC](https://forum.kirupa.com/t/how-do-i-achieve-this-effect/182802/9 "2006-03-22T11:29:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![WyteDragN](https://avatars.discourse-cdn.com/v4/letter/w/5f8ce5/32.png) [@WyteDragN](https://forum.kirupa.com/u/WyteDragN)\
**Post date:** [March 22, 2006, 1:39pm UTC](https://forum.kirupa.com/t/how-do-i-achieve-this-effect/182802/10 "2006-03-22T13:39:04Z")

</div>

> [@NiñoScript](#):
>
> did you embed the text??
> 
> ```
> ActionScript Code:
> [FONT=Courier New][LEFT]n = [COLOR=#000080]0[/COLOR];
> 
> ```
> 
> [COLOR=#0000FF]onEnterFrame[/COLOR] = [COLOR=#000000] **function** [/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
> &nbsp;&nbsp;&nbsp;&nbsp;if COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n++;  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l = [COLOR=#FF0000]“loaded: “[/COLOR]+n+[COLOR=#FF0000]”%”[/COLOR];  
> &nbsp;&nbsp;&nbsp;&nbsp;[COLOR=#000000]}[/COLOR] [COLOR=#0000FF]else[/COLOR] [COLOR=#000000]{[/COLOR]  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onEnterFrame = [COLOR=#000000] **null** [/COLOR];  
> &nbsp;&nbsp;&nbsp;&nbsp;[COLOR=#000000]}[/COLOR]  
> [COLOR=#000000]}[/COLOR];  
> [/LEFT]  
> [/FONT]

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.
