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
Slide show
NTI CD Maker
Write a file
Format Image
binary search
Golden Gate
Yes/No Alert
Command Line Arguments, 3 State Buttons, and Limited Fields
Moka Xtra
Move MIAW
 

 

 

Behavior Fade

Added on 1/28/2000

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: MarkDaggett

This will fade a sprite in and out. You don"t really need it I guess because there is one kind of like this in the behavior library in the internal director behavior toolbar. Oh well here it is anyway.

-- Written by Mark Daggett 1999 (mark@flavoredthunder.com)
-- Copyright 1999 Flavored Thunder Media. All rights reserved.
-- For more free code go to: Http://www.flavoredthunder.com
-- Use it till it is obsolete :)

property pTheSprite
property pStartVal
property pOffstage
property pSpeed
property pSwitch
on beginSprite me
  set pSwitch = FALSE
  set pSpeed=6
  set pOffStage = -999
  set pTheSprite = the currentSpriteNum
  set the ink of sprite the currentSpriteNum to 32
  set pStartVal = 100
end

on exitFrame me
  if pSwitch = TRUE then
    if pStartVal <1 then
      set the locH of sprite pTheSprite = pOffstage
      set the blend of sprite pTheSprite = 100
      set the ink of sprite the currentSpriteNum to 37
      set pSwitch = FALSE
      reset
      --fade is done
      return
    else
      sendAllSprites(#updateFade)
      set the blend of sprite pTheSprite = pStartVal
      set pStartVal = pStartVal-pSpeed*3
      updateStage
    end if
  else
  end if
  
end
on reset me
  set pSwitch = FALSE
  set pSpeed=6
  set pOffStage = -999
  set pTheSprite = the currentSpriteNum
  set the ink of sprite the currentSpriteNum to 32
  set pStartVal = 100
end

on turnOn me
  set pSwitch = TRUE
end

 


Contact

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

Send e-mail