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
Toggle ButtonsEnabled Property of a Flash Member
Generic behavior to copy a file
Go To The Frame - Blog about Lingo
bubbleSortForStrings AND bubbleSortForStringLists
Set Static Property of a Flash sprite
Dean Utian's Director Resources
Rollover Fader-Alphamania
myPrint
Powerpoint in Director
WinXtra
 

 

 

Behavior Yes/No Alert

Added on 6/10/1999

 

Compatibilities:
behavior D6_5 Mac PC

This item has not yet been rated

Author: PerMeldgaard

Yes/No Alert

property message, icon, alertTittel, movableOn, yesLingo, noLingo

on mouseUp me
  set myAlertPropList = [ #buttons : #YesNo, #message :  message, #icon : icon, #title : alertTittel, #movable : movableOn]
  set myAlertBox = new (xtra "MUI") -- instantiates the MUI object
  if objectP ( myAlertBox ) then -- makes sure the object exists
    set result = Alert (myAlertBox, myAlertPropList)
    case result of
      1 : -- the user clicked yes
        do yesLingo
      2 : -- the user clicked no
        do noLingo
    end case
  end if
end

on getPropertyDescriptionList me
  set theProps to [:]
  
  set c to "Type your question"
  set f to #string
  set d to "Continue ?"
  addProp theProps, #message, [#comment: c, #format: f, #default: d]
  
  set c to "What kind of icon do you want?"
  set f to #symbol
  set r to [#stop, #note, #caution, #question]
  set d to getAt(r,1)
  set typeProps to [#comment: c, #format: f, #range: r, #default: d]
  addProp theProps, #icon, typeProps
  
  set c to "Window title?"
  set f to #string
  set d to "Alert"
  addProp theProps, #alertTittel, [#comment: c, #format: f, #default: d]
  
  set c to "Movable?"
  set f to #boolean
  set d to FALSE
  addProp theProps, #movableOn, [#comment: c, #format: f, #default: d]
  
  set c to "Lingo for Yes"
  set f to #string
  set d to ""
  addProp theProps, #yesLingo, [#comment: c, #format: f, #default: d]
  
  set c to "Lingo for No"
  set f to #string
  set d to ""
  addProp theProps, #noLingo, [#comment: c, #format: f, #default: d]
  
  return theProps
end

on GetBehaviorDescription
  return "The "YNAlert" creates a alert box with a "Yes" and a "No" button. You choose the title, the message, what kind of icon you want and the Lingo for Yes and No."
end  

 


Contact

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

Send e-mail