开发者

Flash buttons working on every platform, except Safari

Basically, every button works in Firefox, Chrome, IE, but they will not work in Safari.

I'm using straightforward code:

Button1.addEventListener(MouseEvent.CLICK, ButtonClick);
function ButtonClick开发者_如何学C(event:MouseEvent):void  {
    gotoAndStop(3);
}

The movie starts on frame 2 - frame 1 is a preloader. Classes are set to start on frame 2, but changing that to frame 1 didn't do anything either.

I'm at a loss here. Any clue?

Thanks


First thing is to learn how to format your code so that it's easier for us to read

 Button1.addEventListener(MouseEvent.CLICK, ButtonClick); 

 function ButtonClick(event:MouseEvent):void 
 { 
     gotoAndStop(3); 
  }

Next, is to make sure you're using the last updates both for your browsers and FlashPlayer

Finally, try to add trace() statements in order to find out where the application breaks.

 Button1.addEventListener(MouseEvent.CLICK, ButtonClick);
 trace("Button instance " , Button1); 

 function ButtonClick(event:MouseEvent):void 
 { 
     gotoAndStop(3); 
    trace(event); 
  }

When debugging both in Firefox & Safari , for instance, it may give you some clues and probably help you make your question more specific.


My apologies if you've already tried this but see if changing the "wmode" attribute of the object/embed tags makes a difference. I had issues with having it set to "transparent", in Safari, once upon a time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜