[quoted text, click to view] >>Ok I've managed to get most of this working including the alpha fade in.
function fadeImageIn() {
var fadeTween = new mx.transitions.Tween(loader1, "_alpha",
mx.transitions.easing.Regular.easeIn, 0, 100, 1.5, true);
loadmovie(imagePath, loader1);
}
Either the last line contains a typo (it's loadMovie with capital M) or you
call a function that you don't show here. If it's a typo then maybe this works
when testing locally but it won't work online. You need to load the jpg first
and when it's completely loaded you can perform the tween. Hit F1 and search
for loadMovie() for examples how to use the function (use the
MovieClip.loadMovie() instead of the global function). And if you are targeting
the Flash Player 7, I would use the MovieClipLoader Class.
[quoted text, click to view] >>I haven't been able to get the images to fade out (fadeImageOut function)
I don't see any call to the function so that's probably what is wrong.
function fadeImageOut(loader1) {
var fadeTween = new mx.transitions.Tween(loader1, "_alpha",
mx.transitions.easing.Regular.easeOut, 100, 0, 1.5, true);
unloadMovie(loader1);
}
This won't work. The code will be executed right away. If you first want to
fade out you will have to use unloadMovie() in a function you define for the
onMotionFinished handler of the tween:
function fadeImageOut(loader1) {
var fadeTween = new mx.transitions.Tween(loader1, "_alpha",
mx.transitions.easing.Regular.easeOut, 100, 0, 1.5, true);
fadeTween.onMotionFinished=function(){
unloadMovie(loader1);
}
}
But, when you remove the loader1 then how are you going to load new content?
The script still needs some work. On kirupa.com (and other sites) you will
find good tutorials on this topic. I would look into them before you proceed.