Librarirs 库
cast 演员
stage 舞台
pause 函数
Script- 脚本
Score 分镜面板
Insert Keyframe 插入关键帧
appminimize 最小化
tempo channel 速率通道
palette 调色板
transition 过度
ActiveWindow 当一个 窗口开始运行时触发
closewindow 关闭一个窗口时触发
deaactivatewindow 当一个窗口停止时触发
enterframe 进如一帧()时触发
exitframe 离开一帧()时触发
idle 影片在停止状态时触发
movewindow当移动窗口时触发
openwindow打开一个新窗口时触发
startmovie 影片开始时触发
stopmovie 停止影片是触发
、
左键前进右键后退
on exitFrame me
go to the frame
end
on mouseup me
go the frame+1
end
on rightmouseup me
go previous
end
global_color,_text
on startmovie
_text="the color is:"
_color=rgb(0,0,0)
member("textbar").alignment=#center
member("textbar")text=_text
end
通道互换行为
on mouseup me
if the visible of sprite 6=true then
set the visible of sprite 6 to false
else
set the visible of sprite 6 to true
end if
end
拖动跟随
property ptuodong
on beginSprite me
ptuodong = FALSE
end
on mouseDown me
ptuodong = TRUE
end
on mouseUp me
ptuodong = FALSE
end
on mouseUpOutside me
ptuodong = FALSE
end
on exitFrame me
if ptuodong then
moveAmount = the mouseLoc - sprite(me.spriteNum).loc
sprite(me.spriteNum).loc = sprite(me.spriteNum).loc + moveAmount
sendSprite(sprite 2,#move,moveAmount)
end if
end
字幕向上滚动
on getbehaviortooltip
t="实现域行文本的自动上翻效果"
t=t&return&"用于滚动文本精灵"
return t
end
on getBehaviorDescription
return "用于实现文本上翻效果:"&return&" 其用法是,将此行为拖到精灵上面,然后选择一个域文本精灵,\
"&return&" 功能:文本循环自动滚动,鼠标移动到精灵上面是停止滚动,移开后自动\
滚动。可以设定每个帧循环移动的象素!"&return&"未来风 "
end getBehaviorDescriptionionList
property pspeed
property pSprite
property ID
on getPropertyDescriptionList
vPDList = [:]
setaProp vPDList, #pSprite, [#comment: "确定所要应用的角色名:",\
#format: #integer, #default:the currentspritenum]
setaProp vPDList, #pspeed, [#comment: "设定每个帧循环移动的象素:", #format: #integer, #range:[#max:20,#min:1],#default:1]
return vPDList
end getPropertyDescriptionList
on beginsprite me
sprite(pSprite).member.scrolltop=-sprite(pSprite).member.pageheight
sprite(pSprite).member.boxtype=#fixed
ID=1
end
on mouseEnter me
ID=0
end
on mouseleave me
ID=1
end
on exitframe me
if ID=1 then
sprite(pSprite).member.scrolltop=sprite(pSprite).member.scrolltop + pspeed
if sprite(pSprite).member.scrolltop>sprite(pSprite).member.lineheight * sprite(pSprite).member.lin
ecount then
sprite(pSprite).member.scrolltop=-sprite(pSprite).member.pageheight
end if
end if
end
图像变换
on startmovie
qulist=sprite(1).quad
qulist[1]=qulist[1]+point(50,-10) (位置)
qulist[2]=qulist[2]-point(50,10) (位置)
sprite(1).quad=qulist
updatestage
put sprite(1).quad
end
暂停——弹出对话框
on mouseup
if sprite(1).playing then if not sprite(1).playing then
sprite(1).stop()
else
alert("内容")
end if
end
图像跟随鼠标动
on exitFrame
mloc=the mouseLoc
sloc=sprite(1).loc
if mloc.locH>sloc.locH then
sprite(1).flipH=true
else
sprite(1).flipH=false
end if
if mloc.locV>sloc.locV then
sprite(1).flipV=true
else
sprite(1).flipV=false
end if
end
鼠标触发图像旋转
on mousewithin me
sprite(me.spritenum).rotation=sprite(me.spritenum).rotation+15
end
改变光标
on mouseenter me
Cursor ([member "光标名称", member "光标名称"])
end
global x 全局变量设为x
set x=integer(the text of field)
on mouseUp me
if x<7 then
x=x+1
put x
数字变化+1
global x
on mouseup me
set x=integer(the text of field"文本名称")
ifx<9 then
x=x+1
set the text of field "文本名称"to string(x)
else
x=0
set the text of field "文本名称"to string(x)
else
end if
end
尝试 数字下降
-----------------
global x
on mouseUp me
set x=integer(the text of field"文本名称")
if x>0 then
x=x-1
set the text of field "文本名称"to string(x)
else
x=9
set the text of field "文本名称"to string(x)
else
end if
end
-----------------
左键前进右键后退
on exitFrame me
go to the frame
end
on mouseup me
go the frame+1
end
on rightmouseup me
go previous
end
停止命令
on exitFrame me
go to the frame
end
音频控制命令
1、音频开始控制
on mouseUp me
pwppetsoumd 1,member("w1")
end
2、音频关闭控制
on mouseUp me
pwppetsoumd 1.0
end
3、针截控制效果
下一步
on mouseup me
go the frame+1
end
上一步
on mouseup me
go the frame-1(减去舞台的相应针数)
end
推出
on mouseup me
halt
--------------
一、选择题制作
0、变量(第1帧命令)
global tj
on exitFrame me
tj=(-分值)
end
1、错误选项加声音(答案命令)
on mouseup me
puppetsound 1(通道),member("w2声音")
go to the frame+1
end
2、正确选项加声音(答案命令)
global tj
on mouseup me
tj=tj+50(分值)
puppetsound 1(通道),member("w1声音")
go to the frame+1
end
3、得分(得分界面第一帧)
global tj
on exitFrame me
member(20文本序号).text=string(tj)
end
4、重做
变量
(第N帧命令)
global tj
on exitFrame me
tj=0
end
-----------------