主题:  错在哪里?

h121

职务:普通成员
等级:1
金币:0.0
发贴:8
注册:2002/5/13 12:40:11
#12002/6/19 8:32:39
在一张图片上写上以下行为,错在哪里?
global a
on beginsprite me
a=0
end

on mouseUp me
a=a+1
end
on exitFrame me
if a=1 then
sprite(1).blend=sprite(1).blend-1
a=0
end if
return
end



magicwind

职务:普通成员
等级:1
金币:1.0
发贴:160
注册:2004/9/15 15:36:55
#22002/6/19 9:46:04
sprite(1).blend=sprite(1).blend-10



D计划-混沌

职务:管理员
等级:6
金币:15.2
发贴:3528
注册:2007/4/9 9:48:37
#32002/6/19 10:35:42
你的行为的目的是什么



h121

职务:普通成员
等级:1
金币:0.0
发贴:8
注册:2002/5/13 12:40:11
#42002/6/19 16:43:34
错是不错,只是能不能在这个script里面连续执行
sprite(1).blend=sprite(1).blend-1



D计划-混沌

职务:管理员
等级:6
金币:15.2
发贴:3528
注册:2007/4/9 9:48:37
#52002/6/19 18:39:25
按一下连续执行
if a=1 then
sprite(1).blend=sprite(1).blend-1
a=0
end if
改为
if a=1 and sprite(1).blend>0 then
sprite(1).blend=sprite(1).blend-1
else
a=0
end if

按住连续执行
on mousewithin me
if the mousedown then
sprite(1).blend=sprite(1).blend-1
end if
end
就可以了

编辑历史:[这消息被54zq编辑过(编辑时间2002-06-19 18:41:38)]


h121

职务:普通成员
等级:1
金币:0.0
发贴:8
注册:2002/5/13 12:40:11
#62002/6/19 20:20:47
测试通过,谢谢版主!