topical media & game development

talk show tell print

#graph-basic.mx

#graph-basic.mx [swf] flex


  <?xml version="1.0" encoding="utf-8"?>
  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:fc="http://www.adobe.com/2006/fc">
          
  
          
          <mx:HSlider x="403" y="14" width="114" id="repulsion" value="0.5" minimum="0.0" maximum="1.5" liveDragging="true"/>
  
          <fc:SpringGraph id="springgraph" width="100%" bottom="0" top="40" 
                  repulsionFactor="{repulsion.value}" 
                  xmlNames="[thing,connect,source,dest]">
                  <fc:dataProvider>
                          <mx:XML xmlns="">
                                  <stuff>
                                                                                  
                                                  <thing id="1" prop="apple"/>
                                                  <thing id="2" prop="orange"/>
                                                  <thing id="3" prop="pear"/>
                                                  <thing id="4" prop="FRUITS"/>
                                                  <connect source="4" dest="1"/>
                                                  <connect source="4" dest="2"/>
                                                  <connect source="4" dest="3"/>
                                          
                                  </stuff>
                          </mx:XML>
                  </fc:dataProvider>
                  
                  <fc:itemRenderer>
                          <mx:Component>
                                  <mx:Label fontSize="14" text="{data.data.@prop}" color="#ffffff"/>                                        
                          </mx:Component>
                  </fc:itemRenderer>
          </fc:SpringGraph>
  
          
  </mx:Application>
  


(C) Æliens 27/08/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.