开发者

operation based on alert box

开发者 https://www.devze.com 2022-12-22 00:06 出处:网络
is it any possible to create operation based on the ale开发者_如何转开发rt box(like yes or no option)?

is it any possible to create operation based on the ale开发者_如何转开发rt box(like yes or no option)? Thank's in advance...


Are you just trying to fire off a function based on the users decision? If so there is a closeHandler as part of the Alert.show constructor that you can tell it what function to run when the alert box closes.

Alert.show("My Message", "Alert Box Title", (Alert.YES | Alert.NO), null, alertCloseHandler);

private function alertCloseHandler(event:CloseEvent){
  if(event.detail == Alert.YES){
    //code if they clicked yes
  }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号