Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Display an objects properties in Director
SarSoft MediaPlayer - All in one video
Closing the browser
Simatrix Menu
Audio Xtra
Image Xport
Set DirectToStage Property of a Flash Sprite
Registry Xtra
RegistryReader
Lingo and Shockwave Sourcebook
MediaMacros Xtras Mall
 

 

 

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

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail