Hello everyone
I wonder something about TweenMax, onComplete function.
Normally when i use onComplete function its working just perfect but when i try to send a value like a movieclip, onComplete function starting with TweenMax.
Here is my code :
import flash.events.MouseEvent;
import com.greensock.*;
import com.greensock.easing.*;
for(var i:int= 0;i<5;i++)
{
this["k"+i.toString()].buttonMode = true;
this["k"+i.toString()].addEventListener(MouseEvent.CLICK, sendMyMC);
}
function sendMyMC(e:MouseEvent)
{
TweenMax.to(e.currentTarget,1,{x:400,ease:Back.easeOut,onComplete:KillMC(e.currentTarget.name)});
}
function KillMC(name:String)
{
removeChild(this[mc]);
}
In this code I want tween first then removeChild but it just remove my mc on stage and i cant see that Tween :/