I'm using the latest AS2 TimelineMax and want to remove one of the tweens from the timeline when a button is rolled over, but I can't seem to get timeline.remove(myTween) to work. Here's the basics of my code.
var timeline:TimelineMax
timeline = new TimelineMax({repeat:23,yoyo:false});
for(var i=0; i<2; i++)
{
sections[num]["word"+i+"_mc"].gotoAndStop(1);
var targ:MovieClip=sectionHolder_mc[sections[currentSection]]["word"+i+"_mc"];
targ.num = i
targ.stop();
targ.onRollOver=function()
{
wordOver(this);
}
timeline.insert( TweenMax.to(targ, .5, {glowFilter:{color:0xFFFFFF, alpha:glowAlphas[currentSection], blurX:10, blurY:10}}) );
timeline.insert( TweenMax.to(targ, .5, {glowFilter:{color:0xFFFFFF, alpha:0, blurX:10, blurY:10, remove:true}, delay:.5}) );
}
//BUTTON ACTION HERE
function wordOver(targ:MovieClip):Void
{
if(targ._currentframe==1)
{
targ.play();
//CAN'T Figure out what needs to go here to remove a tween in the timeline.
}
}