我正在努力弄清楚如何为按钮/s 编写活动状态(显示当前页面)这是我到目前为止所拥有的:
stop();
function handleClick (p_event:MouseEvent) :void
{
if(p_event.target == logo_btn)
{
gotoAndStop(1, "Home");
}
if(p_event.target == home_btn)
{
gotoAndStop(1, "Home");
}
if(p_event.target == portfolio_btn)
{
gotoAndStop(1, "Portfolio");
}
if(p_event.target == press_btn)
{
gotoAndStop(1, "Press");
}
if(p_event.target == links_btn)
{
gotoAndStop(1, "Links");
}
if(p_event.target == contact_btn)
{
gotoAndStop(1, "Contact");
}
}
stop();
home_btn.addEventListener(MouseEvent.CLICK, handleClick);
portfolio_btn.addEventListener(MouseEvent.CLICK, handleClick);
press_btn.addEventListener(MouseEvent.CLICK, handleClick);
links_btn.addEventListener(MouseEvent.CLICK, handleClick);
contact_btn.addEventListener(MouseEvent.CLICK, handleClick);