我正在尝试创建一个菜单。当我点击主页时,我希望我的 home_text 淡入,当我点击投资组合时,我希望我的主页文本淡出,我的投资组合文本淡入:
var home:Boolean = false;
home.addEventListener(MouseEvent.MOUSE_DOWN, homeButton_ON);
function homeButton_ON(event: MouseEvent):void
{
home = true;
display();
}
function display(event: MouseEvent):void
{
if (home = true)
{
TweenLite.to(home_text, 1, {alpha:1});
TweenLite.to(portfolio_text, 1, {alpha:0});
}
else if (portfolio = true)
{
TweenLite.to(home_text, 1, {alpha:0});
TweenLite.to(portfolio_text, 1, {alpha:1});
}
}