Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
myFile
Play Soundfile
Start Menu(xml)
WebCamXtra - Computer Vision & Camera Tracking
EZIO
Mix-FX Flash animation builder
3d 1st-person shooter
myWindow
Automatic update of folders with FTP - a free example
ProMix Xtra for Authorware and Director
MediaMacros Xtras Mall
 

 

 

Behavior Bevel Drag Light-Alphamania

Added on 6/10/1999

 

Compatibilities:
D6_5 D7 D8 Mac PC Script

This item has not yet been rated

Author: MediaLab (website)

Requires Effector Set 2. These behaviors are for use with the Alphamania Xtra and its add-on effector sets.

property sNum
property mode -- static, follow sprite, follow mouse
property lightSprite -- sprite to use for follow sprite
property bevel
property red, green, blue
property strength
property crop
property radius

on getBehaviorDescription me
  return "Move the light source of the sprite around by clicking on the sprite and dragging."
end

on getPropertyDescriptionList me
  set list = [:]
  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, #crop, [#comment: "Bevel Crop:", #format: #integer, #default: 255, #range: [#max: 255, #min:0]]
  addProp list, #radius, [#comment: "Radius:", #format: #integer, #default: 100, #range: [#max: 1000, #min:0]]
  return list
end

-- apply the bevel effect
on beginSprite me
  set sNum = the spriteNum of me
  set animMode = #relativeToPoint
  bevel(sprite sNum, [#animMode: animMode, #bevel: bevel, #red: red, #green: green, #blue: blue, #strength: strength, #bevCrop: crop, #radius: radius, lightRelToSprite:FALSE ])
end

on mouseDown me
  DragLight(me)
end

on DragLight me
  repeat while the mouseDown
    SetBevel(me)
    updateStage
  end repeat
end

-- update light location if needed
on SetBevel me
  
  set x = the mouseH
  set y = the mouseV
  
  bevel(sprite sNum, [#lightLocX: x, #lightLocY: y])
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail