336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="feedRequest.send();">
<mx:Script>
<![CDATA[
import mx.rpc.Fault;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
private function resultHandler(event:ResultEvent):void{ //성공시
dgPosts.dataProvider = event.result.rss.channel.item;
}
private function faultHandler(event:FaultEvent):void{ //실패시
mx.controls.Alert.show(event.fault.message);
}
]]>
</mx:Script>
<mx:HTTPService id="feedRequest" url="http://www.phpschool.com/gnuboard4/bbs/rss.php?bo_table=tipntech" useProxy="false"
result="resultHandler(event)" fault="faultHandler(event)" />
<mx:Panel title="HTTPService" height="100%" width="90%"
paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10" layout="vertical">
<mx:DataGrid id="dgPosts" height="30%" width="100%" fontSize="12">
<mx:columns>
<mx:DataGridColumn headerText="Posts" dataField="title" />
<mx:DataGridColumn headerText="Date" dataField="date" />
<mx:DataGridColumn headerText="Link" dataField="link" />
<mx:DataGridColumn headerText="category" dataField="creator" />
</mx:columns>
</mx:DataGrid>
<mx:TextArea height="70%" htmlText="{dgPosts.selectedItem.description}" width="100%" editable="false" fontSize="12" />
</mx:Panel>
</mx:Application>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="feedRequest.send();">
<mx:Script>
<![CDATA[
import mx.rpc.Fault;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
private function resultHandler(event:ResultEvent):void{ //성공시
dgPosts.dataProvider = event.result.rss.channel.item;
}
private function faultHandler(event:FaultEvent):void{ //실패시
mx.controls.Alert.show(event.fault.message);
}
]]>
</mx:Script>
<mx:HTTPService id="feedRequest" url="http://www.phpschool.com/gnuboard4/bbs/rss.php?bo_table=tipntech" useProxy="false"
result="resultHandler(event)" fault="faultHandler(event)" />
<mx:Panel title="HTTPService" height="100%" width="90%"
paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10" layout="vertical">
<mx:DataGrid id="dgPosts" height="30%" width="100%" fontSize="12">
<mx:columns>
<mx:DataGridColumn headerText="Posts" dataField="title" />
<mx:DataGridColumn headerText="Date" dataField="date" />
<mx:DataGridColumn headerText="Link" dataField="link" />
<mx:DataGridColumn headerText="category" dataField="creator" />
</mx:columns>
</mx:DataGrid>
<mx:TextArea height="70%" htmlText="{dgPosts.selectedItem.description}" width="100%" editable="false" fontSize="12" />
</mx:Panel>
</mx:Application>
'컴터 > Flash & Flex' 카테고리의 다른 글
flash 에서 GET 으로 변수값 전달시 받아 사용할때 (0) | 2008.05.13 |
---|---|
URL 떠오기 (0) | 2008.05.12 |
도메인 영역을 넘을 수 있는 서비스 만들기(crossdomain.xml) (0) | 2008.05.10 |
Style 코딩 차이 (0) | 2008.05.08 |