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