-- -- Animate a Sprite around a Circle -- Ken Loge - http://diginoodles.com -- property pVal -- use to increment position value property pOrigLoc -- the original location of the sprite property pVel -- sprite velocity property pRadius -- the radius of the circle on beginSprite me -- store original location of sprite pOrigLoc = sprite(me.spriteNum).loc end on getPropertyDescriptionList me list = [:] addProp list, #pRadius, [#comment: "Radius of Circular Movement:", #format: #integer, #default: 180, #range: [#min: 0, #max: 300]] addProp list, #pVel, [#comment: "Velocity:", #format: #integer, #default: 2, #range: [#min: -30, #max: 30]] return list end on exitFrame me -- keep value within 360 degrees pVal = (pVal + pVel) mod 360 -- compute x,y position around a circle a = float((pVal - 90.0) / 360.00) * 6.2832 x = cos(a) * pRadius y = sin(a) * pRadius -- move the sprite sprite(me.spriteNum).loc = point(x + pOrigLoc.locH, y + pOrigLoc.locV) end