Comunidad de diseño web y desarrollo en internet online

Pregunta de base de datos

Citar            
MensajeEscrito el 11 May 2006 03:36 pm
estoy algo confundido y espero que me puedan sacar de mi duda
no se si esta pregunta va aqui pero como trata de base de datos pense que si

estoy empezando a desarollar en FLEX 2 B1 (muy bueno por cierto para mi gusto)

Tengo una base de datos en XML, esta me muestra en un Datagrid nombres de personas los cuales al darle click a alguno de estos me muestra los datos en un Textarea(direccion, telefono, etc), hasta ai todo bien me piden en la compañia que mande un disco a las oficina lo cual quiere decir que no usaria html para nada si no solo el archivo de flash

el problema empieza cuando necesiten buscar algun nombre especifico en la lista la cual ya llego casi a 2000 y no se como meter algun tipo de buscador se que se puede usar ACTIONSCRIPT pero no se nada de actionscript, con PHP he hecho mis intentos y he fallado alguien que sepa donde puedo encontrar algun codigo para poder hacer esta busqueda


ESTE ES EL CODIGO MXML

Código :

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="*" layout="absolute" creationComplete="srv.send()">

   <mx:Script>
      <![CDATA[

      
   import video;
   import mx.rpc.AbstractInvoker.*;
    import mx.messaging.*;
    import mx.messaging.datos.*;
    import mx.messaging.events.*;
    import mx.messaging.MessageAgent.*;
    import mx.messaging.Producer.*;
   import mx.rpc.events.*;
   import mx.collections.ArrayCollection;
   import mx.managers.PopUpManager;
   import mx.containers.Window;

      [Bindable]  
        public var datos:ArrayCollection;
        private function resultHandler(event:ResultEvent):void     
    {
        datos = new ArrayCollection(event.result.datos.nombre);
   }        
        public var SelectedItem: Object;
        private function doPrint() {
            var pj : PrintJob = new PrintJob();
            if (pj.start() != true) return;
            pj.addPage(areadetexto);
            pj.send();
            delete pj;  
   }        
        private function copyToClipboard(e:Event):void{
            System.setClipboard(this.areadetexto.text);
   }   
      public   function getPopup() {
      var ref=PopUpManager.createPopUp(this, video, true);       
   }
]]>
    </mx:Script>
   <mx:HTTPService id="srv"  url="datos.xml" result="resultHandler(event)" useProxy="false">
   </mx:HTTPService>
      <mx:layoutConstraints>
         <mx:Anchor horizontalCenter="0" verticalCenter="0"/>
      </mx:layoutConstraints>
         <mx:Canvas width="630" height="440" id="intro" backgroundSize="100%">
         <mx:layoutConstraints>
            <mx:Anchor horizontalCenter="0" verticalCenter="0"/>
         </mx:layoutConstraints>
         <mx:TextInput x="5" y="19" width="150" id="inputText" height="32"/>

               <mx:Button x="523" y="393" click="doPrint()" id="button6" cornerRadius="0" height="40" icon="@Embed(source='BOTONES/Imprimir.gif')" width="42" toolTip="Imprimir"/>
               <mx:Button x="573" y="393" id="button3" cornerRadius="0" icon="@Embed(source='BOTONES/video2.gif')" width="42" height="40" toolTip="Video(s)"  click="getPopup()"/>
               <mx:TextArea x="160" y="71" width="305" height="363" measuredHeight="401"
                  measuredWidth="392" id="areadetexto" text="{datagrid.selectedItem.desc}" editable="false" wordWrap="true"/>
               <mx:Button x="159" y="19" width="35" height="32" icon="@Embed(source='BOTONES/ir2.gif')" cornerRadius="0" toolTip="Buscar" id="buscar"/>
         <mx:DataGrid
            id="datagrid"
            dataProvider="{datos}" 
            x="2" y="71" width="150" height="363"
            editable="false"
            toolTip="{datagrid.selectedItem.dato}">
            <mx:columns>
               <mx:Array>
                  <mx:DataGridColumn headerText="Lista" columnName="dato"/>
               </mx:Array>
            </mx:columns>
         </mx:DataGrid>
               <mx:Image width="148" height="162" source="{datagrid.selectedItem.imagen}" id="image1" horizontalAlign="center" visible="true">
                     <mx:layoutConstraints>
                           <mx:Anchor horizontalCenter="229" verticalCenter="-68"/>
                     </mx:layoutConstraints>
               </mx:Image>
            <mx:Button x="473" y="393" width="42" height="40" icon="@Embed(source='BOTONES/copear.gif')" cornerRadius="0" toolTip="Copiar" click="copyToClipboard(event)"/>
            <mx:TextArea x="212" y="21" width="403" backgroundAlpha="0" text="{datagrid.selectedItem.dato}" fontFamily="Arial" fontSize="17" color="#ffffff" id="label1" height="31" fontWeight="bold" borderColor="#004a25" borderThickness="0" editable="false" wordWrap="false"/>
         </mx:Canvas>
</mx:Application>


ESTE ES EL XML

Código :

<!-- edited with XMLSpy v2006 U (http://www.altova.com) by Tony Zilba (personal) -->
<?xml-stylesheet type="text/css"?>
<datos>
   <nombre dato="A orillas ">
      <desc>Libro de Edmundo, Roque, Francisco, José, Pedro, Víctor, Edgar, Ramón LeónLa edición fue de 1,000 ejemplares.</desc>
      <imagen>FOTOS/robot.png</imagen>
   </nombre>
   <nombre dato="Juan Andrade">
      <desc>Médico. Nació el 13 de mayo Forma parte del Cuerpo Académico.</desc>
      <imagen>FOTOS/patitofeo.jpg</imagen>
   </nombre>
   <nombre dato="Arias, Williams.">
      <desc>Maestro en Derecho nació el 24 de abril</desc>
      <imagen>FOTOS/robot.png</imagen>
   </nombre>
   <nombre dato="Francisco, Pedro.">
      <desc> Nació el 10 de abril. Ha sido profesor. Ha fungido como secretario.</desc>
      <imagen>FOTOS/robot.png</imagen>
   </nombre>
   <nombre dato="José General. ">
      <desc>Nacio el 14 de Mayo , Trabaja en contructora XXXX</desc>
      <imagen>FOTOS/patitofeo.jpg</imagen>
   </nombre>
   <nombre dato="Arcadio Perez.">
      <desc>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</desc>
      <imagen>FOTOS/robot.png</imagen>
   </nombre>
   <nombre dato="Alejandro, Manuel.">
      <desc>Licenciado en Física, maestro en Física Aplicada. Nació el 2 de mayo.</desc>
      <imagen>FOTOS/patitofeo.jpg</imagen>
   </nombre>
</datos>

Por stonyx

39 de clabLevel



 

firefox
Citar            
MensajeEscrito el 11 May 2006 03:53 pm
xml NO es base de datos, por que no usas base de datos de verdad?, te seria mas facil para hacer la busqueda y no estar cargando datos innecesarios...

saludos

Por Maikel

BOFH

5575 de clabLevel

22 tutoriales
5 articulos

Genero:Masculino   Team Cristalab

Claber de baja indefinida

firefox
Citar            
MensajeEscrito el 11 May 2006 07:25 pm
como te menciono arriba de esto no se mucho
pero se quese puede hacer una llamada al xml para que me muestre la respuesta de la busqueda mi pregunta entonces seria que es lo que se puede hacer para este.....mmmmm..... motor de busqueda que quiero ponerle a mi xml, me han hablado de PHP, MySQL, etc y he leido otro poco pero nada que me saca de la duda
GRACIAS

Por stonyx

39 de clabLevel



 

firefox

 

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