flash on 2010-5-27
♥0 |
Line 28 |
Modified 2010-05-27 08:13:36 |
MIT License
archived:2017-03-10 06:52:57
ActionScript3 source code
/**
* Copyright kihon ( http://wonderfl.net/user/kihon )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/3UDK
*/
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.CloseEvent;
protected function click(event:MouseEvent):void
{
Alert.show("データを送信しますか?", "情報", Alert.YES | Alert.NO, this, closeHandler);
}
private function closeHandler(event:CloseEvent):void
{
if (event.detail == Alert.YES)
{
label.text = "データが送信されました";
}
else if (event.detail == Alert.NO)
{
label.text = "データ送信をキャンセルしました";
}
}
]]>
</fx:Script>
<s:Button x="68" y="64" label="ボタン" click="click(event)"/>
<s:Label x="68" y="159" fontFamily="MS ゴシック" id="label"/>
</s:Application>