Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Merge sort and Binary Search using Lingo
Color Picker MIAWs
Font Style Change
cXtraTransitions2
cXtraPrinterDoc
myExcel
Imaging Lingo - Hyporoid Illusion
Text Outliner
CD Door Close, Open - MCI
Limited Text Behavior
MediaMacros Xtras Mall
 

 

 

Behavior Blend Sprite

Added on 6/20/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: ChristianKrauter

Attached to a sprite this behaviour will blend the sprite in one frame.

-- copyright Christian Krauter
-- Free to use for MediaMacros readers
-- feel free to send me an email christian@simplicityhq.com

property pTicks
property pCurrentBlend
property pBlendValue

on getPropertyDescriptionList me
  list = [:]
  addProp list, #pTicks, [#comment: "Number of ticks/frames to fade", #format: #integer, #range: [min: 5, max: 50], default: 5]
  addProp list, #pBlendValue, [#comment: "Set visible of sprite", #format: #integer, #range: [min: 0, max: 100], default: 10]
  return list
end

-- sets the sprite to your pBlendvalue
on beginSprite me
  set pCurrentBlend = pBlendValue
  sprite(me.spriteNum).blend = pCurrentBlend
end

on prepareFrame me
  if pCurrentBlend <> 100 then
    set blendIncrease = integer(100/pTicks)
    set pCurrentBlend = pCurrentBlend + blendIncrease
    if pCurrentBlend > 100 then set pCurrentBlend = 100
    sprite(me.spriteNum).blend = pCurrentBlend
  end if
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