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
Break Out Clone
Case sensitive string comparison
Echo Vibes
Elliptical Sprite Behavior
Dean's Director Resources
File Open Dialog Behavior
UltimateMUI
bkMixer
E-mailExec 2.0
Arca Database Xtra
 

 

 

Behavior Setup Anim

Added on 6/10/1999

 

Compatibilities:
D6_5 D7 D8 Mac PC Script

Required Xtras:
Alphamania
Effector Set I for Alphamania

Rating:

Author: MediaLab (website)

Requires Effector Set 1 Behavior Support Scripts

Property pFrames,pStart,pEnd,pInterp,pIn,pOut,pLoop

on getPropertyDescriptionList
   if not alphamaniacCheck(the currentSpriteNum) then exit
  
set pList=[:]
  addProp pList,#pStart,[format:#integer,comment:"Start %:",¬
                          Default:100,range:[min:0,max:300]]
  
  addProp pList,#pEnd,[format:#integer,comment:"End %:",¬
                          Default:100,range:[min:0,max:300]]
  
  addProp pList,#pFrames,[format:#integer,comment:"Frames:",Default:15]
  
  addProp pList,#pIn,[format:#integer,comment:"Ease In %:",¬
                      Default:10,range:[min:0,max:100]]
  
  addProp pList,#pOut,[format:#integer,comment:"Ease Out %:",¬
                       Default:10,range:[min:0,max:100]]
  
  addProp pList,#pLoop,[format:#boolean,comment:"Pendulum:",Default:false]
  
  addProp pList,#pInterp,[format:#symbol,comment:"Interpolation:",¬
                          Default:#On,range:[#Off,#On,#Paused]]
  
  return pList
end

on beginSprite me
  set pInterp=interpolation(pInterp)
  
  -- Convert Ease In & Out to frames
  set pIn=(pIn*pFrames) / 100
  set pOut=(pOut*pFrames) / 100
  reset(me)
  
end

on trigger me,reverseFlag
  set s = the spriteNum of me
  if not alphaManiac(s) then exit
  
  if pLoop then
    scale(sprite s,[animMode:#Pendulum,percentage:pStart,¬
                     scalePercentage:pEnd,numFrames:pFrames,EaseIn:pIn,EaseOut:pOut])
  else
    if reverseFlag then
      scale(sprite s,[animMode:#Range,percentage:pStart,¬
                     scalePercentage:pEnd,numFrames:pFrames,EaseIn:pIn,EaseOut:pOut])
    else
      scale(sprite s,[animMode:#Range,percentage:pEnd,¬
                     scalePercentage:pStart,numFrames:pFrames,EaseIn:pIn,EaseOut:pOut])
    end if
  end if
end

on reset me
  set s=the spriteNum of me
  if not alphaManiac(s) then exit
  
  scale(sprite s,[animMode:#Static,percentage:pStart,interpolation:pInterp])
end

 


Contact

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

Send e-mail