|
主题: 按钮
|
 eluok
职务:普通成员
等级:1
金币:0.0
发贴:38
|
#12002/5/24 15:45:24
条件:舞台上有三个按钮a、b、c。 要求:将行为附给其中的一个按钮,当用户在这舞台上三个按钮之外的区域单击鼠标时alert"ok". 问题:如何写这个行为。
|
 eluok
职务:普通成员
等级:1
金币:0.0
发贴:38
|
#22002/5/26 13:09:17
注意:按钮的个数可以不确定。
|
 满眼金星
职务:普通成员
等级:2
金币:1.0
发贴:441
|
#32002/5/26 16:22:48
做考试题么?呵呵 :)
|
 D计划-混沌
职务:管理员
等级:6
金币:15.2
发贴:3528
|
#42002/5/26 17:36:33
global bottonnum on mouseenter me set bottonnum=1 end on mouseleave me set bottonnum=0 end on exitframe if the mousedown and bottonnum<>1 then alert "ok" end if end
|
 eluok
职务:普通成员
等级:1
金币:0.0
发贴:38
|
#52002/6/15 11:23:38
谢谢版主的热心解答!这样做可以满足我的要求,但是如果需要为每个 sprite 附行为,不合题意。我经过
试验找到了解决方法,希望能给遇到相同问题的朋友一些帮助:
pSpriteList --将所有精灵保存到列表pRectList
on exitFrame me s = the rollover if (NOT pSpriteList.getOne(s)) AND (the mouseDown) then alert "OK" end if end
我不会在留意这个贴子,如果那位朋友不明白请E-mail,我会详细解答。
编辑历史:[这消息被eluok编辑过(编辑时间2002-06-30 10:33:57)]
|
 thelcg
职务:普通成员
等级:1
金币:0.0
发贴:106
|
#62002/7/24 9:09:00
还是斑竹的program very good .
|
 sunangel_5d
职务:普通成员
等级:1
金币:0.0
发贴:85
|
#72002/8/16 15:26:53
pSpriteList --将所有精灵保存到列表pRectList
on exitFrame me s = the rollover if (NOT pSpriteList.getOne(s)) AND (the mouseDown) then alert "OK" end if end
是什么脚本? 是电影脚本吧。好像不行!
|