Hello,
Can someone help me out with this code? Im trying to create a menu, that initially loads an image with loadImage. Then when a menu item is clicked, it fades the initially loaded image into the next Image. Each menu item should fade into another Image.
Ive been working on this for a few days, and Im not really sure how to do it.
Anyway heres the code I have so far:
import mx.transitions.Tween;
import mx.transitions.easing.*;
//globs
var banners = [ “banner0.jpg”, “banner1.jpg”, “banner2.jpg”];
var b:MovieClip;
var alpha = 100;
// create a movieclip to load the photo into
function getImage(){
b = _root.createEmptyMovieClip(“img”, i);
b._x = 0;
b._y = 0;
b.loadMovie(“banner0.jpg”);
b._alpha = alpha;
}
function fade(){
var mcTween:Tween = new Tween(b, “_alpha”, Regular.easeInOut, 100, 20, 2, true);
};
getImage();
menuBar.menu0.onRelease = function() { b.loadMovie(banners[0]); };
menuBar.menu1.onRelease = function() { b.loadMovie(banners[1])};
menuBar.menu2.onRelease = function() { b.loadMovie(banners[2])};
Thanks for any help.