property sNum
property bevel
property red, green, blue
property strength
property rad
property speed -- how fast light moves
property delay -- how much delay before and after pass
property x -- light coordinates
property spriteHeight, spriteWidth -- dimensions of sprite
on getBehaviorDescription me
return "Creates a static bevel and then constantly changes the light coordinates."
end
-- apply the bevel effect
on beginSprite me
set sNum = the spriteNum of me
set spriteWidth = the width of sprite sNum
set spriteHeight = the height of sprite sNum
set x = -spriteWidth/2-delay
bevel(sprite sNum, [#animMode: #static, #bevel: bevel, #red: red, #green: green, #blue: blue, #strength: strength, #radius: rad, #lightLocY: 0])
end
-- update light location if needed
on setLight me
set x = x + speed
if (x > spriteWidth/2+delay) then set x = -spriteWidth/2-delay
bevel(sprite sNum, [#lightLocX: integer(x)])
end
on enterFrame me
setLight(me)
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA