開發 Flex 情境 20 -- 關於 : 第一個 (練習) Flex MXML !!!
凌晨2:17
開發 Flex 情境 20 -- 關於 : 第一個 (練習) Flex MXML !!!
1. 我的第一個 Flex MXML 練習 !!
<?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" minWidth="955" minHeight="600"
applicationComplete="init()">
<fx:Style>
/*Button {
color:red;
}*/
</fx:Style>
<fx:Script>
<![CDATA[
// import mx.messaging.messages.AsyncMessage;
// import mx.messaging.messages.IMessage;
private function init():void
{
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<fx:Model id="MyEmployee">
<root>
<name>
<first>Will</first>
<last>Tuckerman</last>
</name>
<department>Accounting</department>
<email>wtuckerman@wilsoncompany.com</email>
</root>
</fx:Model>
</fx:Declarations>
<s:Panel title="Chat" top="12" bottom="12" left="12" right="12">
<s:TextArea id="log" width="100%" height="100%" borderVisible="false"/>
<s:controlBarContent>
<mx:Form width="100%" paddingTop="4" paddingBottom="4" paddingLeft="4" paddingRight="4">
<mx:FormItem label="User Id:">
<s:TextInput id="userId" width="100" enter=""/>
</mx:FormItem>
<mx:FormItem label="Message:" width="100%" direction="horizontal">
<s:TextInput id="msg" width="100%" enter=""/>
<s:Button label="Send" click=""/>
</mx:FormItem>
</mx:Form>
</s:controlBarContent>
</s:Panel>
</s:Application>
1. 我的第一個 Flex MXML 練習 !!
<?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" minWidth="955" minHeight="600"
applicationComplete="init()">
<fx:Style>
/*Button {
color:red;
}*/
</fx:Style>
<fx:Script>
<![CDATA[
// import mx.messaging.messages.AsyncMessage;
// import mx.messaging.messages.IMessage;
private function init():void
{
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<fx:Model id="MyEmployee">
<root>
<name>
<first>Will</first>
<last>Tuckerman</last>
</name>
<department>Accounting</department>
<email>wtuckerman@wilsoncompany.com</email>
</root>
</fx:Model>
</fx:Declarations>
<s:Panel title="Chat" top="12" bottom="12" left="12" right="12">
<s:TextArea id="log" width="100%" height="100%" borderVisible="false"/>
<s:controlBarContent>
<mx:Form width="100%" paddingTop="4" paddingBottom="4" paddingLeft="4" paddingRight="4">
<mx:FormItem label="User Id:">
<s:TextInput id="userId" width="100" enter=""/>
</mx:FormItem>
<mx:FormItem label="Message:" width="100%" direction="horizontal">
<s:TextInput id="msg" width="100%" enter=""/>
<s:Button label="Send" click=""/>
</mx:FormItem>
</mx:Form>
</s:controlBarContent>
</s:Panel>
</s:Application>


0 意見