fading image transitions in actionscript 3
I'm trying to create a simple yet effective image slideshow for my homepage. it'll be a bar, 600 pixels wide, by 300 pixels high. There will be 4 buttons that will line the bottom, numbered 1 through 4, that will control 4 separate slides that'll appear in that window. If you don't click anything, the images will fade in and out after x amount of seconds. Clicking on the numbered buttons will load the appropriate slide, and each slide when clicked will take you to a certain part of the website.
I wish to do this in actionscript... not using the timeline as I prefer to do all transitions in actionscript. Can anyone shed light on how to set this up? I've been trying to use the TransitionManager function... however I'm getting mixed results. Here's a screenshot:
http://i67.photobucket.com/albums/h2...reenshot-3.jpg
Here's my clumsy code... that doesn't work at all lol
Code:
import fl.transitions.*;
import fl.transitions.easing.*;
ss1_mc.alpha = 1;
ss2_mc.alpha = 0;
ss3_mc.alpha = 0;
ss4_mc.alpha = 0;
var currentImage:MovieClip = ss1_mc;
one_mc.addEventListener(MouseEvent.CLICK, nextImage);
two_mc.addEventListener(MouseEvent.CLICK, nextImage);
three_mc.addEventListener(MouseEvent.CLICK, nextImage);
four_mc.addEventListener(MouseEvent.CLICK, nextImage);
one_mc.targetMC = ss1_mc;
two_mc.targetMC = ss2_mc;
three_mc.targetMC = ss3_mc;
four_mc.targetMC = ss4_mc;
function nextImage(e:MouseEvent):void
{
TransitionManager.start(currentImage, {type:Fade, direction:Transition.OUT, duration:3, easing:Strong.easeOut});
currentImage = MovieClip(e.currentTarget);
TransitionManager.start(currentImage.targetMC, {type:Fade, direction:Transition.IN, duration:3, easing:Strong.easeOut});
}
Any help would be greatly appreciated... thanks!