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
Stop Projector After Eject CD
Hybrid CD
MP3 Cross Fader
Hyper Midi
Install Maker
Standard 3 state button
Update QT3 movies
A shooting game
Inside Macromedia Director 6 with Lingo with CDROM
password field
 

 

 

Behavior Moving Bevel Light-Alphamania

Added on 6/10/1999

 

Compatibilities:
D6_5 D7 D8 Mac PC Script

Required Xtras:
Alphamania
Effector Set II for Alphamania

This item has not yet been rated

Author: MediaLab (website)

Requires Effector Set 2

property sNum
property bevel
property red, green, blue
property strength
property rad
property speed -- how fast light moves
property delay -- how much delay before and after pass
property x -- light coordinates
property spriteHeight, spriteWidth -- dimensions of sprite

on getBehaviorDescription me
  return "Creates a static bevel and then constantly changes the light coordinates."
end

on getPropertyDescriptionList me
  set list = [:]
  addProp list, #speed, [#comment: "Speed:", #format: #integer, #default: 5, #range: [#max: 25, #min:0]]
  addProp list, #delay, [#comment: "Delay:", #format: #integer, #default: 250, #range: [#max: 10000, #min:100]]
  addProp list, #bevel, [#comment: "Bevel:", #format: #integer, #default: 5, #range: [#max: 25, #min:0]]
  addProp list, #red, [#comment: "Red:", #format: #integer, #default: 255, #range: [#max: 255, #min:0]]
  addProp list, #green, [#comment: "Green:", #format: #integer, #default: 255, #range: [#max: 255, #min:0]]
  addProp list, #blue, [#comment: "Blue:", #format: #integer, #default: 255, #range: [#max: 255, #min:0]]
  addProp list, #strength, [#comment: "Strength:", #format: #integer, #default: 0, #range: [#max: 255, #min:0]]
   addProp list, #rad, [#comment: "Radius:", #format: #integer, #default: 100, #range: [#max: 255, #min:0]]
  return list
end

-- apply the bevel effect
on beginSprite me
  set sNum = the spriteNum of me
  set spriteWidth = the width of sprite sNum
  set spriteHeight = the height of sprite sNum
  set x = -spriteWidth/2-delay
  bevel(sprite sNum, [#animMode: #static, #bevel: bevel, #red: red, #green: green, #blue: blue, #strength: strength, #radius: rad, #lightLocY: 0])
end

-- update light location if needed
on setLight me
  set x = x + speed
  if (x > spriteWidth/2+delay) then set x = -spriteWidth/2-delay
  
  bevel(sprite sNum, [#lightLocX: integer(x)])
end

on enterFrame me
  setLight(me)
end

 


Contact

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

Send e-mail