Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Adriano Gois

Sistema De Busca

Recommended Posts

e não venhão me dizer que aqui no forum tem porque ja procurei nele todo

 

galera to precisando de um sistema de busca para flash utilizando um xml com banco de dados onde o resultado vai ser o titulo, autor, texto e link para os arquivo que estão na pasta arquivos, ja vi vários tuto na net mais nenhum dessa foma, ela só precisa ter a caixa de busca e os intem caso você queira procurar por titulo, autor ou texto acrédito que seja simples mais como estou no inicio de flash isso ta sendo um terror

 

vou postar alguns link que eu vi em foruns e no google mais n me serve

 

http://imasters.com.br/artigo/4265/flash/busca_em_array/

 

 

http://imasters.com.br/artigo/4915/fla...olecao_de_flas/

 

http://www.google.com.br/search?hl=pt-BR&a...busca&meta=

 

vi todos esses do google e nenhum funcion da forma que eu quero se alguem poder me ajudar eu agradeço muito

Compartilhar este post


Link para o post
Compartilhar em outros sites

Galera eu achei um muito bom mesmo

 

o AS dele é esse ta muio bom mesmo mais queria v se você oderiam me ajudar no resultado de busca dele tipo ele seleciona e cria o link beleza até ai tudo bem, teria c mudar tido na buca do xml tem Titulo, Autor e Texto teria como colocar cada um desses de uma cor no resultado da busca.

 

artigo:

 

http://www.kirupa.com/web/xml/examples/searchbestof.htm

 

arquivos

 

 

Sistema de Busca arquivos completos

Compartilhar este post


Link para o post
Compartilhar em outros sites

QUANDO CLICO P ELE FAZER A BUSCA ELE ME RETORNA O Titulo, O Autor e O Texto E CLARO O LINK DO ARQUIVO PARA Q EU POSSA CLICAR E ABRIR OK? ESPERO Q ATÉ AI TUDO BEM.... SO QUE TODO O TEXTO VEM DA MESMO COR CINZA CLARO MENOS O LINK ENTENDEU? QUERIA Q O TITULO FOSSE EXIBIDO DE OUTRA COR TIPO

 

Titulo FOSSE DE UMA COR ( SEI LA VERMELHO )

Autor DE OUTRA e Texto PODE FICAR DO JEITO Q TA

O LINK TABEM TA BOM ELE FICA DE AZUL BEM DESTACADO P você VER Q ELE É UM LINK ENTEDEU?

 

 

OUTRA COISA Q DESCOBRI ELE N CADASTRA MAIS DE 14 ARQUIVOS NA BUSCA HEHEHE... AI COMPLIQUEI, MAIS TUDO BEM ESPERO Q você POSSAM ME AJUDAR A RESOLVER ESSE PRO TB CASO A GENTE CONSIGA VAI SER UM ÓTIMO MATERIAL PARA TURMA QUE BUSCA UM SISTEMA DESSE PARA BUSCA INTERNA EM SITE FLASH USANDO UM XML COMO BANCO

Compartilhar este post


Link para o post
Compartilhar em outros sites

Galera eu achei um muito bom mesmo

 

o AS dele é esse ta muio bom mesmo mais queria v se você oderiam me ajudar no resultado de busca dele tipo ele seleciona e cria o link beleza até ai tudo bem, teria c mudar tido na buca do xml tem Titulo, Autor e Texto teria como colocar cada um desses de uma cor no resultado da busca.

 

----------------------------------------segue ai o AS do flash bestof_search.fla

 

String.prototype.contains = function(searchString){

return (this.indexOf(searchString) != -1);

}

Array.prototype.contains = function(searchValue){

var i = this.length;

while(i--) if (this == searchValue) return true;

return false;

}

 

SearchXML = function(nodes, query, useChildElements){

var results = [];

for (var i=0; i<nodes.length; i++){

for (var j=0; j<nodes.childNodes.length; j++){

currNode = nodes.childNodes[j];

if (useChildElements.contains(currNode.nodeName)){

if (currNode.firstChild.nodeValue.contains(query)){

results.push(nodes);

break;

}

}

}

}

return results;

}

 

ElementsToSearch = function(){

var childElementsToSearch = [];

if (search_fields.title_check.checked){

childElementsToSearch.push("Titulo");

}

if (search_fields.author_check.checked){

childElementsToSearch.push("Autor");

}

if (search_fields.message_check.checked){

childElementsToSearch.push("Texto");

}

return childElementsToSearch;

}

 

DisplayNodes = function(nodes, field_txt){

field_txt.htmlText = "";

var entry;

var separator = "<br>_______________________<br><br>";

for (var i=0; i<nodes.length; i++){

entry = "";

entry += "<br>"+ nodes.childNodes[0].firstChild.nodeValue +"</br>";

entry += "<br>Escrito por: "+ nodes.childNodes[1].firstChild.nodeValue;

entry += "<br>"+ nodes.childNodes[2].firstChild.nodeValue;

if (nodes.attributes.url.length){

entry += "<a href='" + nodes.attributes.url;

entry += "'><font color='#0000FF'><br>Cluique aqui para conferir...</font></a>";

}

field_txt.htmlText += entry + separator;

}

}

 

search_highlight = new TextFormat();

search_highlight.color = 0xFF0000;

search_highlight.italic = true;

 

HighlightOccurences = function(str, field_txt, format){

if (!str.length) return (0);

var start = field_txt.text.indexOf(str);

var end = start + str.length;

while (start != -1){

field_txt.setTextFormat(start, end, search_highlight);

start = field_txt.text.indexOf(str, end);

end = start + str.length;

}

}

 

 

var posts_xml = new XML();

posts_xml.ignoreWhite = true;

posts_xml.onLoad = function(success){

if (success){

search_fields._visible = true;

}else results_txt.text = "Erro ao carregar XML ";

}

search_fields._visible = false;

posts_xml.load("bestofposts.xml");

 

search_fields.title_check.title_txt.text = "Titulo";

search_fields.author_check.title_txt.text = "Autor";

search_fields.message_check.title_txt.text = "Texto";

 

search_fields.search_btn.onRelease = function(){

if (search_fields.query_txt.text.length < 3){

results_txt.text = "Por favor, use um termo de pesquisa com 3 ou mais caracteres .";

return (0);

}

 

var searchElements = ElementsToSearch();

var nodesWithQuery = SearchXML(

posts_xml.firstChild.childNodes,

search_fields.query_txt.text,

searchElements

);

 

if (nodesWithQuery.length){

DisplayNodes(

nodesWithQuery,

results_txt

);

}else{

results_txt.text = "Não há resultados para "+search_fields.query_txt.text+".";

return (0);

}

 

HighlightOccurences(

search_fields.query_txt.text,

results_txt,

search_highlight

);

 

scrollbar.setScroll(0);

}

 

scrollbar.setTarget(results_txt);

 

 

 

 

 

----------------------------------------e aqui vai o bestof_search.xml

 

 

 

 

<?xml version="1.0" ?>

<bestof url="http://www.kirupaforum.com/forums/forumdisplay.php?f=12">

<post url="http://www.kirupaforum.com/forums/showthread.php?t=43216">

<title>xml menu DONE </title>

<author>hga77</author>

<message>

<![CDATA[Happy New Year kirupa....Hope all you ppl had a great year and didnt stick to flash too much

 

Anyways I just managed to finish the xml menu i've been working on...

 

I've attached it here incase any1 needs something like this. Use it as you like. Let me know if you make any additions to it

 

UPDATE(04/2004): you can find v2 for this menu on page 3 post #31

UPDATE(07/2004): you can find v3 for this menu on page 15 post #221]]>

</message>

</post>

<post url="http://www.kirupaforum.com/forums/showthread.php?t=51430">

<title>Howd he do this? Resizing slideshow</title>

<author>niki</author>

<message>

<![CDATA[http://www.podlob.com/

click on #1. under "flash Research"

 

Ive tried searching these forums for resizing and slideshow but dont get what im looking for.

 

Im trying to learn how to build a thumbnail gallery that when you click on the thumbnail the photo will load in an empty movie clip and the emptymovieclip will resize itself to the size of the photo.

 

i guess i dont know what its called. but that link is pretty much what im looking for if I could turn those little numbers hes got there into thumbnails....]]>

</message>

</post>

<post url="http://www.kirupaforum.com/forums/showthread.php?t=40686">

<title>Flash Drawing Board (MX)</title>

<author>jhaertel</author>

<message>

<![CDATA[Hi,

 

first of all: great Forum! great Site!

 

I came across the Flash MX Drawing Board Tutorial (http://www.kirupa.com/developer/actionscript/drawingboard.htm) and want to integrate it into a "Tactic Board" Application for a Team-Handball Website (I'll post links as soon i got further).

 

The Users could use the draw feature to create custom arrows etc.

 

Now my question:

 

Is there a practical way to "smoothen" the drawn lines? Like you can do inside Flash to get rid of those ugly "zig-zag" drawings.

 

I hope i made myself clear enough ... if not ask.

 

THANKS!]]>

</message>

</post>

<post url="http://www.kirupaforum.com/forums/showthread.php?t=27214">

<title>Scroller by Claudio</title>

<author>blah-de-blah</author>

<message>

<![CDATA[i was wondering if it were possible to use hte scrollbar component to scroll images rather than text. But instead of 1 image, lots of small images which could be linked to other stuff when you press it. Is this possible with the scrollbar componenet?! thx]]>

</message>

</post>

<post url="http://www.kirupaforum.com/forums/showthread.php?t=6924">

<title>Making The Flash Menu Go Awaaay!!!</title>

<author>pvoegele</author>

<message>

<![CDATA[i published a flash animation for my site. When I go to the page it loads correctly, but when I right click on the animation is displays a menu. How do I make that menu inactive? So that when it is clicked on, nothing comes up.

 

Is it something that I have to do when I publish???

 

I'm Clueless!!!!]]>

</message>

</post>

<post url="http://www.kirupaforum.com/forums/showthread.php?t=7594">

<title>I Need Help On Action Scripting</title>

<author>twalliewerty</author>

<message>

<![CDATA[i AM DOING A SCHOOL PROJECT AND I CANT FIQURE OUT HOW TO MAKE MY SHIP THAT IM BUILDING MOVE THE RIGHT WAY. I HAVE IT SO WHEN I PRESS UP IT MOVES UP AND WHEN I PRESS LEFT AND RIGHT IT ROTATES IT LEFT AND RIGHT. IM TRYING TO FIGURE OUT HOW TO MAKE IT MOVE FORWARD IN THE DIRECTION THAT IT IS ROTATED IN. I BASICALLY CANT FIGURE OUT HOW TO MAKE IT MOVE ALONG A SLOPE... HELP ME OUT PLEASE...]]>

</message>

</post>

<post url="http://www.kirupaforum.com/forums/showthread.php?t=6794">

<title>prototype preloader, use it</title>

<author>joyhost</author>

<message>

<![CDATA[How about a good prototype preloader?

U just type

It will show a loading bar and preload your movie into holder movieclip.

Just copy-paste this code to your first frame, first scene.

Then use in root or in an instance.

eg. mc1.loadhere(0,0,"pic1.jpg","pic1")

then the path of the loaded movie is _root.mc1.pic1

 

Maybe the code is a little bit dirty :x

If you have a question or suggestion.... post it!

[code=auto:0]

Make sure you run it in server enviroment just to see preloader, or using xat.com WebSpeed simulator (not advertising it)]]>

</message>

</post>

<post url="http://www.kirupaforum.com/forums/showthread.php?t=4009">

<title>relative mouse movement</title>

<author>Ibanez97</author>

<message>

<![CDATA[if (_root._xmouse>_level0.circle._x) {

_level0.circle._x = (_level0.circle._x+10);

} else {

_level0.circle._x = (_level0.circle._x-10);

}

 

 

this will make a movie follow the mouse ... how can I make the movie move

the same distance away from the mouse so that the two are lined up in the

middle but as I move the mouse to one side the movie travels and equal

distance to the other side. Any help anyone can give me would be great.]]>

</message>

</post>

<post url="http://www.kirupaforum.com/forums/showthread.php?t=30908">

<title>Photo Gallery into slideshow?</title>

<author>brooklyniteOne</author>

<message>

<![CDATA[using the tutorial found on this site here:

 

http://www.kirupa.com/developer/mx/photogallery.htm

 

How can I set the gallery to continuously display random images? Like a looping slideshow effect.]]>

</message>

</post>

<post url="http://www.kirupaforum.com/forums/showthread.php?t=49179">

<title>calendar help</title>

<author>snaxs</author>

<message>

<![CDATA[Hello.. is it possible to make a date calendar in flashmx???

and highlight the date??? as every day passess?????

 

for example..

 

s m t w t f s

1 2 3 4 5 6

7 8 9 10 11 12 13

 

 

thanks.]]>

</message>

</post>

</bestof>

 

 

Arquivos para download

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.