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
Sprite Works
Outline Text - Imaging Lingo
blending on casts
W3D Texture Extractor
Add a unique property to a property list
Check PM Group
f3SoundFX
PrintF in Lingo
Media Player
Space C
 

 

 

Behavior Cool Control Button

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 up graphic, a rollover graphic and a mouseDown graphic. And Sounds

property  standardImage, OverImage, DownImage, nextCM, OverSound, DownSound, OverSoundChannel, DownSoundChannel
property  OSoundON, DSoundON, DownON, OverON

on mouseEnter me
  if OverON then    
    set the member of sprite the spritenum of me = the OverImage of me  
  end if
  if OSoundON then
    puppetSound OverSoundChannel, OverSound
  end if  
end  

on mouseLeave me
  set the member of sprite the spritenum of me = the standardImage of me
end

on mouseDown me
  if DownON then    
    set the member of sprite the spritenum of me = the DownImage of me  
  end if
  if DSoundON then    
    puppetSound DownSoundChannel, DownSound
  end if  
end

on mouseUp me
  if OverON then      
    set the member of sprite the spritenum of me = the OverImage of me
  else
    set the member of sprite the spritenum of me = the standardImage of me
  end if  
end



on beginSprite me
  
  set the standardImage of me = the member of sprite the spriteNum of me    
  
end

on getPropertyDescriptionList
  
  if the currentspritenum = 0 then
    set memdefault = 0
  else
    set memref     = the member of sprite the currentspritenum
    set castlibnum = the castlibnum of memref
    set memdefault = member (the membernum of member memref + 1) of castlib castlibnum
  end if
  
  set p_list =[  #OverON: [#comment:"Rollover ON:",#format: #boolean, #default:  FALSE ], ¬
                             #OverImage:[#comment:"Rollover Cast Member:",  #format:#graphic, #default: memdefault ], ¬
                             #OSoundON: [#comment:"Rollover Sound ON:",#format: #boolean, #default:  FALSE ], ¬
                             #OverSound:[#comment:"Rollover Sound:",        #format:#sound,   #default:"" ], ¬
                             #OverSoundChannel:[#comment:"Channel Number:",   #format:#integer, #default: 1 ], ¬
                             #DownON: [#comment:"MouseDown ON:",#format: #boolean, #default:  FALSE ], ¬
                             #DownImage:[#comment:"MouseDown Cast Member:", #format:#graphic, #default: memdefault ], ¬
                             #DSoundON: [#comment:"MouseDown Sound ON:",#format: #boolean, #default:  FALSE ], ¬
                             #DownSound:[#comment:"MouseDown Sound:",            #format:#sound,   #default:"" ], ¬
                             #DownSoundChannel:[#comment:"Channel Number:",   #format:#integer, #default: 1 ]]
  return p_list
  
end

on getBehaviorDescription
  return ¬
            "Use this simple behavior to have a up graphic, a rollover graphic and a mouseDown graphic.  And Sounds"
end  

 


Contact

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

Send e-mail