This behavior gives any bitmap sprite a shadow with 2 options distance and the opacity NOTE:This behavior must be place on a sprite that is preceeded by an empty sprite to place the shadow in it
property mysprite
property i
property opacity
property distanceh
property distancev
on beginsprite me
mysprite=sprite(me.spritenum)
i=sprite(me.spritenum-1)
end
on prepareframe me
set i.forecolor=255
set i.backcolor=255
set i.loch =mysprite.loch+distanceh
set i.locv=mysprite.locv-distancev
set i.blend=opacity
set i.member=the member of mysprite
end
on getPropertyDescriptionList me
set props= [:]
props.addProp(#opacity, [#format: #integer, #default: 50, #comment: "opacity of the shadow"])
on getBehaviorDescription me
return "This is a simple behavior for making a shadow for the sprite it should be psd and doesnot require alpha channels."
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA