我正在努力使我的动画工作,其中屏幕的单独区域会唤起在悬停时出现/消失的状态,并且如果单击则转到其他地方,如果您单击它一秒钟就会出现转到该标签,然后返回到开始。有什么建议么?
//mouse overs (i've only left 1 instance of each event listener here)
comic.addEventListener(MouseEvent.MOUSE_OVER,BubbleHover);
//mouse outs
comic.addEventListener(MouseEvent.MOUSE_OUT,BubbleOut);
//mouse down
comic.addEventListener(MouseEvent.CLICK,BubbleClick);
//
// Take the playhead to where the user hovers.
//
function BubbleHover(evtObj:MouseEvent) {
var LabelName:String = evtObj.target.name + "Bubble";
trace(evtObj.target.name +" bubble appeared"); //state which bubble appears
//go to the section clicked on...
gotoAndStop(LabelName);
}
//
// Return to the beginning bubble
//
function BubbleOut(evtObj:Event):void{
gotoAndStop("lookBubble");
}
//
// Go to the Label Page
//
function BubbleClick(evtObj:Event){
var MovieClipPage = evtObj.target.name +"_page";
if (mouseEnabled) {
mouseEnabled=false;
trace(mouseEnabled); // returns false but then returns to "lookBubble"
}
gotoAndStop(MovieClipPage);
mouseEnabled(true);
}
据我了解正在发生,当播放头转到 BubbleClick 标签时,MouseEvent.MOUSE_OUT
正在发生。有什么想法可以绕过这个吗?