컴터/Flash & Flex
flash 에서 GET 으로 변수값 전달시 받아 사용할때
우렁씨
2008. 5. 13. 16:05
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="feedRequest.send();">
<mx:HTTPService id="feedRequest" url="http://localhost:8080/flex/get_xml_data.jsp" useProxy="false" />
<mx:Panel title="HTTPService Test" height="100%" width="90%"
paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10" layout="vertical">
<mx:DataGrid id="dgPosts" dataProvider="{feedRequest.lastResult.result_set.record}" width="100%" />
<mx:Button label="xxxxx" click="mx.controls.Alert.show(Application.application.parameters.idx)" />
</mx:Panel>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
]]>
</mx:Script>
</mx:Application>
------------------------html 소스-------------------------
<embed src="jspHttpServicetxt.swf?idx=xxxxx" quality="high" bgcolor="#869ca7"
width="100%" height="100%" name="jspHttpServicetxt" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="feedRequest.send();">
<mx:HTTPService id="feedRequest" url="http://localhost:8080/flex/get_xml_data.jsp" useProxy="false" />
<mx:Panel title="HTTPService Test" height="100%" width="90%"
paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10" layout="vertical">
<mx:DataGrid id="dgPosts" dataProvider="{feedRequest.lastResult.result_set.record}" width="100%" />
<mx:Button label="xxxxx" click="mx.controls.Alert.show(Application.application.parameters.idx)" />
</mx:Panel>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
]]>
</mx:Script>
</mx:Application>
------------------------html 소스-------------------------
<embed src="jspHttpServicetxt.swf?idx=xxxxx" quality="high" bgcolor="#869ca7"
width="100%" height="100%" name="jspHttpServicetxt" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
--예시--