0

我正在编写 Flash 分步指南。我有一个问题。

有3层,1是脚本2是隐形按钮3是封面屏幕(mc)

, 内盖屏幕。在它自己的时间线上,它有一个动画。

,我想做的是;当我滚动隐形按钮时,我希望封面屏幕时间线播放并在某个帧处停止,当展开时,我希望它再次播放并开始。

我在我的隐形按钮上使用了这个。

on (rollOver){ cover.gotoAndPlay("fadein"); } on (rollOut) { cover.gotoAndPlay("fadeout"); fadein 和 fadeout 是 cover_mc 中​​的帧名称

但 id 不起作用:S

任何想法是为什么?

4

2 回答 2

0

First of all, try to use trace :)

on (rollOver){
    trace(cover);
    cover.gotoAndPlay("fadein");
} 

if nothing traces than there's probably something wrong with your rollOver action. It must trace [Object MovieClip] (or something like that, i'm not quite sure.. its ages since i did some AS2 development)

if it traces coorect, then you probably have a problem with your frame label. it also could be that the cover instance is not know from your rollOver function, try _root.cover.gotoAndPlay("fadein");

于 2009-03-11T15:55:08.883 回答
0

如果我理解正确,代码在按钮上,您希望父时间线对滚动动作做出反应。

所以尝试以下方法:

on (rollOver) {
   _parent.gotoAndPlay('fadein');
}

关键是_parent,它显然会处理按钮的父级。

于 2009-03-24T08:40:10.660 回答