1

我正在做一个使用 Flash CS3 / AS 2(并且不能使用 AS3)的工作项目。我有一个相当有趣和棘手的问题,它占用了相当多的时间和理智。

我正在制作一个横幅,它会在翻转时显示新设计,并在推出时切换回第一个设计。这部分工作正常。但是,问题在于第二种设计还包括一个可点击的号召性用语按钮。当鼠标悬停在此按钮上时,它会将其视为一次推出,并返回到第一个设计。

到目前为止,我已经尝试将点击区域转换为影片剪辑,然后使用 Actionscript 尝试使该影片剪辑可点击。

_root.cta_instance.buttonMode = true;

_root.cta_instance.onRelease = function () { getURL(" http://www.google.com "); }

这可以防止触发推出,但它并没有使它可点击。

我向你们的集体专业知识低头。提前感谢您防止我头上出现更多的白发!

4

2 回答 2

1

哦,伙计,这个问题是我很高兴离开 AS2 的原因之一。我认为没有一个好的解决方案,但这里有一些我尝试过的事情:

  1. 向子按钮添加一个翻转方法,以保持第二个横幅设计到位
  2. 在翻转时,使用onMouseMoveenterFramesetInterval()定期hitTest检查鼠标是否仍在第二个横幅影片剪辑的区域中。仅在不是时才执行推出效果。
  3. 不要使按钮可点击。将 onRelease 添加到第二个横幅 MovieClip 以检查鼠标是否在号召性用语按钮的区域中,如果是,则运行按钮的代码。

Dealing with Flash Button Capturing from senocular中也有一些解释。

于 2009-09-10T18:26:10.660 回答
0

I'm having a hard time interpreting the way you are cycling banners, but with the info you've posted, i would put the second banner and button in a container movieclip, that way the rollout of the button wont trigger the container rollout event.

于 2009-09-10T04:41:02.167 回答