⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httpservice.mxml

📁 实现很多功能 实现很多功能 实现很多功能
💻 MXML
字号:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
   layout="absolute" creationComplete="{init();}">
	<mx:Style>
		global{
			font-size: 12;
		}
		

	</mx:Style>
	
	<mx:Script>
		<![CDATA[
			import mx.controls.Alert;
			import mx.rpc.events.ResultEvent;
			
			
			private function abc(event:ResultEvent):void
			{
				Alert.show("璇锋眰瀹屾垚","鎻愮ず");
			
			}
			
			private function init():void{
			
				blogHttpService.addEventListener(ResultEvent.RESULT,abc);
				//trace(ResultEvent.RESULT);
			}		
			
		]]>
	</mx:Script>
    <mx:HTTPService 
        id="blogHttpService" 
        url="http://localhost:4040/training/blog.xml"/>

    <mx:Panel x="10" y="10" width="475" height="400" title="Blog Reader">

        <mx:DataGrid id="dgArticleList" x="20" y="20" width="400" dataProvider="{blogHttpService.lastResult.blog.article}" height="250">
            <mx:columns>
                <mx:DataGridColumn headerText="Title" dataField="title"/>
                <mx:DataGridColumn headerText="Date" dataField="date" width="150" />
            </mx:columns>
        </mx:DataGrid>

        <mx:TextArea width="400" text="{dgArticleList.selectedItem.content + ':' + dgArticleList.selectedItem.date}"/>
        <mx:Button label="Read" click="blogHttpService.send()"/>
        
    </mx:Panel>
    
</mx:Application>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -