Comunidad de diseño web y desarrollo en internet online

menu con htpservices en flex

Citar            
MensajeEscrito el 04 Sep 2008 01:06 am
bueno estimado cree mi httpservices con php y lo que me arroja es este
xml

<informacion>
-
<CATEGORIA id="1" nombre="Disco Duro">
<SUB_CATEGORIA id="11" nombre="IDE"/>
<SUB_CATEGORIA id="12" nombre="Serial Sata"/>
</CATEGORIA>
-
<CATEGORIA id="2" nombre="Procesadores">
<SUB_CATEGORIA id="21" nombre="AMD"/>
<SUB_CATEGORIA id="22" nombre="Intel"/>
</CATEGORIA>
-
<CATEGORIA id="3" nombre="Motherboard">
<SUB_CATEGORIA id="31" nombre="AMD"/>
<SUB_CATEGORIA id="32" nombre="Intel"/>
</CATEGORIA>
-
<CATEGORIA id="4" nombre="Memorias">
<SUB_CATEGORIA id="41" nombre="DDR"/>
<SUB_CATEGORIA id="42" nombre="DDR2"/>
<SUB_CATEGORIA id="43" nombre="DDR3"/>
</CATEGORIA>
-
<CATEGORIA id="5" nombre="Redes">
<SUB_CATEGORIA id="51" nombre="Placas Red"/>
<SUB_CATEGORIA id="52" nombre="Router"/>
<SUB_CATEGORIA id="53" nombre="Switch"/>
</CATEGORIA>
-
<CATEGORIA id="6" nombre="Placas de Video">
<SUB_CATEGORIA id="61" nombre="AGP"/>
<SUB_CATEGORIA id="62" nombre="PCI"/>
<SUB_CATEGORIA id="63" nombre="PCI Express"/>
</CATEGORIA>
-
<CATEGORIA id="7" nombre="Multimedia">
<SUB_CATEGORIA id="71" nombre="Placas Sonido"/>
<SUB_CATEGORIA id="72" nombre="Parlantes"/>
</CATEGORIA>
-
<CATEGORIA id="8" nombre="Monitores">
<SUB_CATEGORIA id="81" nombre="CRT"/>
<SUB_CATEGORIA id="82" nombre="LCD"/>
</CATEGORIA>
-
<CATEGORIA id="9" nombre="Dipositivo de Entrada">
<SUB_CATEGORIA id="91" nombre="Mouse"/>
<SUB_CATEGORIA id="92" nombre="Teclados"/>
</CATEGORIA>
-
<CATEGORIA id="10" nombre="Accesorios">
<SUB_CATEGORIA id="101" nombre="Gabinetes"/>
</CATEGORIA>
</informacion>

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

y me gustaria crear un menu parecido al que esta aqui

http://www.megachiponline.com/catalogoFX.asp en categorias

o este

arbol

que esta en este
codigo::::::::::::::::::::::::::::::::::::::::::::::::::

<?xml version="1.0" encoding="utf-8"?>
<!-- Tree control example. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

<mx:Script>
<![CDATA[

[Bindable]
public var selectedNode:XML;

// Event handler for the Tree control change event.
public function treeChanged(event:Event):void {
selectedNode=Tree(event.target).selectedItem as XML;
}
]]>
</mx:Script>

<mx:XMLList id="treeData">
<node label="Mail Box">
<node label="Inbox">
<node label="Marketing"/>
<node label="Product Management"/>
<node label="Personal"/>
</node>
<node label="Outbox">
<node label="Professional"/>
<node label="Personal"/>
</node>
<node label="Spam"/>
<node label="Sent"/>
</node>
</mx:XMLList>

<mx:Panel title="Tree Control Example" height="75%" width="75%"
paddingTop="10" paddingLeft="10" paddingRight="10"
paddingBottom="10">

<mx:Label width="100%" color="blue"
text="Select a node in the Tree control."/>

<mx:HDividedBox width="100%" height="100%">
<mx:Tree id="myTree" width="50%" height="100%"
labelField="@label"
showRoot="false" dataProvider="{treeData}"
change="treeChanged(event)"/>
<mx:TextArea height="100%" width="50%"
text="Selected Item: {selectedNode.@label}"/>
</mx:HDividedBox>

</mx:Panel>
</mx:Application>
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

estimado amigos por favor respondenme

no se que debo hacer

muchas gracias

Por kamui19

7 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 04 Sep 2008 11:35 am
Tip: hardcodea tu XML y ponlo como dataProvider de tu componente Tree, mira si te gusta. Si quieres copiar el código que pusiste, mira que la estructura del XML tiene dos niveles, si la tuya también debería calzar bien

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 04 Sep 2008 11:36 am
Y por cierte, siempre dale formato a tu código

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.