Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Parse CSV File
Saving Global Variables to a File
Set Registration Point of Sprite
createSpecList
Check For Qt Version
Xtra Safe
Windows for Shockwave 4.5
Dervich Pivot Xtra
BorderPatch
VList Xtra
MediaMacros Xtras Mall
 

 

 

Behavior Blend given sprite from 0 to given value

Added on 6/20/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: KumarK

Blend given sprite from 0 to given value

---- written for Director 8 ---
---- Kumar.K ----
---- kumark@icode.com ----
------ Custom Properties ------

Property whereTo,spriteToBlend, Endblend

------ Get Behavior Description List ------
on getPropertyDescriptionList me
  set description = [:]
  if the currentspritenum = 0 then exit  
  addProp description, #spriteToBlend, [#comment: "Choose the Sprite to Blend:",#format:#Integer,#range:[#min:1,#max:the lastchannel],#default:the currentspritenum]    
  addProp description, #Endblend, [#comment: "Choose the BlendLevel :",#format:#Integer,#range:[#min:1,#max:100],#default:100]  
  addProp description, #WhereTo, [#comment: "Where To Attach ?" ,#format:#String,
    #range:["On MouseUp","On MouseDown","On MouseEnter","On MouseLeave"],#default:"On MouseUp"]    
  return description
end getPropertyDescriptionList
------ Get Behavior Description List ------

-- Get Behavior description --
on getBehaviorDescription me
  return
    "Blend given sprite from 0 to given value" & RETURN & RETURN &
    "This Behavior Blends the given sprite from 0 to the given value" & RETURN & RETURN &
  "PARAMETERS:" & RETURN &
    "* Sprite Number" & RETURN &
    "* Blend Level."
end getBehaviorDescription
-- Get Behavior description --

------ Availbale for only Sprite Script ------
on isOKToAttach (me, aSpriteType, aSpriteNum)
  case aSpriteType of
    #graphic:
      return true
    #script:
      return false
  end case
end isOKToAttach
------ Availbale for only Sprite Script ------

-- Events --
on MouseUp
  if WhereTo = "On MouseUp" then
    blendsprite
  end if
end MouseUp

on MouseDown
  if WhereTo = "On MouseDown" then
    blendsprite
  end if
end MouseDown

on MouseEnter
  if WhereTo = "On MouseEnter" then
    blendsprite
  end if
end MouseEnter

on MouseLeave
  if WhereTo = "On MouseLeave" then
    blendsprite
  end if
end MouseLeave
------ Events ------

--- Custom Handler to Blend the spriite
on blendsprite
  set the ink of sprite spriteToBlend = 32
  repeat with i = 0 to endblend
    set the blend of sprite spriteToBlend = i
    updatestage
  end repeat
end if
end
--- Custom Handler to Blend the spriite

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail