duplicateMovieClip and for loop problem
Hi,
I'm creating a flash menu and I have this AS code on the first frame:
Actionscript Code:
import com.greensock.*;
import com.greensock.easing.*;
TweenPlugin.activate([BlurFilterPlugin, ColorMatrixFilterPlugin, EndArrayPlugin, AutoAlphaPlugin, FrameLabelPlugin, GlowFilterPlugin]);
mc_main.mc_title._alpha = 0;
mc_main.mc_title._y = -20;
TweenLite.to(mc_main.mc_title, 1.5, {_y:-5.5, delay:1, _alpha:100, ease:Back.easeOut});
for (i=0;i<6;i++){
var temp_mc = mc_main.duplicateMovieClip("mc_main"+i, i+10);
TweenLite.to(temp_mc, 1.5, {_y:60+(temp_mc._height-20)*i, delay:i*0.5, _alpha:100, ease:Back.easeOut});
TweenMax.to(temp_mc.plane, 0, {colorMatrixFilter:{colorize:0x333333, amount:1, contrast:3, brightness:2}});
temp_mc.onRollOver = function(){
_root.temp_mc.gotoAndStop("s1");
TweenLite.to(temp_mc.mc_title, 1, {glowFilter:{color:0xffff00, alpha:1, blurX:15, blurY:15, quality:3}, ease:Sine.easeOut});
}
temp_mc.onRollOut = function(){
_root.temp_mc.gotoAndStop("s2");
TweenLite.to(temp_mc.mc_title, 1, {glowFilter:{alpha:0}, ease:Sine.easeOut});
}
}
My problem is, that when these MC's duplicates, there is only one (last) which is working.
You can see it in action here: http://mweb.lt/problem.html
Can someone help me to fix it?