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
Expire date
RegistryReader
DaoX
Set DirectToStage Property of a Flash Sprite
Fade
Vector Shape - Create Saw Wave
OpenDBC
Text Encryption
Write Text to File Example
HighLighting text
 

 

 

Behavior Mui Alert Dialog

Added on 4/7/2000

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC

This item has not yet been rated

Author: JeffTiedemann

This behavior will allow youto quickly customize a MUI Alert Dialog. All MUI Alert options are supported and you can choose when you attach it to a sprite. I have only included an "on mouseUp handler" but you could easily add others. Should be compatible with Director 6.5 -> 8 but I only tested it on Director 7.02 with a Mac.

-- MUI Alert Behavior
-- Author : Jeff Tiedemann
-- Company : digin.com
-- Date : 4/6/00

-- PROPERTIES --

property  atitle, amessage, abuttons, adefault, aicon, amoveable

-- DESCRIPTION --

on getPropertyDescriptionList
  
  return [ #atitle: [#default: "This is the title", #format: #string, #comment: "Set title"],¬
#amessage: [#default: "This is the message", #format: #string, #comment: "Set message"],#abuttons: [#default: "OK", #format: #string, #comment: "Set Buttons",¬
#range: ["OK", "OK & Cancel","Retry & Cancel","Abort & Retry & Ignore","Yes & No & Cancel","Yes & No"]], #adefault: [#default: "None", #format: #string, #comment: "Set Default",¬
#range: ["None", "OK", "Cancel","Retry","Abort","Ignore","Yes","No"]],#aicon: [#default: "None", #format: #string, #comment: "Set Icon",¬
#range: ["None", "Stop","Note","Caution","Question","Error"]],#amoveable: [#default: TRUE, #format: #boolean, #comment: "Set Movable"]¬
]
end getPropertyDescriptionList


on getBehaviorDescription
  return "This behavior adds a MUI alert window"
end getBehaviorDescription

on getBehaviorTooltip me
  return "Make MUI Alert Dialogs."
end getBehaviorTooltip


-- CUSTOM HANDLERS --

on mouseUp me
  
  case abuttons of
      
    "OK" : set abuttons = #OK
    "OK & Cancel" :  set abuttons = #OkCancel
    "Retry & Cancel" :  set abuttons = #RetryCancel
    "Abort & Retry & Ignore" :  set abuttons = #AbortRetryIgnore
    "Yes & No & Cancel" :  set abuttons = #YesNoCancel
    "Yes & No" :  set abuttons = #YesNo
      
  end case
  
  case aicon of
      
    "None" : set aicon = 0
    "Stop" : set aicon = #stop
    "Note" : set aicon = #note
    "Caution" : set aicon = #caution
    "Question" : set aicon = #question
    "Error" : set aicon = #error
      
  end case
  
  case adefault of
    "None" : set adefault = 0
    "OK" : set adefault = 1
    "Cancel" :  set adefault = 2
    "Retry" :  set adefault = 3
    "Abort" :  set adefault = 4
    "Ignore" :  set adefaults = 5
    "Yes" :  set adefault = 6
    "No" :  set adefault = 7
      
  end case
  
  set alertObj = new(xtra "MUI")
  
  if aicon = 0 then
    
    set alertInitList = [#buttons: abuttons, #title: atitle,#message: amessage,#movable: amoveable,#default: adefault]
  else
    set alertInitList = [#buttons: abuttons, #title: atitle,#message: amessage,#movable: amoveable,#default: adefault,#icon: aicon ]
  end if
  if objectP (alertObj) then
    set result = Alert(alertObj, alertInitList)    
  else    
    alert("No MUI Xtra")
    return    
  end if
end mouseUp

 


Contact

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

Send e-mail