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
Set Reveal Method-Alphamania
Amara Flash Photo Slideshow software
Simple projectile with gravity
Testing CPU speed
Setup Anim
Drag & Drop
DMFade
Calculating the day of the date
Toggle DirectToStage Property of a Flash Member
AutoCropper v1.2
 

 

 

Behavior Face Sprite-Alphamania

Added on 6/10/1999

 

Compatibilities:
D6_5 D7 D8 Mac PC Script

Required Xtras:
Alphamania
Effector Set I for Alphamania

This item has not yet been rated

Author: MediaLab (website)

Requires Effector Set 1 Behavior Support Scripts

property pOffset,pTarget

on getPropertyDescriptionList
  if not alphamaniacCheck(the currentSpriteNum) then exit
  
  set pList=[:]
  addProp pList,#pTarget,[format:#integer,comment:"Face Sprite #:", Default:0]
  addProp pList,#pOffset,[format:#integer,comment:"Offset Angle:",
                         Default:0,range:[min:0,max:360]]
  return pList
end

on beginSprite me
  set s=the spriteNum of me
  if not alphaManiac(s) then exit
  
  face(me)  
end

on exitFrame me
  set s=the spriteNum of me
  if not alphaManiac(s) then exit
  
  face(me, pTarget)
end

on face me,targetSprite
  set s=the spriteNum of me
  if not alphaManiac(s) then exit
  
  if integerP(targetSprite) then set pTarget=targetSprite
  set targPoint=point(the locH of sprite pTarget,the locV of sprite pTarget)
  rotate(sprite s,[animMode:#RelativeToPoint,relativeTo:targPoint,offsetAngle:pOffset])
end

on getBehaviorDescription me
  set msg= "This cool tool makes your AlphaManiac point to a specified sprite. "
  put return & return after msg
  put "Parameters:" & return & "-----------" & return  after msg
  put "*  Face Sprite#: Give it a sprite number to point to" & return after msg
  put "*          Offset : Use this to tweak the direction it points" after msg
  put return & "-----------" & return & return  & ">>>" && amTip()  after msg
  return msg
end

 


Contact

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

Send e-mail