Requires Effector Set 2. These behaviors are for use with the Alphamania Xtra and its add-on effector sets.
property sNum
property bevel
property red, green, blue
property strength
property crop
property rad
property speed -- how fast light moves
property x, y -- light coordinates
property dx, dy -- movement in x and y directions
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 = 0
set y = 0
set dx = -1
set dy = -1
bevel(sprite sNum, [#animMode: #static, #bevel: bevel, #red: red, #green: green, #blue: blue, #strength: strength, #radius: rad])
end
-- update light location if needed
on setLight me
set x = x + dx*speed
set y = y + dy*speed
if (x > spriteWidth/2) then set dx = -dx
if (x < -spriteWidth/2) then set dx = -dx
if (y > spriteHeight/2) then set dy = -dy
if (y < -spriteHeight/2) then set dy = -dy
bevel(sprite sNum, [#lightLocX: integer(x), #lightLocY: integer(y)])
end
on enterFrame me
setLight(me)
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA