Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Attach movie problem
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 11th March 10:01
linn
External User
 
Posts: 1
Default Attach movie problem



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
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666