Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Message Box Behavior
Append a File
VdigXtra
DirectMedia Xtra 2
Change Filled property of a Shape Sprite
Puzzler II, Slide it!
CSS Class
Macromedia Flash 5 Authorized
DogEar xtra
Lissajous Motion
MediaMacros Xtras Mall
 

 

 

Behavior SpritePulsator

Added on 6/29/1999

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: WarrenOckrassa

Causes a sprite to "pulse" in and out in opacity by settable degrees at selectable rates.

-- By Warren "The Howdy Man" Ockrassa, warren@nightwares.com
-- This causes any given sprite onscreen to "pulsate" in opacity
-- Drag and drop to invoke the GPDL, then set the max and min opacity values (in percent) as well as the step value

on GetBehaviorDescription
  set sContent = "This allows any sprite to pulsate in and out in opacity." & RETURN & RETURN & "Parameters include maximum opacity, minimum opacity, and step value."
  return sContent  
END GetBehaviorDescription

on GetBehaviorTooltip  
  set sContent = "This allows any sprite to pulsate in and out in opacity." & RETURN & RETURN & "Parameters include maximum opacity, minimum opacity, and step value."
  return sContent  
END GetBehaviorTooltip

PROPERTY pnMySprite, pbFading, pnMaximumOpacity, pnMinimumOpacity, pnFadeStep

on BeginSprite me  
  set pnMySprite = the currentSpriteNum
  set the ink of sprite pnMySprite = 32 -- blend  
END BeginSprite

on PrepareFrame me  
  if the blend of sprite pnMySprite >= pnMaximumOpacity then
    set pbFading = TRUE    
  else if the blend of sprite pnMySprite <= pnMinimumOpacity then    
    set pbFading = FALSE  
  end if  
  if pbFading then    
    set the blend of sprite pnMySprite = the blend of sprite pnMySprite - pnFadeStep    
  else    
    set the blend of sprite pnMySprite = the blend of sprite pnMySprite + pnFadeStep    
  end if  
end PrepareFrame

on GetPropertyDescriptionList me  
  if not ( the currentSpriteNum ) then    
    -- behavior has been dropped on the script channel; kickout
    exit    
  end if
  return [ #pnMaximumOpacity: [ #comment: "What is the MAXIMUM opacity you want in percent?", #format:  #integer, #default: 100, #range: [#min: 1, #max: 100] ], #pnMinimumOpacity: [ #comment: "What is the MINIMUM opacity you want in percent?", #format:  #integer, #default: 50, #range: [#min: 0, #max: 100] ], #pnFadeStep: [ #comment: "By what amount do you want the opacity to be stepped each time?", #format:  #integer, #default: 1, #range: [#min: 1, #max: 100] ] ]  
end GetPropertyDescriptionList

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail