你可以试一试。
on beginsprite me
mySprite=sprite(me.spritenum)
pnewRect1=mySprite.member.rect
pWidth=pnewRect1.width
-- blankimage=image(mySprite.pnewRect.width,mySprite.pnewRect.height,8)
-- mySprite.member.image=blankimage
ptick=the milliseconds
end
on prepareframe me
if the rollover=me.spritenum then exit
if the milliseconds-ptick
if pnewRect1.left>=pSourceMember.width/2 then
pnewRect1=mySprite.member.rect
temp=pWidth-pnewRect1.width
end if
pnewRect1=pnewRect1.offset(pOffset,0)
--mySprite.member.image=blankimage
mySprite.member.image.copypixels(pSourceMember.image,mysprite.member.rect,pnewRect1)
ptick=the milliseconds
end
on getPropertyDescriptionList me
if not the currentSpriteNum then exit
return \
[ \
#pSourceMember: \
[ \
#comment: "Source member for offset", \
#format: #member, \
#default: "" \
],\
#pInterval: \
[ \
#comment: "Interval time (milliseconds)", \
#format: #integer, \
#default: 100 \
],\
#pOffset: \
[ \
#comment: "offset per interval", \
#format: #integer, \
#default: 1 \
]\
]
end getPropertyDescriptionList