English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

in the following script:

on (release) {
img4_mc.onEnterFrame = function() {
img4_mc._alpha -= 5;
if (img4_mc._alpha <= 0) {
img4_mc._visible = false;
delete img4_mc.onEnterFrame;
}
};
}

on (release) {

img3_mc.onEnterFrame = function() {
img3_mc._alpha += 5;
if (img3_mc._alpha <= 100) {
img3_mc._visible = true;

}
};
}

img3_mc fades in before img4_mc fades out, can anyone tell me how I modify the code to make it so img4_mc fades out and then img3_mc fades in?

2006-08-01 09:01:18 · 5 answers · asked by tektonnic 2 in Computers & Internet Programming & Design

5 answers

ok, now please forgive me, its been a while since I used flash actionscripting, now since you are using an "on release" (I assume that these are BOTH buttons) function, try this idea, assign img4_mc a variable, such as 0, then when img4_mc finishes, turn the variable to 1, and have the other button only function once that variable hits one...something like this

on (release) {
img4_mc.onEnterFrame = function() {
img4_mc._alpha -= 5;
if (img4_mc._alpha <= 0) {
img4_mc._visible = false;
delete img4_mc.onEnterFrame;
NewVariable = 1;
}
};
}

If (NewVariable == 1)
{
on (release) {

img3_mc.onEnterFrame = function() {
img3_mc._alpha += 5;
if (img3_mc._alpha <= 100) {
img3_mc._visible = true;
}
}
};
}

I'm sorry if you get a syntax error here, like I said, its been a while. Hope it helps

2006-08-01 10:34:04 · answer #1 · answered by D 4 · 0 0

I down know if is a good idea but try to use SwapDepth to change alsio the depth of two imgs

2006-08-01 16:12:23 · answer #2 · answered by Ana 6 · 0 0

So, are you making a button? Just wondering. I don't know much about actionscript...I just saw your question and recognized it as actionscript... sorry though.

2006-08-01 16:08:28 · answer #3 · answered by keybaordz 2 · 0 0

Yes your mother did do drugs while she was pregnant with you

2006-08-01 16:04:29 · answer #4 · answered by Sherry L 2 · 0 0

Your question is nor clear but I can help you. mail me your .fla file anilkumarnd@yahoo.com

2006-08-02 03:04:44 · answer #5 · answered by Anil 3 · 0 0

fedest.com, questions and answers