码迷,mamicode.com
首页 > 其他好文 > 详细

flex直接访问服务器

时间:2014-06-11 23:40:01      阅读:287      评论:0      收藏:0      [点我收藏+]

标签:http   color   com   文件   os   cti   

1、读取指定文件里的xml;

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        creationComplete="windowedapplication1_creationCompleteHandler(event)">
 <fx:Script>
  <![CDATA[
   import mx.events.FlexEvent;
   import mx.rpc.events.ResultEvent;
   
   protected function hs_resultHandler(event:ResultEvent):void
   {
    var myData:XML = event.result as XML;
   }
   
   protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
   {
    hs.send();
   }
   
  ]]>
 </fx:Script>
 <fx:Declarations>
  <!-- 将非可视元素(例如服务、值对象)放在此处 -->
  <s:HTTPService id="hs" result="hs_resultHandler(event)" resultFormat="e4x"
        url="http://localhost:8080/baozhi/signColorXml.xml"/>
 </fx:Declarations>
 
</s:WindowedApplication>

注:装appserv服务器。

flex直接访问服务器,布布扣,bubuko.com

flex直接访问服务器

标签:http   color   com   文件   os   cti   

原文地址:http://www.cnblogs.com/dongyl/p/3772238.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!