Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Clip Copier
Download Net Thing
cXtraShapeWindow
GetInfoFromAIFF
Toggle ImageEnabled Property of a Flash Sprite
Checking for an internet connection
VarLord
Change Line Direction of a Shape Cast Member
Installed Fonts
Brain Killer (Simon)
 

 

 

Behavior Giving a shadow for a sprite

Added on 5/2/2004

 

Compatibilities:
DE

This item has not yet been rated

Author: spiderman3388

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"])
  
  props.addProp(#distancev, [#format: #integer, #default: 2, #comment: "distance vertically"])
  
  props.addProp(#distanceh, [#format: #integer, #default: 2, #comment: "distance horizontaly"])
  return props
end

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

Send e-mail