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
Planet Orbiter
Scroll Sprite by MouseLoc Behavior
Set PlayBackMode of a Flash Member
Install-us Pro
007 Fonts
free MD5 hashing Xtra
Progress Bar lingo Script
Making Multiple Animated Buttons
Title Bar MIAW
Move MIAW
 

 

 

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

 


Contact

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

Send e-mail