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
Line Skip-Alphamania
FilmLoop Controller
Gang Buster
castLib.saveAndCompact() from Lingo
QuickTime Installer
Vector Shape - Rounded Rectangle
Back Button
DM XTreme Transitions
Hyper Midi
Rolling a Ball.
 

 

 

Behavior Animate Text Shadow

Added on 1/5/2001

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: HasanKazmi (website)

On mousewith the sprite animates the text by increasing and decreasing shadow. A very simple behaviour..

--786
--Behaviour: Animate Text Shadow
--Hasan Yasar Kazmi
--Hamdard University Islamabad Pakistan
-- On mousewith the sprite animates the text by increasing and decreasing shadow

property spritenum,maxInc,Increment,Initial,RangeMax

on getpropertydescriptionlist me
  set MyShadow =  [:]
  addprop MyShadow,#maxInc,[#comment:"Max Increment in Shadow",#default:1,#format:#integer,#range:[min:1,max:10]]
  addprop MyShadow,#Increment,[#comment:"Step Increment in Shadow",#default:1,#format:#integer,#range:[min:1,max:10]]
  addprop MyShadow,#Initial,[#comment:"Initial Shadow",#default:1,#format:#integer,#range:[min:0,max:10]]
  return MyShadow
end

on beginsprite me
  if Increment > maxInc then
    alert("Increment value cant be greater than the max value")
    exit
  end if
  spritenum = the spritenum of me
  sprite(spritenum).member.dropShadow = Initial
  set RangeMax = maxInc+(maxInc mod Increment)
end

on mousewithin me
  sprite(spritenum).member.dropShadow = sprite(spritenum).member.dropShadow +Increment
  if sprite(spritenum).member.dropShadow = RangeMax  then
    sprite(spritenum).member.dropShadow =0
  end if
  updatestage  
end

on mouseleave me  
  sprite(spritenum).member.dropShadow = Initial  
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail