|
主题: 应该是个简单的问题吧
|
 andrewlin
职务:普通成员
等级:1
金币:1.0
发贴:184
注册:2001/7/8 16:42:18
|
#12002/12/16 14:22:16
本人最近做的一个课件中要有一段控制的内容,要求通道一的声音停止时,转换一个精灵 内容,我用以下语句: on beginsprite me if soundbusy(1)=false then set the member of sprite the currentSpriteNum to member "playbutton" end if end 但用on beginsprite me只能响应一次,我想程序能够随时响应,不知如何办才好,希望各位大侠多多指教,谢谢!
|
 白天
职务:普通成员
等级:1
金币:0.0
发贴:61
注册:2002/1/8 17:49:59
|
#22002/12/16 15:14:49
那就放在 on exitframe里面咯,它响应100次。
|
 andrewlin
职务:普通成员
等级:1
金币:1.0
发贴:184
注册:2001/7/8 16:42:18
|
#32002/12/17 9:11:11
必须放在精灵脚本里,不能放在帧脚本里,我想要它随时都能响应,帮我想想办法吧!
|
 我是小马
职务:普通成员
等级:3
金币:17.0
发贴:794
注册:2000/11/13 14:56:59
|
#42002/12/17 12:34:38
在影片剧本中加入 on idle if soundbusy(1)=false then set the member of sprite the currentSpriteNum to member "playbutton" end if end
|
 andrewlin
职务:普通成员
等级:1
金币:1.0
发贴:184
注册:2001/7/8 16:42:18
|
#52002/12/18 11:04:43
多谢版主的指点,但试了一下,发现不行。可能是我没说清楚吧,再解释一下:我做一个多态按钮对声音进行暂停继续的控制,在声音暂停状态下,当用别的按钮跳到另一部分时(此时的声音为另一文件),我想使暂停状态下的按钮变成继续状态下。不知现在说清楚了没有。请版主指点!
|
 我是小马
职务:普通成员
等级:3
金币:17.0
发贴:794
注册:2000/11/13 14:56:59
|
#62002/12/18 11:39:04
可以设置一个全局变量gFlag,在每个声音开始的那一帧帧脚本中加入 global gFlag on enterframe me gFlag =1 end on exitframe me if soundbusy(1)=false then gFlag = 0 end if end
在影片剧本中作如下修改: global gFlag on idle if gFlag = 0 then set the member of sprite the currentSpriteNum to member "playbutton" end if end
|
 andrewlin
职务:普通成员
等级:1
金币:1.0
发贴:184
注册:2001/7/8 16:42:18
|
#72002/12/19 10:05:30
多谢版主的指点!
|