Just drop this behaviour on your sprite and get the movement horizontally, vertically or by rotating clockwise or anticlockwise.
-- compiled by Sunil Balan
-- sunilbalan@usa.net
property pControl, spritenum, pRange
on getPropertyDescriptionList
set description = [:]
addProp description, #pControl,[#comment: "Select the movement :", #format:#String,#range:["Rotate","Move horizontally", "Move vertically"], #default:"Move horizontally"]
addProp description, #pRange, [#comment: "Select your speed :", #format:#Integer, #range:[#min:-10,#Max:10],#default:1]
return description
end
on exitframe me
Case (pControl) of
"Rotate":
sprite(me.spritenum).rotation = sprite(me.spritenum).rotation + pRange
"Move horizontally":
sprite(me.spritenum).loch = sprite(me.spritenum).loch + pRange
"Move vertically" :
sprite(me.spritenum).locv = sprite(me.spritenum).locv + pRange
End Case
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA