Skip to main content
Participating Frequently
April 12, 2010
Question

Message missing from alert box & Can you disable everything until user selects an answer?

  • April 12, 2010
  • 1 reply
  • 735 views

Question 1 - My alert box window is working, and the title and buttons function as they should, but does anyone know why my message is not showing up?

Question 2 - How do you program the alert box window so that no other buttons on your application work until the user selects one of your alert window buttons? I can do this manually by setting everything to enabled = false, but I know this happens automatically every other time I've used the alert window component, but it's not working for me now.

Question 3 - How can I prevent multiple alert windows from popping up? My alert comes up when a user clicks a button called 'Delete'. Would be solved if I had the answer to question 2.

var myMess:String = '';
var myTitle:String = '';

function confirmDelete(){
    selectedAlt = list_dg.selectedItem.ALT_CODE;
    myMess = "Are you sure you want to delete this ALT code: "+selectedAlt+"?";
    myTitle = "Confirm Delete ALT Code Function                                                    ";
    var alertBox:Object = Alert.show(
myMess,myTitle,Alert.YES|Alert.NO,this,deleteConfirmHandler);
    alertBox.setSize(450, 125);
}
/*********************************************************************************

// HANDLER FOR CONFIRM DELETE ALT ALERT WINDOW
deleteConfirmHandler = function(evt_obj:Object):Void {   
    var myAnswer = evt_obj.detail;
    // returns 1 if yes, 2 if no.
    if (myAnswer == 1){
            deleteAlt();
    }
    else {   
        altDetail.moveAssign_btn.enabled       = false;
        altDetail.moveAvail_btn.enabled        = false;
        altDetail.avail_list.selectedIndex     = null;
        altDetail.assigned_list.selectedIndex  = null;
    }
}

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 13, 2010

1.  what message appears?

2.  that should happen automatically but you can create a black rectangle, convert it to a movieclip and when needed, attach it to the stage just below the depth of your alert, assign an alpha of about 80, assign a mouse handler and assign usehandcursor to false

3.  solved with 2.

Participating Frequently
April 13, 2010

The alert window comes up, the title appears but the message does not. It's just a window with a title and no text/message. I've used the alert window before, and it usually disables everything on the screen until you answer Yes or No, but this time it isn't. I've compared my code to my old code with the alert window that works, and can't find any differences.

Any idea on how to fix this without using a movie clip?

Thanks!

kglad
Community Expert
Community Expert
April 13, 2010

if the function that instantiates your component what's

trace(this.getNextHighestDepth())

show?