<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
       creationComplete="initApp();" backgroundColor="#00B4FF" backgroundAlpha="0" viewSourceURL="srcview/index.html">
       <mx:Script>
               <![CDATA[
                       import mx.controls.Alert;

                       [Bindable]
                       private var versionTxt:String;
                       [Bindable]
                       private var osTxt:String;
                       
                       [Bindable]
                       private var languageTxt:String;
                       [Bindable]
                       private var isAcrobatEmbed:Boolean;
                       private function initApp():void{
                               addEventListener(KeyboardEvent.KEY_DOWN,reportKeyDown);
                               addEventListener(KeyboardEvent.KEY_UP,reportKeyUp);
                               versionTxt=Capabilities.version;
                               osTxt=Capabilities.os;
                               languageTxt=Capabilities.language;
                               isAcrobatEmbed=Capabilities.isAcrobatEmbed;

                       }

                       public function goFullScreen( event:MouseEvent ):void {
                               stage.displayState = StageDisplayState.FULL_SCREEN;
                                //stage["displayState"] = "fullScreen";
                       }

                       private function buttonClickHandler(event:MouseEvent):void{
                                stage["displayState"] = "fullScreen";
                       }

                       private function reportKeyDown(event:KeyboardEvent):void
                       {
                               var str:String ="Key Pressed: " +
String.fromCharCode(event.charCode) +         " (key code: " +
event.keyCode + " character code: "         + event.charCode + ")";
                           log.text+="\n"+"" +"ctrl:"+  event.ctrlKey + " shift:" +
event.shiftKey + " alt:" + event.altKey + " " + str;


                           if (event.keyCode == Keyboard.SHIFT){
                               log.text+="\n"+ "Shift Key up";
                           }
                           if(event.keyCode==Keyboard.CONTROL){

                               log.text+="\n"+ "CONTROL Key up";
                           }
                       }

                       private function reportKeyUp(event:KeyboardEvent):void
                       {
                           var message:String ="Key Released: " +
String.fromCharCode(event.charCode) +         " (key code: " +
event.keyCode + " character code: " +         event.charCode + ")";
                           log.text+="\n"+message;
                           if (event.keyCode == Keyboard.SHIFT)
                           {
                               log.text+="\n"+ "Shift Key up";
                           }
                           if(event.keyCode==Keyboard.CONTROL){
                               log.text+="\n"+ "CONTROL Key up";
                           }
                       }
                       private function clear():void{
                               log.text="";
                       }

               ]]>
       </mx:Script>
       <mx:Button id="clearBt" click="clear()"  label="ログclear"  x="10" y="369"/>
       <mx:TextArea id="log"  width="548" height="141" x="10" y="220"/>
       <mx:TextArea id="message"  height="29" x="10" y="183"/>
       <mx:Text text="Shift
ALT
Enter
Ctrl
Tab
↑
↓
←
→
Backspace
Delete
PageUp
PageDown
End"  x="10" y="157"/>
       <mx:Panel x="10" y="10" width="571" height="139" layout="absolute">
               <mx:Text x="10" y="10" text="FlashPlayer version:{versionTxt}" width="408"/>
               <mx:Text x="10" y="26" text="os:{osTxt}" width="195"/>
               <mx:Text x="10" y="41" text="language:{languageTxt}" width="151"/>
               <mx:Text x="10" y="59" text="isAcrobatEnabled:{isAcrobatEmbed}" width="212"/>
               <mx:Button id="bt" click="goFullScreen(event)"
label="gotoFullScreen!" x="426" y="2"/>
       </mx:Panel>
</mx:Application>