2012-01-14 1 views
0

TextArea가 있고 HTTPRequest를 사용하여 웹 사이트를 가져 와서 TextArea에 html 소스 을 출력하려고했지만 아무 일도 일어나지 않았습니다.플렉스 - TextArea에서 html 소스를 출력하는 HTTPRequest

<?xml version="1.0" encoding="utf-8"?> 
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
     xmlns:s="library://ns.adobe.com/flex/spark" 
     xmlns:ns1="*" 
     actionBarVisible="true" currentState="landscape" tabBarVisible="false" 
     overlayControls.landscape="false" 
     tabBarVisible.landscape="false" 
     actionBarVisible.portrait="true" viewActivate="view1_viewActivateHandler(event)"> 
    <fx:Declarations> 
     <s:HTTPService id="service" resultFormat="e4x"/> 
    </fx:Declarations> 
    <s:TextArea id="mainTextField" text="{service.lastResult}"/> 
    <fx:Script> 
     <![CDATA[ 
      import spark.events.ViewNavigatorEvent; 

      protected function view1_viewActivateHandler(event:ViewNavigatorEvent):void 
      { 
       service.url = "http://www.google.com"; 

      } 

     ]]> 
    </fx:Script> 

    <s:actionContent> 

    </s:actionContent> 
    <s:titleContent> 

    </s:titleContent> 
    </s:View> 

답변

0

service.send()으로 전화하여 요청을 보내야합니다.

+0

그랬어 :) 고마워. – RapsFan1981

+0

다른 사람 이이 문제가있는 사람은 또한 resultFormat = "e4x"resultFormat = "텍스트" – RapsFan1981

관련 문제