Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Vim Scripts for Lingo
Behavior Writer
Making Stage fill screen or not
Drag Light-Alphamania
Rotate Image Algorithm - Imaging Lingo
QuickTime Installer
display TreeView
Cyclic appearing and disappearing of sprite.
ISOinteractive (Isometric Collision Path Editor) in BETA!
Blend given sprite from 0 to given value
MediaMacros Xtras Mall
 

 

 

Behavior Pulser

Added on 6/10/1999

 

Compatibilities:
behavior D6_5 Mac PC

This item has not yet been rated

Author: DevinAgnew

Use this simple behavior to have a sprite pulse from big to small and back again

property MaxSize, MinSize, StepSize, Grow, X global MaxSmall, MaxLarge, DefaultWidth, DefaultHeight

on beginSprite me
Set X = the Spritenum of me
PuppetSprite X, TRUE
set the stretch of sprite X = TRUE
set DefaultWidth = the width of sprite X
set DefaultHeight = the height of sprite X
set MaxSmall = the width of sprite X * (MinSize / 100.0)
set MaxLarge = the width of sprite X * (MaxSize / 100.0)
end

on EnterFrame me
if Grow then
Set the Width of Sprite X = the Width of Sprite X + (the Width of Sprite X * (StepSize/100.0))
Set the Height of Sprite X = the Height of Sprite X + (the Height of Sprite X * (StepSize/100.0))
else Set the Width of Sprite X = the Width of Sprite X - (the Width of Sprite X * (StepSize/100.0))
Set the Height of Sprite X = the Height of Sprite X - (the Height of Sprite X * (StepSize/100.0))
end if
if the width of Sprite X = DefaultWidth then
set the height of sprite X = DefaultHeight
else if the Height of sprite X = DefaultHeight then
set the Width of sprite X = DefaultWidth
end if
if the Width of Sprite X >= MaxLarge then
set Grow = FALSE
else if the Width of Sprite X <= MaxSmall then
set Grow = TRUE
end if
end

on getPropertyDescriptionList
set p_list =[ #MaxSize: [#comment:"Percent to GROW to:", #format:#integer, #default: 200, #range:[#min:1,#max:1000] ],#MinSize: [#comment:"Percent to SHRINK to:", #format:#integer, #default: 50, #range:[#min:1,#max:1000] ],#StepSize:[#comment:"Percent to step through:",#format:#integer, #default: 10, #range:[#min:1,#max:1000] ],#Grow: [#comment:"Should it Grow First?:", #format:#boolean, #default: FALSE ]]
return p_list
end

on getBehaviorDescription
return "Use this simple behavior to have a sprite pulse from big to small and back again."
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