on beginsprite me
set Speedincrement = Speed
set stageWidth = the stagebottom- the stagetop
set stageMiddle = stageWidth/2
set the constraint of sprite(me.spriteNum)=(me.constrainstsprite)
end beginsprite
on enterframe me
if the mouseV < stageMiddle then
set amountToMove= (stageMiddle + the mouseV)/Speedincrement
set the loch of sprite(me.spriteNum) = the loch of sprite (me.spriteNum) + amountToMove
end if
if the mouseV > stageMiddle then
set amountToMove= (stageMiddle - the mouseV)/Speedincrement
set the loch of sprite(me.spriteNum)= the loch of sprite(me.spriteNum) + amountToMove
end if
end enterframe me
on getPropertyDescriptionList
set p_list = [¬
#Speed : [#comment:"Speed in pixels", #format: #float, #range: [#min: 3, #max: 20], #default:"11"], ¬
#constrainstsprite: [#comment:"constrainer Spritenumber", #format: #integer, #default: "15"]]
return p_list
end getPropertyDescriptionList
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA