# Fade in Images!

**URL:** https://forum.kirupa.com/t/fade-in-images/61207
**Category:** flash
**Created:** [August 17, 2004, 12:12am UTC](https://forum.kirupa.com/t/fade-in-images/61207 "2004-08-17T00:12:36Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![tripledigit](https://avatars.discourse-cdn.com/v4/letter/t/c6cbf5/32.png) [@tripledigit](https://forum.kirupa.com/u/tripledigit)
#### Post date: [August 17, 2004, 12:12am UTC](https://forum.kirupa.com/t/fade-in-images/61207/1 "2004-08-17T00:12:36Z")

</div>

I have a simple slideshow with arrows whent clicked to jump to the next frame. I wonder is there a script for controling the alpha to fade the image in. Like for example: When I press the arrow button it jumps to the next frame and the image in the frame fades from 0% alpha to 100% but without the use of the timeline. I want to keep each frame one image if possible.

Thanks!

tripd

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 17, 2004, 6:26am UTC](https://forum.kirupa.com/t/fade-in-images/61207/2 "2004-08-17T06:26:55Z")

</div>

you would need some sort of a timer. i have no clue about timers or pacers in flash. good luck though, it’s possible…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 17, 2004, 6:50am UTC](https://forum.kirupa.com/t/fade-in-images/61207/3 "2004-08-17T06:50:12Z")

</div>

Why don’t you just create a movieclip?

OR

You can use setIntervals and Functions

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 17, 2004, 6:56am UTC](https://forum.kirupa.com/t/fade-in-images/61207/4 "2004-08-17T06:56:49Z")

</div>

setInterval and functions:

```php
 
function fadeIn (clip) {
	if (clip._alpha < 100) {
		clip._alpha += 1
	} else {
	clearInterval (time)
	}
}
time = setInterval (fadeIn, 50, picture) //50 is in milliseconds
//picture is the instance name of the movieclip that your picture is in

```

I think that’s right

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 17, 2004, 4:50pm UTC](https://forum.kirupa.com/t/fade-in-images/61207/5 "2004-08-17T16:50:51Z")

</div>

Thanks  
I’m getting a ton of syntax errors. I’m also a newbie in this thing. What do I have to replace? Lets say my movie clip is called “Fred” and the Instance name is “Fire” how would the code look then?? Also do I have to convert it to a movie not a graphic, right?

Thanks for your help!

tripd

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 18, 2004, 12:10am UTC](https://forum.kirupa.com/t/fade-in-images/61207/6 "2004-08-18T00:10:05Z")

</div>

Put this code on the frame at which you want to fade the picture:

```php
 
function fadeIn () {
	if (Fire._alpha < 100) {
		Fire._alpha += 1
		//The higher the number the faster it fades
	} else {
		clearInterval (time)
	}
}
time = setInterval (fadeIn, 50) 
//50 is in milliseconds, so the lower the number, the faster it fades
 

```

Yes, it has to be a movieclip
