1 <?xml version=
"1.0" encoding=
"utf-8"?>
4 Purpose: Simple form in Flash
7 Copyright: (c) 2009 Vadim Zeitlin
8 Licence: wxWindows licence
10 This file can be compiled to SWF using the mxmlc free compiler from Flex SDK.
12 You then can call SetText() and GetText() functions from the C++ flash sample.
15 xmlns:
mx=
"http://www.adobe.com/2006/mxml"
17 preinitialize=
"preinit();"
18 horizontalAlign=
"left" verticalAlign=
"top"
21 backgroundColor=
"0xaaaaaa"
25 import flash.external.ExternalInterface;
27 private function preinit():void
29 ExternalInterface.addCallback("SetText", DoSetText);
30 ExternalInterface.addCallback("GetText", DoGetText);
33 private function DoSetText(str: String):void {
37 private function DoGetText():String {
41 public function onok():void {
42 fscommand("call_fscommand_form", "button");
46 <mx:Canvas width=
"100%">
47 <mx:VBox width=
"100%">
48 <mx:Form borderColor=
"0x0" borderStyle=
"solid" width=
"100%">
49 <mx:Label text=
"Simple Flash Form" />
50 <mx:FormItem label=
"Type any text here:">
51 <mx:TextInput id=
"txt" text=
"Hello wxWidgets!" width=
"100%"/>
53 <mx:FormItem label=
"Click button to generate event">
54 <mx:Button id=
"formbutton" label=
"OK" click=
"onok();"/>