flex中springgraph插件的与xml动态结合的问题,貌似要使用httpservice,急求大大们帮忙! 100
我用了一个画拓扑图的插件springgraph,想动态的显示xml的内容,据说要用httpservice但是我自己写了一个,无法运行,请各位大大指正!很紧急!如果解决了一...
我用了一个画拓扑图的插件springgraph,想动态的显示xml的内容,据说要用httpservice但是我自己写了一个,无法运行,请各位大大指正!很紧急!如果解决了一定会追加200分!希望能用qq教我,我QQ是1184763475
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:adobe="http://www.adobe.com/2006/fc">
<mx:HTTPService id="parseXML" showBusyCursor="true" url="dataTiny.xml">
</mx:HTTPService>
<mx:Button label="Load from mx:XML tag" click="parseXML.send();loadExternalXML(reset.selected)" y="10" x="171"/>
<mx:CheckBox id="reset" label="reset" selected="true" x="340" y="12"/>
<mx:HSlider x="403" y="14" width="114" id="repulsion" value="0.5" minimum="0.0" maximum="1.5" liveDragging="true"/>
<adobe:SpringGraph id="springgraph" width="100%" bottom="0" top="40"
backgroundColor="#666666" repulsionFactor="{repulsion.value}" xmlNames="[node,edge,source,dest]">
<adobe:dataProvider>
</adobe:dataProvider>
<adobe:itemRenderer>
<mx:Component>
<mx:Label fontSize="14" text="{data.data.@prop}" color="#f0fff0"/>
</mx:Component>
</adobe:itemRenderer>
</adobe:SpringGraph>
<mx:Script>
<![CDATA[
import com.adobe.flex.extras.controls.springgraph.Graph;
private function loadExternalXML(reset: Boolean): void {
if(reset) springgraph.empty();
springgraph.xmlNames = null; // use defaults
springgraph.dataProvider = parseXML.lastResult;
}
]]>
</mx:Script>
<mx:Text fontSize="9"
htmlText="<a href="http://mark-shepherd.com">mark-shepherd.com</a>" y="12" fontWeight="bold" textAlign="right" right="10" width="114"/>
</mx:Application> 展开
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:adobe="http://www.adobe.com/2006/fc">
<mx:HTTPService id="parseXML" showBusyCursor="true" url="dataTiny.xml">
</mx:HTTPService>
<mx:Button label="Load from mx:XML tag" click="parseXML.send();loadExternalXML(reset.selected)" y="10" x="171"/>
<mx:CheckBox id="reset" label="reset" selected="true" x="340" y="12"/>
<mx:HSlider x="403" y="14" width="114" id="repulsion" value="0.5" minimum="0.0" maximum="1.5" liveDragging="true"/>
<adobe:SpringGraph id="springgraph" width="100%" bottom="0" top="40"
backgroundColor="#666666" repulsionFactor="{repulsion.value}" xmlNames="[node,edge,source,dest]">
<adobe:dataProvider>
</adobe:dataProvider>
<adobe:itemRenderer>
<mx:Component>
<mx:Label fontSize="14" text="{data.data.@prop}" color="#f0fff0"/>
</mx:Component>
</adobe:itemRenderer>
</adobe:SpringGraph>
<mx:Script>
<![CDATA[
import com.adobe.flex.extras.controls.springgraph.Graph;
private function loadExternalXML(reset: Boolean): void {
if(reset) springgraph.empty();
springgraph.xmlNames = null; // use defaults
springgraph.dataProvider = parseXML.lastResult;
}
]]>
</mx:Script>
<mx:Text fontSize="9"
htmlText="<a href="http://mark-shepherd.com">mark-shepherd.com</a>" y="12" fontWeight="bold" textAlign="right" right="10" width="114"/>
</mx:Application> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询