Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Turn puppeting off for a range of sprite channels
Sound not playing
Progress Bar lingo Script
MIAW communication
Icon Forge
Return the name of the current user
Set ImageEnabled Property of a Flash Member
Enhancer Xtra
cXtraStringGrid
Director 8 Primer
MediaMacros Xtras Mall
 

 

 

Behavior Drag Light-Alphamania

Added on 6/10/1999

 

Compatibilities:
D6_5 D7 D8 Mac PC Script

Required Xtras:
Alphamania
Effector Set II for Alphamania

Rating:

Author: MediaLab (website)

Requires Effector Set 2.

property sNum
property mode -- static, follow sprite, follow mouse
property lightSprite -- which sprite to follow
property transparency
property red, green, blue
property feather
property offsetX, offsetY

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, #transparency, [#comment: "Transparency:", #format: #integer, #default: 200, #range: [#max: 255, #min:0]]
  addProp list, #red, [#comment: "Red:", #format: #integer, #default: 0, #range: [#max: 255, #min:0]]
  addProp list, #green, [#comment: "Green:", #format: #integer, #default: 0, #range: [#max: 255, #min:0]]
  addProp list, #blue, [#comment: "Blue:", #format: #integer, #default: 0, #range: [#max: 255, #min:0]]
  addProp list, #feather, [#comment: "Feather:", #format: #integer, #default: 0, #range: [#max: 4, #min:0]]
  addProp list, #offsetX, [#comment: "Offset X:", #format: #integer, #default: 4]
  addProp list, #offsetY, [#comment: "Offset Y:", #format: #integer, #default: 4]
  return list
end

-- apply the drop shadow effect
on beginSprite me
  set sNum = the spriteNum of me
  set animMode = #relativeToPoint
  dropShadow(sprite sNum, [#animMode: animMode, #transparency: transparency, #red: red, #green: green, #blue: blue, #feather: feather, #xOffSet: offsetX, #yOffSet: offsetY])
end

on mouseDown me
  DragLight(me)
end

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

-- new light settings if needed
on setShadow me
  set x = the mouseH
  set y = the mouseV
  dropShadow(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