XML Search
I've got this code to save my feed as a useable list but I want to search the feed and only display those with a certain tag in <media:category> Code: private function onResult( event : ResultEvent ) : void { var pattern : RegExp = /media:/; var string : String = event.result as String; while( string.search( pattern ) >= 0 ) { string = string.replace( pattern, "_" ); } var data : XMLList = (new XML( string )).channel.item; list.dataProvider = data; loadingData = false; } The feed: Code: <rss version="2.0">− <channel><title>Pictorio.us Photo Pool</title><link>http://www.flickr.com/groups/399382@N22/pool/</link>− <description><a href="http://www.Pictorio.us">www.Pictorio.us</a> is an interactive guide to digital photography. Share your learning experiences!</description><pubDate>Sat, 5 May 2007 15:16:49 +0000</pubDate><lastBuildDate>Sat, 5 May 2007 15:16:49 +0000</lastBuildDate><generator>http://www.flickr.com/</generator>− <image>− <url>http://farm1.static.flickr.com/191/buddyicons/399382@N22.jpg?1178151823</url><title>Pictorio.us Photo Pool</title><link>http://www.flickr.com/groups/399382@N22/pool/</link></image>− <item><title>Brocko's Modern Life</title>− <link>http://www.flickr.com/photos/marcography/476050526/in/pool-399382@N22</link>− <description><p><a href="http://www.flickr.com/people/marcography/">Marcoolio</a> has added a photo to the pool:</p><p><a href="http://www.flickr.com/photos/marcography/476050526/" title="Brocko's Modern Life"><img src="http://farm1.static.flickr.com/227/476050526_d48f283613_m.jpg" width="240" height="161" alt="Brocko's Modern Life" style="border: 1px solid #ddd;" /></a></p></description><pubDate>Sun, 29 Apr 2007 00:14:56 +0000</pubDate><dc:date.Taken/><author>nobody@flickr.com (Marcoolio)</author>− <guid isPermaLink="false">tag:flickr.com,2004:/grouppool/399382@N22/photo/476050526</guid><media:content url="http://farm1.static.flickr.com/227/476050526_0d6c5b8337_o.jpg" type="image/jpeg" height="685" width="1024"/><media:title>Brocko's Modern Life</media:title><media:text type="html"><p><a href="http://www.flickr.com/people/marcography/">Marcoolio</a> has added a photo to the pool:</p><p><a href="http://www.flickr.com/photos/marcography/476050526/" title="Brocko's Modern Life"><img src="http://farm1.static.flickr.com/227/476050526_d48f283613_m.jpg" width="240" height="161" alt="Brocko's Modern Life" style="border: 1px solid #ddd;" /></a></p></media:text><media:thumbnail url="http://farm1.static.flickr.com/227/476050526_d48f283613_s.jpg" height="75" width="75"/><media:credit role="photographer">Marcoolio</media:credit><media:category scheme="urn:flickr:tags">birthday ireland band belfast brock 36 crazyfists pictorious</media:category></item></channel></rss> So in pseudo SQL code I want to:SELECT * FROM feed WHERE media:category=mySearchVariableSo how would I do this to my XMLList?something like:for each XMLList item{ if data._category = mySearchVariable { add item to new XMLList }}? :-[
KirupaForum > Flash > ActionScript 3.0
Posted on: 05-05-2007, 12:58 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Senocular XML Search Tutorial (search Query Case Sensitive)
Hi
I've just tried senocular's xml tutorials.
http://www.kirupa.com/web/xml/examples/searchbestof.htm
The search query seems case sensitive. How to make it accept upper and lower case characters. Actually i'm trying to make a search by myself by using the same code.
Senocular XML Search Tutorial (search Query Case Sensitive)
Hi
I've just tried senocular's xml tutorials.
http://www.kirupa.com/web/xml/examples/searchbestof.htm
The search query seems case sensitive. How to make it accept upper and lower case characters. Actually i'm trying to make a search by myself by using the same code.
Search Engine -user Can Search His Pictures With Keywords- HELP
I was reading about search engines and I came across a post. Being fairly new to flash I do not know how to develop this. I have a client who owns a small furniture store. I am setting up his site. He wants it to be all flash based. He has about 300 pictures of his products.I need to make a search engine in Flash so that the user can search his pictures with keywords. I read a suggestion that would fit my needs- create an array of picture names then use a loop to check if the keyword is in the array. I have been going through tutorials with no luck- can someone please help. Maybe start the code the person is talking about so I can just expand on that.
Search Flash Content In Search Engines
Do you have any experiance how to optimize flash site for search engines?
If swf contains text an links, how can i constrain search engines like Google,... to find this?
Thanks
Search Flash Content In Search Engines
Do you have any experiance how to optimize flash site for search engines?
If swf contains text an links, how can i constrain search engines like Google,... to find this?
Thanks
Flash Search Field - Atomz Search
I currently use Atomz for their search engine. A clients site as of now is all HTML, however I am buidling some flash elements which will incorporate a simple "search" field and submit button.
I will include the HTML, however I am unsure how to make a form in Flash to be able to include the hidden fields, etc. I hope this makes sense, and thank you in advance!
<form method="get" action="http://search.atomz.com/search/" name="search">
<input name="sp-q" class="textbox" id="sp-q" value="Search" size="15">
<input type="hidden" name="sp-a" value="sp1002ad5d">
<input type="hidden" name="sp-p" value="all">
<input type="hidden" name="sp-f" value="ISO-8859-1">
<input type="submit" name="Submit" value="Submit">
</form>
If someone could create a small file, or let me know where to place what code where, please let me know. Any help is greatly appreciated! As well, if you have paypal, I can send a little something for the help!
Search Help Text Search In Flash
Hello, i'm realy stuck, and I need help... read dead end , i need to make a search on my site in flash, and also i need to explain ... what i need , example, whole site is in flash, and i need when someone wonna to find something just type word or sentence and then find on my site, but not google find or something like that... i wonna something easy, like CTRL + F, but label with find button... if anyone can help me or give me a guide i will be so happy, so thanks
sorry for my english... I hope it's readable )
No Search On Search Engines How To Do It
i i made some sites of well known people a site for their family party and they do not want all the world to see it just friends how can i have it on the net and stop the search engines from finding it
i saw it once one can code in no search or no index or something ,does anyone know
id appreciate it
thanks
faith
What To Search For
This my first post. I would like to try and find the answers to my specific questions via the site knowledge base, but I am unsure of the exact words to use for my search. I am the consumate "gotta figure it myself" person. I want to create a series of text buttonsin a table that when on a mouse rollover or maybe click, another cell in the table shows text. What is this exactly called? I did find a good tutorial that explained the process of making the button and applying actions. I am confused on how to make a series (10-15) of different text buttons to all show at the same time, but only to show the correstponding text when there is a click or rollover in the same seperate table cell.
I hope that I explained that alright. I just need a push in the right direction.
Thanks in advance.
Search - Is It Possible?
Hi,
I need to know if this is possible or not...
There are 300 (for example) *.jpg and *.txt files like clip1.jpg, clip1.txt, clip2.jpg, clip2.txt....... The *.txt file includes some information like;
clip1.txt
---------
QT=1
&RP=0
&MP=0
&Name=Wales
&Info=Here will be the description of the picture mostly in one paragraph.
-----------
What I need to do is make a search within all those *.txt files and take the result to Flash to show related pictures in Flash. To read all of those *.txt files takes a long time with Flash and I also do not know if it is possible to make a search within the variables in a fast way.
If I make all of them only one file then it will be a *.txt file around 50-60 Kbyte and like;
clips.txt
---------
QT1=1
&RP1=0
&MP1=0
&Name1=Wales
&Info1=Here will be the description of the picture mostly in one paragraph.
QT2=0
&RP2=1
&MP2=1
&Name2=My Cats
&Info2=Here will be the description of the picture mostly in one paragraph.
QT3=0
&RP3=1
&MP3=0
&Name3=White Flowers
&Info3=Here will be the description of the picture mostly in one paragraph.
........
....
.
-----------
What I need to know is if it is possible to use something outside that Flash can get the list of related picture files?
Any ideas or suggestion will be appreciated...
Thank you...
Is There A Search Possible?
So i've got new problem...
I have 2 build up a little search in my flash page... so i could write in the keyword, for example "bla bla", submit it, and getting my bla bla.swf loaded. Is it possible? Plz help, who knows something about it... Even if You think, or are informed that kind of search is not possible, plz let me know, so i wont try 2 make things out no mo...
Thank You
Don't Know How To Search For It...
Here's what I want to do:
Make a test that has multiple choice answers. When the test is completed, the score is totalled and the user sent to a page (explaination of what the score means) based on the value of the score.
I have seen flash movies do this and although I'm asking on the newbie board, I've been using Flash for a couple of years now but only for basic presentation type of movies. In other words, I'm a newbie to this area of flash. Where do I begin looking? I was trying to find a tutorial but I don't know what to look for. OR, if you know how I can do this, I would greatly appreciate it.
Search XML
Can anyone post a code that will allow me to search an XML..
The XML contains the following data..
First and last name (1400 of them)
with arg1="student number"
I have an xml viewer which displays all of the in the XML
I just need a simple code that will allow the data to be pulled based on arg1="their student number or first and last name"
If you can help..I appreciate it
thanks@!!
Search Help
Hi
This is GugZ again
I just want to know how to link my search from my website to some well known search engines. i have a dynamic input text box and button 'search'. how can search things in the net by entering something from my website. its pretty simple I feel but I dont know how to do.
Please help.
regds
GugZ
INDIA
Where To Search
i need one software which convert my text file from ansi to unicode.
where i search for it.
is there any forum which help me.
thanks
Search Box
I was wondering. I'd like to create a search box for my site on my flash naivation. Does anyone have any idea where i should start to creating one? Can actionscript do the trick to search only my site?
Search Box
I was wondering. I'd like to create a search box for my site on my flash naivation. Does anyone have any idea where i should start to creating one? Can actionscript do the trick to search only my site?
Search Box
I was wondering. I'd like to create a search box for my site on my flash naivation. Does anyone have any idea where i should start to creating one? Can actionscript do the trick to search only my site? using flash mx
Best Way To Search?
Hi there folks
I'm putting together an art history database where users should be able to search all entries for text strings. How would you suggest doing it?
The plan is for each entry to be loaded from external txt files (loadVariables) when called. I wanted to avoid hardcoding all the text in as it will be constantly added to (there are over 100 articles so far), but a search function would be invaluable, so if necessary I'll do it that way.
But I'm sure someone must know a nifty way of doing it...
Any ideas gratefully received
cheers
andy
Search
Hi,
I dont know how to make a search option, I already made the input text field, but how can I make that when you enter a word, that you get search results from over the whole site?
tnx in advance
>>> Search Box
Could somebody tell me how to put a search box onto the site and actually work so when the user types in a keywoard matching something in the movie that scene (page) will appear?
Search
Hey all
I wrote a search function, to find a single word in a text box ... but I can't seem to figure out how to make it search for the same word in two or more different sections
Example:
"This is some text in my text box ... I want the text word to be searched for and find word 'text' in each instance"
In the above sentance there are 4 instances of the word "text"
When I run my search function it only selects the first instance ... I want to be able to have the function highlight each instance when you click the search button again and again ....
Get it ... its like a normal search engine on the browser ...
code:
startP = text1.indexOf(searchWord);
if(startP != -1){
endP = startP + searchWord.length;
Selection.setFocus(txt1);
Selection.setSelection(startP,endP);
}
Any one have any suggestions ...
I was thinking, I could make a variable that contains the number startP has ... and if the var = startP ... move on to the next set ... as if the first instance doesn't exist ...
I think that might work ... I don't think I really wrote it out in way you can understand ...
thanks for the help
Search Box
Is it possible to do search engine in flash? i.e say I have a site, you type in the name of a club into a search box, my site will then jump to a page thats within my site that has the name of the club. does that make sense?
XML Search
I am trying to produce a searchable phone list in flash mx 2003, so that the user types in the name of the person and their number is displayed.
Would importing XML be the best way of doing this and does any one know of some similar tutorials or resources that would be useful?
Any help would be grand
Jemes
Search
Hi All,
I want to creat a search engine and link it up with a database created with Microsoft Access. Can any one help out on how to creat the search engine and also how to link them up.
Thanks in Advance.
MX
Search
Hey there
If I was wanting to look up information on adding a search feature to my site, any suggestions on where to find the code and how to do it?
T.
3 Day Search
OK we have a problem here. I finally have hitTest down to a point.. However I am trying to make a character move over a certain spot in the map. Once the character hits the spot I want it to go to the next scene! Now the user will control the character using the left right and space keys... I think I have read 20 different pages on hitTest including Macromedias own site. They only offer info on hitTests with a mouse drag which I already know.
So with all of that said the main objective is to have my character walk over a certain point on the map which will make it go to scene 2 (called Level2).... Will someone PLEASE ease this stress on me. I am working for Newgrounds.com and I need to figure out how to do this action. It's driving me crazy! PLEASE SOMEONE HELP ME!!!!!!
B.D.Smith
Search Bar
I wanted to set up a search bar for our website, do I put it on the index page or flash and how do we do that. http://www.tsigold.com
Search Bar
How do you put in a search in a web sit. Like if someone wanted to search for an item on our site. http://www.tsigold.com
Search Bar
Ok, i have a input text box with variable name "qt". There is a button, and on it there is this action:
on (release) {
getURL("http://qt", "_top", "POST");
}
It gets whatever was written in "qt" and places it after http://, but, when the browser loads, it reads this:
http://qt/?qt=www%2Egoogle%2Ecom
so the browser doesnt load the page! what can i do?
Search
Hi everyone.
im doing a page, and i need to put a search engine on it, but this should work to find items in the page itself.
any help is wellcome.
Search
Hey guys i'm working on a project and was just wondering how i can make a little search box that would search my database and then print out the results. I would help me out alot if someone could help me with this.
How To Search?
I want to write a flash movie that basically serves as a music player. There is a search bar to search for a band, then a list that displays the available matching bands, then a list that displays the songs for a given band. Each text region has a button. I'm interested in learning how to search with it. Eventually it'll hook up to a database of some kind but for now just the basics would be helpful. Anyone know of any good tutorials?
[CS3] Search With Php
Hi
I'm trying to create a text file database that is searchable in flash and will display the results after the search.
I've read and downloaded the tuturial Search with PHP by Enygma. This is exactly what I am looking for but there seems to be some problems with the script that I can't figure out.
This is the script on the "submit" button: (from the original tutorial)
on (release, keyPress "<Enter>") {
if(count){
count=count;
}else{
count=0;
}
c = 5;
text.newoutput = "";
loadVariablesNum ("http://bender.phpdeveloper.org/flash/flash.php?input="+input, 0, "POST");
if(count){
for (a=0; a<5; a++) {
this = "blah"+a;
that = eval(this);
newa=a+1;
text.newoutput = text.newoutput+newa+" - "+that+"
";
}
number = count;
}else{
gotoAndPlay (4);
}
}
and from the PHP:
<?
#printf("foo=this+script+sucks");
$foo=file("stuff.txt");
$number=count($foo);
#printf($number);
$a=0;
$count=0;
$nothing="";
for($i=0;$i<=$number;$i++){
$blah=strstr($foo[$i],$input);
if($blah){
$next=str_replace(" ","+",$foo[$i]);
$next=chop($next);
#$next=str_replace("
","",$next);
$nothing.="blah".$a."=".$next."&";
$a=$a+1;
$count=$count+1;
}
}
printf($nothing."count=".$count);
?>
One thing I noticed is that you have to click on the submit button more than once to retrieve the information
you were searching for. I also noticed that after you attempt a second search for something different the original search results won't clear from the display window. The search seems to be case sensitive which I would like to change and also add a button to go back through the results that were already displayed.
I'm sure the script could be cleaned up some or use something completely differnet, i'm just not that experienced. I'm still in the learning phase with action script and any help would be appreciated. I'm using Flash CS3.
Mike
[F8] Search
Hai,
How to use search engine option in flash using actionscript?
because i search some text in entire flash file.
How?
Please reply me.
Xml Search
look at this tutorials http://actionscript.org/tutorials/be...nu/index.shtml
what changes can i make to add a search box so that the menu displays according to the user input OR do u know of any other tutorials that can do that ?
Search An Xml...
Hi everybody!
i'm in need of a tutorial on how to create a flash file were the user can search an xml document by typing in keywords in the flash document and it returns multiple results. Does anyone know of such a tutorial??
Have a great day!
Search
I want a form which sends a GET command to a site. Suppose the website is google.
This is what a have so far:
On frame 1:
a text box(called q) and a button that sends to frame 2
On frame 2:
the same except the action script is:
Code:
myVars.sendAndLoad("http://www.google.com/search", "GET", "_blank");
Search Bar And Log-in Bar.
Hello everyone. First off, moderators, I posted this in some older actionscript section by mistake, if you wouldnt mind removing that one or something, that would be great. I should introduce myself but I'm at school with not much time. I will deffinately stay at this forum though, so don't think i just want one answer then I'm outta here.
Anyway, What I'm trying to do is create a 'search bar' and a 'log in bar' in my flash banner. I have Flash 8 Pro and MX 2004 Pro so software isnt an issue. I'm still an amateur at flash but I really wanna get better so any help you may give would be greatly appreciated.
btw, you can see the design I'm talking about HERE. that may help you understand more what I'm talking about.
Thanks,
Gianni
Search For A Tag In XML
I have an XML with the following format.
<widget type="basic_show" version="1.0.0">
<title></title>
<width>400</width>
<height>400</height>
<media><photo name="4-image002-3.jpg" public="1" uploaddate="1177937013">
<url>?cur=4-image002-3.jpg&aid=0</browseurl>
<thumb>http://192.168.0.254/uploadkey/images/photos/1_11/4-image002-3.jpg</thumb>
<description>desc</description>
</photo>
</media>
</widget>
is there any way to get the handle of the '<media>' tag directly without using the lengthy 'firstChild.childNodes[3].'... etc?
Because its not necessary that the three tags above the <media> tag always remain there.
Search
Does anyone know how to add a search to a flash site, and only reference to the site they are on? Thanks everyone!
Tweek
Search Box.
I need to make a list of links, which can be searched (preferably an active search), but instead of the links opening a window, I need each of the links to be able to fill X number of boxes with different variables.
So basically a list, which can be searched, and each link would set a list of variables.
Any ideas???
Thanks in advanced
Kelsey
Search The Map
Dear all,
I am making a map in which i am using a xml to load data in the xml.
a sample xml is
<XML>
<node id="0" x="255" y="205" caption="KKcrossing" ref="0" type="Cinema" linkTo="1_3"/>
<node id="1" x="330" y="220" caption="Sony Outlet" ref="2" linkTo="0_2" />
<node id="2" x="410" y="220" caption="PreetVihar" ref="1" linkTo="1_5_9" />
<node id="3" x="320" y="30" caption="Madhu Vihar" ref="0" linkTo="0" />
<node id="4" x="450" y="190" caption="S Mal Park" ref="1" type="park" linkTo="5_7" />
<node id="5" x="430" y="160" caption="Durga Mandir" ref="2" linkTo="2_3" />
<node id="6" x="430" y="300" caption="Bharti Public School" type="School" ref="" linkTo="2" />
<node id="7" x="530" y="160" caption="Narula's" type="Restaurant" ref="" linkTo="4_8" />
<node id="8" x="600" y="160" caption="Universal Pub Shl" type="school" ref="0" linkTo="7_14_15" />
<node id="9" x="460" y="220" caption="Ptl Pump" ref="1" linkTo="2_10" />
<node id="10" x="500" y="210" caption="Vishal Mall" ref="2" linkTo="9_12" />
<node id="11" x="530" y="240" caption="Coffee Home" ref="" linkTo="12" />
<node id="12" x="530" y="230" caption="Club" ref="1" linkTo="10_11_15" />
<node id="13" x="630" y="340" caption="Radhu" ref="" type="Cinema" linkTo="11_15" />
<node id="14" x="620" y="140" caption="Engineering College" type="school" ref="" linkTo="8" />
<node id="15" x="610" y="220" caption="Luxmi Nagar" ref="" linkTo="8_12_13" />
</XML>
in this attributes x, y caption and ref refer to the locatons. Attribute "linkTo" value is array of linked nodes eg in node id=15, liinkTo value is 8_12_13 means it is conneted to node 8, 12, and 13.
Now to find the path i uses this linkTo attribute value and searches for the id of the destination. If it is not found then i uses these ids as refrences and then searches at next level.
I wrote following functions:
//function that evaluates the adjacency of two nodes
//a = reference to first node
//b = reference to second node
function adjacent(a, b) {
if (a == b) {
trace("you are at the destination..");
return;
}
temp = new Array();
temp = mvals.firstChild.childNodes[int(a)].attributes.linkTo.split("_");
for (i=0; i<temp.length; i++) {
if (temp[i] == b) {
trace("adjacent:"+a+":"+b);
return (true);
} else {
return (false);
}
}
}
function showPath(from, dest) {
//listPath array stores the path to be travelled
listPath.push(from);
//resetAll function hides previous path
resetAll();
findPath(from, dest, "");
}
//findPath function accepts three params first two are the ID of the two nodes and third is the id of parent node /previous node
//from where we are coming to the node a.
function findPath(a, b, origin) {
if (adjacent(a, b) && origin == "") {
listPath.push(b);
return;
} else {
//resolve this
for (i=0; i<(mvals.firstChild.childNodes.length); i++) {
temp = new Array();
//mvalsis the XML object that stores data above shwn
temp = mvals.firstChild.childNodes[int(a)].attributes.linkTo.split("_");
for (j=0; j<temp.length; j++) {
if (adjacent(temp[i], b)) {
listPath.push(temp[i]);
return;
} else {
findPath(temp[i], b, a);
}
}
}
}
}
can any one please debug the "findPath" function so that I can use it
Thanks in advance
If required I can send the flas too.
Amit
How To Use Search
Use Flash Pro 8. I want to search through all the ActionScript for the document for a variable named GeneratedXML (defined somewhere in the document). So I go to Edit --> Find and Replace or Find Next. Neither can locate the "GeneratedXML". But I know there is indeed a variable named: GeneratedXML, because I can see it right before me. I just want to test the search function of this tool(Flash 8). I need do a lot of searching and location of a parameters, function names, etc.
Then how to use or do a search for a text in (the ActionScript) in Flash 8?
Thanks
Scott
Xml Search
I have implemeted Xpath search in flash .the xml contains more than 70000 lines(2 MB in size) and because of this the searching is very slow, and also the flash player gives the warnng message about the script making the flash player slowly. Is there any way to make this warning message not to be displayed , or is there any way to make the xml search faster
Xml Search
I have implemeted Xpath search in flash .the xml contains more than 70000 lines(2 MB in size) and because of this the searching is very slow, and also the flash player gives the warnng message about the script making the flash player slowly. Is there any way to make this warning message not to be displayed , or is there any way to make the xml search faster
|