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
display TreeView
Director 8.5 Studio
Check For Asset
ECD
Campaign FOR current and future Macromedia Director users
Flashation Flash Menu Builder
Soundoftheweb Network
Constrain Mouse to Stage Area
Multiple-timer facility
DirectCommunication
 

 

 

Behavior FADER

Added on 7/19/2004

 

Compatibilities:
D6_5 Mac PC Shockwave

Rating:

Author: Diego (website)

Create a blend effect on rollover.

-- FADER
-- (c) 2004 Diego Mangoni
-- http://dmzone.it
-- dmzone@dmzone.it


property mySelf,blend_start, blend_end, blend_speed

on beginSprite me
  --
  if blend_end < blend_start then
    blend_speed = blend_speed *(-1)
  end if
  --
  theGap = abs(blend_end) - abs(blend_start)
  theGap = abs(theGap)
  theMod = theGap mod blend_speed
  repeat while theMod <> 0
    blend_speed = blend_speed -1
    theMod = theGap mod blend_speed
  end repeat
  mySelf = sprite(me.spriteNum)
  mySelf.blend = blend_start
end

on exitFrame me
  if the rollover = me.spriteNum then
    if mySelf.blend <> blend_end then
      mySelf.blend = mySelf.blend +blend_speed
    end if
  else
    if mySelf.blend <> blend_start then
      mySelf.blend = mySelf.blend -blend_speed
    end if
  end if
  
on getPropertyDescriptionList me
  
  props=[:]
  
  props[#blend_start]= [
  #comment: " Initial blend value",
  #format:  #integer,
  #range: [#min:0,#max:100],
  #default:  0]
  
  props[#blend_end]= [
  #comment: "Final blend value",
  #format:  #integer,
  #range: [#min:0,#max:100],
  #default:  100]
  
  props[#blend_speed]= [
  #comment: "Speed",
  #format:  #integer,
  #range: [#min:0,#max:25],
  #default:  10]
  
  return props
  
end getPropertyDescriptionList    


on getBehaviorDescription
  return "FADER" & RETURN &
    "(c) 2004 Diego Mangoni" & RETURN &
    "http://dmzone.it" & RETURN & RETURN &
    "Use this behavior to create a fade animation effect." & RETURN &
    "Parameters:" & RETURN &
    "* Initial blend value" & RETURN &
    "* Final blend value" & RETURN &
    "* Speed"
end getBehaviorDescription

 


Contact

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

Send e-mail