主题:  错在哪里了?

余贝朋

职务:普通成员
等级:1
金币:0.0
发贴:13
#12001/7/7 8:05:06
这是一个随机上下左右移动的互动行为程序,可是一附给精灵,运行后,精灵变不见了,请问这程序错在那?

property movieWidth,movieHeight
property moveH,moveV
property soundmember
property currSprite

on beginSprite me
movieWidth = the stageRight - the stageLeft
movieHeight = the stageBottom - the stageTop
currSprite = sprite(me.spriteNum)
end

on exitframe me
currSprite.locH = currSprite.locH+random(-moveH,moveH)
currSprite.locV = currSprite.locV+random(-moveV,moveV)
if currSprite.locH > movieWidth then
currSprite.locH = currSprite.locH-movieWidth
end if
if currSprite.locH < 0 then currSprite.locH = currSprite.locH * -1
if currSprite.locV > movieHeight then
currSprite.locV = currSprite.locV-movieHeight
end if
if currSprite.locV < 0 then currSprite.locV = currSprite.locV * -1
end

on mousedown me
currSprite.ink = 2
if not voidP(soundMember) <> VOID then
puppetSound 1,soundMember
end if
end

on mouseup me
currSprite.ink = 36
end




D计划-混沌

职务:管理员
等级:6
金币:15.2
发贴:3528
#22001/7/7 9:48:00
moveH,movev没赋值