I am creating a timeline and as you scroll the timeline, I want the links of the different time periods of the timeline to change color as the timeline passes that point. Here is the code I have:
onEnterFrame = function()
{
if( _root.Target._x < 21 )
{
TweenLite.to( PreMC, .5, { tint: 0xC468DB });
}
else if((_root.Target._x > -200) && (_root.Target._x <= -100 ))
{
TweenLite.to( PreMC, .5, { tint: 0xFDF9E4 });
}
else
{
TweenLite.to( PreMC, .5, { tint: 0x000000 });
}
}
The If and Else statement both work fine, but the Else IF statement does not work at all. The color will not change when the movie clip is between those two x values. I have no clue what is wrong, any help would be greatly appreciated since I am pretty new to action script. Thank you