Article

Home » Design and Layout » Flash Tutorials » Flash Script - Sequential Image Fader

About the Author

SitePoint

View all articles by SitePoint...

Flash Script - Sequential Image Fader

By SitePoint

April 28th, 2003

Reader Rating: 8.5

Download the sample files here.

1. Take a picture and convert it into a movie clip. Here I've used a rectangle shape as an image, but of course, you can use any images of your choice.

2. From the library. drag the movieclip on to the stage.

3. I have taken 6 movie clips and given each a instance name of "blue1", "blue2", "blue3", "blue4", "blue5", or "blue6".

4. Now comes the action script. In the first key frame insert the action:

fade = 100;  

//starting movie number  

movienum = 1;

5. Create the key frames as shown here:

1084_tool2

6. In the fifth key frame, insert the actions:

setProperty ("/blue" add movienum, _alpha, fade);  

fade = fade - 5;  

if(fade == 0)  

{  

fade = 100;  

setProperty ("/blue" add movienum, _alpha, fade);  

movienum = movienum + 1;  

gotoAndPlay (2);  

}  

if(movienum == 7)  

{  

fade = 100;  

movienum = 1;  

gotoAndPlay (1);  

}

7. In the last key frame give action.

gotoAndPlay (5);.

8. Test the movie see how the movie fades. Use your own imagination to re-use the movie for your specific purposes!

If you liked this article, share the love:
Print-Friendly Version Suggest an Article

Sponsored Links

Rate This Article

  • 1
    Poor
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
    Great

Comment on This Article

Have something to say?

Post A Comment

You need to be a member of the SitePoint Forums to comment on this post. Sign Up

Already a member? Post using your SitePoint Forums account: