Hi all,
I've got a flash slideshow, I found some code on the net that works perfect
for my need, only thing is it doesn't show any mc when it starts and if I
attach it from the timeline or something it just stays there after i start
pressing the buttons. How can i make it 'part of' the slideshow, ie fade out
when i press a button.
This is the code i have on the empty mc:
onClipEvent (load) {
// x-location to place the MC's in
xLoc = 17;
// y-location to place the MC's in
yLoc = 14;
// Adjust fade-in speed
inStep = 8;
// Adjust fade-out speed
outStep = 8;
function xSetFunc(method, arg) {
this.method = method;
this.arg = arg;
}
function xFadeOut(sMC) {
this.sMC = sMC;
if (nAlpha>0) {
nAlpha -= outStep;
_root.currentMC._alpha = nAlpha;
} else {
xSetFunc(xSelect);
_root.currentMC.removeMovieClip();
}
}
function xSelect() {
_root.attachMovie(sMC, "currentMC", 1);
_root.currentMC._alpha = 0;
xSetFunc(xLocate);
}
function xLocate() {
_root.currentMC._alpha = 0;
_root.currentMC._x = xLoc;
_root.currentMC._y = yLoc;
xSetFunc(xFadeIn);
}
function xFadeIn() {
if (nAlpha<100) {
nAlpha += inStep;
_root.currentMC._alpha = nAlpha;
} else {
xSetFunc();
}
}
}
onClipEvent (enterFrame) {
method(arg);
}
This is the code i have on each button:
on (release) {
controller.xSetFunc(controller.xFadeOut, "mc11");
}
Thank you in advance and have a mery christmas
Linn