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
M-Trail v1
Open File WIth Associated Application
Set Linked Property of a Flash member
Change Bit Depth of a Member
Amplitude Xtra
bubbleSortForStrings AND bubbleSortForStringLists
Object Serializer
Opening a page in a browser frame
QTMovieXtra
Microangelo
 

 

 

Behavior 3 State Button

Added on 6/10/1999

 

Compatibilities:
behavior D6_5 Mac PC

This item has not yet been rated

Author: JBattistini

Has the image change when the mouse is over it
and has the image change again when the mouse is down.

property UpImage, RolloverImage, DownImage

on mouseEnter me
  set the member of sprite the spritenum of me = the RolloverImage of me
end

on mouseWithin me
  set the member of sprite the spritenum of me = the RolloverImage of me
  if the mousedown then
    set the member of sprite the spritenum of me = the DownImage of me
  end if
end

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

on mouseUp me
  set the member of sprite the spritenum of me = the UpImage of me
end

on mouseUpOutside me
  set the member of sprite the spritenum of me = the UpImage of me
end

on getPropertyDescriptionList
  
  set p_list = [#UpImage: [ #comment:   "Button UP Image:",¬
                                        #format:   #member, ¬
                                        #default:   ""],¬
                      #RolloverImage: [ #comment:   "Button ROLLOVER Image:",¬
                                        #format:   #member, ¬
                                        #default:   ""],¬
                          #DownImage: [ #comment:   "Button DOWN Image:",¬
                                        #format:   #member, ¬
                                        #default:   ""]¬
              ]
  return p_list
end

on getBehaviorDescription
  return ¬
            "Produces a button animantion with three button states. And UP state, a DOWN state and a ROLLOVER state. When the mouse is not on the button, it is in the UP state. When the mouse is over the button, it is in the ROLLOVER state. And finally, when the mouse is over the button and down, it is in the DOWN state." & RETURN & ¬
            "PARAMETERS:" & RETURN & ¬
            "• UpImage - The image of the button in its UP state."  & RETURN & ¬
            "• RolloverImage - The image of the button in its ROLLOVER state."  & RETURN & ¬
            "• DownImage - The image of the button in its DOWN state."
end  

 


Contact

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

Send e-mail