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.
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
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?
Put this code on the frame at which you want to fade the picture:
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