class ExoLundi2 { static function main() { var root = flash.Lib.current.stage; var input = new flash.text.TextField(); input.type = flash.text.TextFieldType.INPUT; input.x = 0; input.y = 0; input.width = root.stageWidth; input.height = 20; input.border = true; input.text = "Monsieur Jack, vous dactylographiez bien mieux que votre ami Wolf"; var output = new flash.text.TextField(); output.x = 0; output.y = 22; output.width = root.stageWidth; output.height = 20; output.text = "Pangramme : oui"; input.addEventListener("change", function(_) { var pan = new Map(); for (i in 97 ... 123) pan[i] = false; for (i in 0 ... input.text.length) { var chr = input.text.charAt(i).toLowerCase().charCodeAt(0); if (chr >= 97 && chr <= 122) pan[chr] = true; } var test_pan = pan.toString().indexOf("false") == -1; output.text = "Pangramme : " + (test_pan ? "oui" : "non"); }); root.addChild(input); root.addChild(output); } }