Is this possible to do using only Actionscript..?

As part of my brief, I have to create a small flash movie that will load a random quote (which is actually a jpeg image), fade it in to view, display it for a length of time (probably only 3-5 seconds), fade it out and then load another random quote.

Is this possible to do, purely using actionscript?

I can randomly load an image - I used the “Random Background Image” tutorial on this site - but getting the fading/pausing/fading then moving to another quote has got me stumped.

The images are imported into their own swf file that is loaded into a placeholder movie on the html page.
I tried adding in a for loop to the individual swf and the placeholder movie, to loop through alpha property of the image (just to fade up for the moment, till I get it working) - but this didn’t work at all.

I could use tweens for the fading, but this could end up a mess and more work than it needs to be as there could be quite a lot of quotes added over time.

Has anyone got any ideas on how to do this? Or am I going to have to go down the tween route?

thanks in advance for any help :slight_smile:

Here’s a link to check out:

Navigate to laboratory -> source code -> FLAs -> gPhotoFader

thanks, that helped me out! :slight_smile: