# Add a fade?

**URL:** https://forum.kirupa.com/t/add-a-fade/178424
**Category:** flash
**Created:** [February 10, 2006, 1:22pm UTC](https://forum.kirupa.com/t/add-a-fade/178424 "2006-02-10T13:22:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Claire\_murphy](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Claire\_murphy](https://forum.kirupa.com/u/Claire_murphy)
#### Post date: [February 10, 2006, 1:22pm UTC](https://forum.kirupa.com/t/add-a-fade/178424/1 "2006-02-10T13:22:50Z")

</div>

Hi. I recently posted a question to help explain how to fade but it was above me. Basically I need BIOG\_PHOTOS to fade in from 0 - 100 on release. If someone could show me how it’s done and explain the code for me that would be a big help so I can implement it to other files.

on (release) {  
movie = “BIOG\_PHOTOS.swf”;  
\_root.container3.\_alpha = 100;  
\_root.container3.loadMovie(movie); \_root.container2.\_alpha = 100;}

Looking forward to some much needed help.  
Claire

---

<div class="post-metadata">

### Author: ![Rob\_Hed](https://avatars.discourse-cdn.com/v4/letter/r/8e7dd6/32.png) [@Rob\_Hed](https://forum.kirupa.com/u/Rob_Hed)
#### Post date: [March 20, 2006, 9:52pm UTC](https://forum.kirupa.com/t/add-a-fade/178424/2 "2006-03-20T21:52:24Z")

</div>

How do you control the speed of that fade? I got it to work but don’t really understand how it works.  
thanks,

> [@prototype](#):
>
> A good start but **movie** should be declared as a variable, loadMovie instance (movie) should be in quotes. You also need to set the holder clip, \_root.container3 \_alpha to zero before tween or it will show before you can tween it. In the tween function, the number 35 is the number of seconds/frames it will take to fade. You can change this to a lower number for a faster fade. If the time is followed by true it will fade in seconds. If it is followed by false it will fade in frames.
> 
> [AS]on (release) {  
> \_root.container3.\_alpha = 0;
> 
> var movie = “BIOG\_PHOTOS.swf”;  
> \_root.container3.loadMovie(“movie”);  
> new mx.transitions.Tween(\_root.container3, “\_alpha”, mx.transitions.easing.Regular.easeOut, 0, 100, 35, false);  
> }[/AS]

---

<div class="post-metadata">

### Author: ![Rob\_Hed](https://avatars.discourse-cdn.com/v4/letter/r/8e7dd6/32.png) [@Rob\_Hed](https://forum.kirupa.com/u/Rob_Hed)
#### Post date: [March 20, 2006, 9:58pm UTC](https://forum.kirupa.com/t/add-a-fade/178424/3 "2006-03-20T21:58:03Z")

</div>

> [@Rob Hed](#):
>
> How do you control the speed of that fade? I got it to work but don’t really understand how it works.  
> thanks,

Found my anwer in the help. I never knew that was even a feature. Pretty cool. (In case anyone cares, it’s the 3rd parameter)

---

<div class="post-metadata">

### Author: ![prototype](https://avatars.discourse-cdn.com/v4/letter/p/e19adc/32.png) [@prototype](https://forum.kirupa.com/u/prototype)
#### Post date: [March 21, 2006, 3:15am UTC](https://forum.kirupa.com/t/add-a-fade/178424/4 "2006-03-21T03:15:50Z")

</div>

Try these links for more info:  
[http://www.macromedia.com/devnet/flash/articles/tweening.html](http://www.macromedia.com/devnet/flash/articles/tweening.html)

[http://www.gotoandlearn.com/index.html](http://www.gotoandlearn.com/index.html) - Down the list to Tween Class

---

<div class="post-metadata">

### Author: ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)
#### Post date: [March 21, 2006, 4:04am UTC](https://forum.kirupa.com/t/add-a-fade/178424/5 "2006-03-21T04:04:02Z")

</div>

> [@Rob Hed](#):
>
> Found my anwer in the help. I never knew that was even a feature. Pretty cool. (In case anyone cares, it’s the 3rd parameter)

Actually it’s the sixth parameter 😉

```auto
mx.transitions.Tween(object:Object, property:String, easeType:Function, begin:Number, finish:Number, duration:Number, useSeconds:Boolean);

```
