Foros del Web » Creando para Internet » Flash y Actionscript »

AYUDA: Buscador en flash

Estas en el tema de AYUDA: Buscador en flash en el foro de Flash y Actionscript en Foros del Web. Saludos estoy haciendo un buscador en php pero el form de busqueda esta en un flash.. como hago para q lo q yo coloque en ...
  #1 (permalink)  
Antiguo 20/09/2007, 10:11
Avatar de T4ke0veR  
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
AYUDA: Buscador en flash

Saludos estoy haciendo un buscador en php pero el form de busqueda esta en un flash.. como hago para q lo q yo coloque en ese campo de texto sea enviado a mi sistema de busqueda
este es mi codigo
Código PHP:
on (release) {
        var 
"motto";
        
getURL("busca.php""_self""GET");
        
gotoAndPlay(2);

en motto q variable debo colocar para q lo q este dentro del texto box sea lo q envie!!!!
  #2 (permalink)  
Antiguo 20/09/2007, 11:17
Avatar de T4ke0veR  
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Re: AYUDA: Buscador en flash

disculpen q vuelva a escribir en mi mismo post .. solo quiera saber si al menos podrian darme un url donde se explique pq busco y no consigo... gracias
  #3 (permalink)  
Antiguo 20/09/2007, 11:25
 
Fecha de Ingreso: marzo-2006
Mensajes: 19
Antigüedad: 18 años, 1 mes
Puntos: 0
Re: AYUDA: Buscador en flash

Podría ser de la siguiente forma:

campo = campo.text; //el texto que ingresas para buscar

on (release) {
getURL("busca.php?campo="+campo, "_self", "GET");
gotoAndPlay(2);
}

Luego desde busca.php tendras que levantar la variable:

$campo= $_GET['campo']

Saludos,

Topicus
  #4 (permalink)  
Antiguo 20/09/2007, 11:55
Avatar de T4ke0veR  
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Re: AYUDA: Buscador en flash

anda... dejame probar y t cuento como me fue.. muachas gracias!!!!
  #5 (permalink)  
Antiguo 20/09/2007, 13:17
Avatar de T4ke0veR  
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Re: AYUDA: Buscador en flash

fiajte en los codigos
buscador.php
Código PHP:
<link href="estilos.css" rel="stylesheet" type="text/css" />
<!--<form id="form1" name="form1" method="post" action="">
  <label>
  <input type="text" name="s" id="s" />
  </label>
  <label>
  <input type="submit" name="enviar" id="enviar" value="Buscar" />
  </label>
</form>     -->
<?php include ('conect.php');
@
$s=$_REQUEST['s'];
        
$sql="SELECT articulos.nombre,
                     articulos.Id_articulo AS Id_articulo
             FROM articulos
             WHERE articulos.nombre LIKE '%$s%'"
;
        
$sql_exec=mysql_query($sql);
        
        
$sql2="SELECT noticias.titulo_noticias,
                     noticias.id_noticias AS id_noticias
             FROM noticias
             WHERE noticias.titulo_noticias LIKE '%$s%'"
;
        
$sql_exec2=mysql_query($sql2);
        
        
$sql3="SELECT nuevos.titulo_nuevos,
        nuevos.id_nuevos AS id_nuevos
        FROM nuevos
        WHERE nuevos.titulo_nuevos LIKE '%$s%'"
;
        
$sql_exec3=mysql_query($sql3);
        
        
$sql4="SELECT eventos.titulo,
        eventos.id_evento AS id_evento
        FROM eventos
        WHERE eventos.titulo LIKE '%$s%'"
;
        
$sql_exec4=mysql_query($sql4);

?>
        
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="azulgrs_tah">Articulos :</td>
  </tr>
</table>
<?php while($row=mysql_fetch_array($sql_exec)){?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="gris_tah_nrm"><a href="ficha_prod.php?Id_articulo=<?=$row['Id_articulo']?>">
      <?=$row['nombre']?>
    </a></td>
  </tr>
  <tr>
    <td class="gris_tah_nrm">ficha_prod.php?Id_articulo=
    <?=$row['Id_articulo']?></td>
  </tr>
<?php if (empty($row)){echo "No hay resultados compatibles";}?>
</table>        
        
<?php }?>        
<br />
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="azulgrs_tah">Eventos  :</td>
  </tr>
</table>
<?php while($row4=mysql_fetch_array($sql_exec4)){?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="gris_tah_nrm"><a href="p10_ev_01.php?id_evento=<?=$row4['id_evento']?>">
      <?=$row4['titulo']?>
    </a></td>
  </tr>
  <tr>
    <td class="gris_tah_nrm">p10_ev_01.php?id_evento=
      <?=$row4['id_evento']?></td>
  </tr>
</table>
<?php }?>
<br />
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" class="azulgrs_tah">Noticias  :</td>
  </tr>
</table>
<?php while($row2=mysql_fetch_array($sql_exec2)){?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="gris_tah_nrm"><a href="p10_nt_01.php?id_noticias=<?=$row2['id_noticias']?>">
      <?=$row2['titulo_noticias']?>
    </a></td>
  </tr>
  <tr>
    <td class="gris_tah_nrm">p10_nt_01.php?id_noticias=
      <?=$row2['id_noticias']?></td>
  </tr>
</table>
<?php }?>
<br />
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25">Novedes  :</td>
  </tr>
</table>
<?php while($row3=mysql_fetch_array($sql_exec3)){?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="gris_tah_nrm"><a href="p10_np_01.php?id_nuevos=<?=$row3['id_nuevos']?>">
      <?=$row3['titulo_nuevos']?>
    </a></td>
  </tr>
  <tr>
    <td class="gris_tah_nrm">p10_np_01.php?id_nuevos=
      <?=$row3['id_nuevos']?></td>
  </tr>
</table>
<?php }?>
<br />
busca.php
Código PHP:
<?php require_once('conect.php');

if (isset(
$_POST['enviar'])) {
extract($_POST);
    
header("Location: ficha_prod.php?Id_articulo=".$model."");
    exit();
    
}
?>


<td width="608"><?php include('buscador.php'?></td>
en el boton del formulario
Código PHP:
on (release) {
        
campo campo.text;
        
getURL("busca.php?campo="+campo"_self""GET");
        
gotoAndPlay(2);

Me esta dando undefine
  #6 (permalink)  
Antiguo 20/09/2007, 18:22
 
Fecha de Ingreso: marzo-2006
Mensajes: 19
Antigüedad: 18 años, 1 mes
Puntos: 0
Re: AYUDA: Buscador en flash

La verdad es que yo no coloco el codigo directamente en el boton, lo referencio a traves del nombre instancia, asignandole al evento onRelease una funcion , algo asi:

Código:
campo = campo.text;

boton.onRelease = function(){
         getURL("busca.php?campo="+campo, "_self", "GET");
        gotoAndPlay(2); 
}
Pone eso en el primer frame. Cualquier cosa postea de nuevo.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:29.