on getPropertyDescriptionList me
p_list = [:]
if the currentSpriteNum > 0 and sprite(the currentSpriteNum).member.type = #text then
p_list.addProp(#shadowSprite, [#format : #integer, #comment : "Which sprite to use as the shadow?", #default : (the currentSpriteNum + 1)])
p_list.addProp(#follow, [#format : #symbol, #comment : "What should the shadow follor?", #default : #mouse, #range : [#mouse, #sprite, #nothing]])
p_list.addProp(#rangeOffset, [#format : #float, #comment : "Offset value for the shadow:", #default : 100.0])
p_list.addProp(#followSprite, [#format : #integer, #comment : "If following a sprite, which sprite?", #default : the currentSpriteNum + 2])
end if
return p_list
end
on beginSprite me
if sprite(spriteNum).member.type = #text then
if sprite(shadowSprite).member.type = #empty then
puppetSprite shadowSprite true
end if
sprite(spriteNum).ink = 36
sprite(shadowSprite).ink = 36
sprite(shadowSprite).member = sprite(spriteNum).member
sprite(shadowSprite).forecolor = 255
sprite(shadowSprite).locz = sprite(spriteNum).locZ - 1
end if
end
on endSprite me
puppetSprite shadowSprite false
end
on enterFrame me
if sprite(spriteNum).member.type = #text then
if follow = #mouse then
distance = sprite(spriteNum).loc - point(the mouseH, the mouseV)
sprite(shadowSprite).loc = sprite(spriteNum).loc + (distance / point(rangeOffset, rangeOffset))
else if follow = #sprite then
distance = sprite(spriteNum).loc - sprite(followSprite).loc
sprite(shadowSprite).loc = sprite(spriteNum).loc + (distance / point(rangeOffset, rangeOffset))
end if
end if
end
on getBehaviorDescription me
return "Drop this behavior on a text member and assign an empty sprite or a sprite with a second instance of the same cast member. Choose the " & quote & "light" & quote & " and you are ready to go."
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA