|
|
|
moving buttons
Added on 4/27/2004
|
|
Compatibilities:
|
This item has not yet been rated
|
shifts the sprite to some distance
property mydistance
property mysprite
property f
property tsteps
property icastnum
property myloch
on beginsprite me
mysprite=sprite(me.spritenum)
icastnum=the castnum of mysprite +1
myloch=mysprite.loch
end beginsprite me
on mousewithin me
put 1 into f
end
on mouseleave me
put(0) into f
end
on exitframe me
if f=1 then
if the loch of mysprite set the loch of mysprite to the loch of mysprite+5
set the castnum of mysprite to icastnum
end if
end if
if f=0 then
if the loch of mysprite>myloch then
set the loch of mysprite to the loch of mysprite-5
set the castnum of mysprite to icastnum-1
end if
end if
end
on getPropertyDescriptionList
description = [:]
addProp description,#tstep, [#default:5, #format:#integer, #comment:"speed"]
addProp description,#mydistace, [#default:60, #format:#integer, #comment:"distance coverred"]
return description
end
|
|