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
cXtraShapeWindow
Sound slider
Graphic Puzzle Dragger
TaskXtra
Hold for X seconds if no input is given
Hilite Line
Wait for DigitalVideo End
MPEG Video
Clock Hands Behavior
Lingo MarkUp Service
 

 

 

Behavior Animate Vector FillCycles

Added on 11/20/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

Rating:

Author: HasanKazmi (website)

Attach With Any Vector Member(s)to on Enter and exit frame, the length of the vector sprite can be set to one frame. To change the Back and Fill color Just edit the vector color properties

Download PC Source    Download Mac Source
--Behaviour: Animate Vector FillCycles
--By Hasan Yasar Kazmi
Hamdard University Islamabad
dir@37.com
--11/Nov/2000.
--Instructions
--Its a simple Behaviour,..Attach With Any Vector Member(s) To animate By changing Number/Direction/Angle of fill cycles
on Enter and exit frame, the length of the vector sprite can be set to one frame.Its use ful for back ground and other
effects A sample movie(d8) can be downloaded from http://hasan68.nav.to  
Enjoy!!
--To change the Back and Fill color Just edit the vector color properties
---=============================================
--Code:

property spread, angle,GradType, SpriteNum, memref

on getPropertyDescriptionList
  set Animprop = [:]
  addProp Animprop, #Spread, [#default: 100,#format:#float,  #comment:"Set the Amount of Spread:",
#range: [#min:-10, #max:500]]
  addProp Animprop, #angle,  [#default:30,#format: #float, #comment:"Angle of Fill:"]
  addprop Animprop,#Gradtype,[#default:"Linear",#format:#string, #comment:"Select Gradient Type :",
#range:["Linear","Radial"]]  
  
  return Animprop
end

on beginsprite me
  spritenum = the spritenum of me
  memref = sprite(the spritenum of me).membernum
  member(memref).fillScale = value(spread)
  member(memref).fillMode = #gradient
  member(memref).fillDirection =value(angle)
  case Gradtype of
    "Linear":member(memref).gradientType=#linear
    "Radial":member(memref).gradientType=#Radial
  end case
end beginsprite me

on exitFrame me
  cycl = member(memref).fillCycles
  member(memref).fillCycles =cycl + 1
  updatestage
end exitFrame me

on enterframe me
  cycl = member(memref).fillCycles
  if cycl >= 7  then
    member(memref).fillCycles =0
    cycl = 0
    updatestage
  end if
end enterframe me

on getBehaviorDescription
  return "Vector Shape Behaviour.. Animates a vector shape by cycling the fillcycles property"&
  RETURN&"By: Hasan Yasar Kazmi"&
  RETURN&"dir@37.com"          
end

 


Contact

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

Send e-mail