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
--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:
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