• home
  • forum
  • my
  • kt
  • download
  • Using the alert box component

    Author: 2009-07-09 03:51:18 From:

    1) Open the components window (Window > Components) and drag the alert box from the components menu into the library. NOT THE STAGE

     

    2) On an actions layer/frame, type:

    import mx.controls.Alert;

    var myClickHandler:Function = function (evt_obj:Object) {

                    if (evt_obj.detail == Alert.YES) {

                                    //Custom action

                    }

    };

    Alert.show("Message", "Title", Alert.YES | Alert.NO, this, myClickHandler, "stockIcon", Alert.YES);

     

    3) Change "message" to the body of the alert box and "Title" to the title of your box.

    Where it says //Custom action put whatever you want. For example "gotoAndStop(2);"

     

    Download zipped source files

    discuss this topic to forum

    relation tutorial

    No information

    Category

      3D (36)
      Math Physics (18)
      3rd Party (10)
      Navigation (70)
      Actionscripting (228)
      Optimization (17)
      Animation (166)
      Projector (11)
      Audio (54)
      Special Effects (170)
      Backend (26)
      Text Effects (89)
      Drawing (34)
      Tips and Techniques (51)
      Dynamic Content (34)
      Tricks (8)
      Games (113)
      Utilities (23)
      Getting Started (98)
      Video (59)
      Interactivity (48)
      Web Design (37)

    New

    Hot