Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
MP3 player and project source code
blending on casts
Moving MIAWs with lingo
Exit Windows
Deleting a range of frames
Slider bar-Alphamania
Scroll Wheel Lock Behavior
Ripple image when clicked using Imaging Lingo
Bitbull
CatFade
MediaMacros Xtras Mall
 

 

 

Behavior The Button II

Added on 6/10/1999

 

Compatibilities:
behavior D6_5 Mac PC

This item has not yet been rated

Author: DevinAgnew

This is a very useful Behavior with many features. Just make sure the feature you want to use is toggled on (has a checkmark in the box) in the behavior Parameters

property  standardImage, OverImage, DownImage, nextCM, OverSound, DownSound, OverSoundChannel, DownSoundChannel
property  DownLingoCode, UpLingoCode, OverLingoCode, Spacer
property  OSoundON, DSoundON, DownON, OverON, DownLingoON, UpLingoON, OverLingoON

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
  if OverLingoON then
    do OverLingoCode
  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
  if DownLingoON then
    do DownLingoCode
  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
  if UpLingoON then
    do UpLingoCode
  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/OFF:",#format: #boolean, #default:  FALSE ], ¬
                             #OverImage:       [#comment:"Rollover Cast Member:",  #format:#graphic, #default: memdefault ], ¬
                             #OSoundON:        [#comment:"Rollover Sound ON/OFF:",#format: #boolean, #default:  FALSE ], ¬
                             #OverSound:       [#comment:"Rollover Sound:",        #format:#sound,   #default:"" ], ¬
                             #OverSoundChannel:[#comment:"Channel Number:",   #format:#integer, #default: 1 ], ¬
                             #DownON:          [#comment:"MouseDown ON/OFF:",#format: #boolean, #default:  FALSE ], ¬
                             #DownImage:       [#comment:"MouseDown Cast Member:", #format:#graphic, #default: memdefault ], ¬
                             #DSoundON:        [#comment:"MouseDown Sound ON/OFF:",#format: #boolean, #default:  FALSE ], ¬
                             #DownSound:       [#comment:"MouseDown Sound:",            #format:#sound,   #default:"" ], ¬
                             #DownSoundChannel:[#comment:"Channel Number:",   #format:#integer, #default: 1 ],¬
                             #Spacer:          [#comment:"--------------------->",#format:#boolean, #default: TRUE],¬
                             #DownLingoON:     [#comment:"MouseDown Lingo ON/OFF:",#format: #boolean, #default:  FALSE ], ¬
                             #DownLingoCode:   [#comment:"Lingo for MouseDown:", #format:#string, #default: ""], ¬
                             #UpLingoON:       [#comment:"MouseUp Lingo ON/OFF:",#format: #boolean, #default:  FALSE ], ¬
                             #UpLingoCode:     [#comment:"Lingo for MouseUp:", #format:#string, #default: ""], ¬
                             #OverLingoON:     [#comment:"MouseOver Lingo ON/OFF:",#format: #boolean, #default:  FALSE ], ¬
                             #OverLingoCode:   [#comment:"Lingo for MouseOver:", #format:#string, #default: ""]]
  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, There is also the ability to have one line of lingo code on the button to have simple go to staments or the ability to call a handler.  Just make sure there is a check in the box to toggle the functional on and off."
            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