Search Not Working
there are two text boxes in a frame in my movie, one called d and one called s. a button called search_btn has also been created. the pepose is to enter text into the textbox s and then click the button search_btn to search for the text in the textbox d. i am using the actionscript below but nothing happens when the button is clicked.
onClipEvent (load) { stop(); /* d - is the instance id of the text field to be searched s - is the instance id of the text (input) field to be searched for search_btn - is the instance id of the search button placed in the frame with the text fields */
var begin:Number; // beginning index of search string var len:Number; // length of search string
TF = new TextFormat(); // text format for italic TF.italic = true;
btnListener = new Object(); btnListener.click = function () { begin = _root.d.text.indexOf(_root.s.text); // find the beginning of the string len = _root.s.text.length; // find the length of the search string d.setTextFormat(begin, begin + len, TF); // change the format of the located text }
search_btn.addEventListener ("click", btnListener); // listener for search button
}
FlashKit > Flash Help > Flash ActionScript
Posted on: 12-11-2003, 04:42 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Search Not Working
search not working
there are two text boxes in a frame in my movie, one called d and one called s. a button called search_btn has also been created. the pepose is to enter text into the textbox s and then click the button search_btn to search for the text in the textbox d. i am using the actionscript below but nothing happens when the button is clicked.
onClipEvent (load) {
stop();
/* d - is the instance id of the text field to be searched
s - is the instance id of the text (input) field to be searched for
search_btn - is the instance id of the search button placed in the frame with
the text fields
*/
var begin:Number; // beginning index of search string
var len:Number; // length of search string
TF = new TextFormat(); // text format for italic
TF.italic = true;
btnListener = new Object();
btnListener.click = function () {
begin = _root.d.text.indexOf(_root.s.text); // find the beginning of the string
len = _root.s.text.length; // find the length of the search string
d.setTextFormat(begin, begin + len, TF); // change the format of the located text
}
search_btn.addEventListener ("click", btnListener); // listener for search button
}
Search Not Working
there are two text boxes in a frame in my movie, one called d and one called s. a button called search_btn has also been created. the pepose is to enter text into the textbox s and then click the button search_btn to search for the text in the textbox d. i am using the actionscript below but nothing happens when the button is clicked.
onClipEvent (load) {
stop();
/* d - is the instance id of the text field to be searched
s - is the instance id of the text (input) field to be searched for
search_btn - is the instance id of the search button placed in the frame with
the text fields
*/
var begin:Number; // beginning index of search string
var len:Number; // length of search string
TF = new TextFormat(); // text format for italic
TF.italic = true;
btnListener = new Object();
btnListener.click = function () {
begin = _root.d.text.indexOf(_root.s.text); // find the beginning of the string
len = _root.s.text.length; // find the length of the search string
d.setTextFormat(begin, begin + len, TF); // change the format of the located text
}
search_btn.addEventListener ("click", btnListener); // listener for search button
}
Search String URL Not Working From Textfile
Hi all,
I've been trying to get this working for a couple days now, to no avail. I'm trying to imbed a mapquest link from a text file into a dynamic text field in Flash MX and it doesn't seem to be working. The area where the link would show up changes the mouse into the hovering-hand, but you can't click it, and no text that's after it in the text file shows up.
I've tried using escape(); to fix the ampersands in the search string, but to no avail. Here's the link I'm trying to embed :
http://www.mapquest.com/maps/map.adp...US&addtohistor
y=&searchtab=address&searchtype=address&address=ro ute+663+and+I-476&city
=quakertown&state=pa&zipcode=&search=++Search++
If I change it to http://www.mapquest.com it works just fine. I'm sure it's the special characters in there that are messing it up but I can't figure out how to fix it for the life of me.
Thanks in advance!
Search Not Working. External Text File Help?
I know this has been posted a million times, but go figure...when I really need to know how, i can't get the search to work.
Anyway, i need to know the best way to load text from an external file and use HTML formatting
i browse the tuts, and the only one i found didn't make any sense to me.
thanks for the help
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
Flash MX TabIndex Only Working With Text Fields, Movies And Buttons Not Working :(
hey, has anyone heard of this, is it a known bug, or am i doing something wrong?
im using the following code to tab index a page, with text fields, buttons and movies that i would like to highlight to the visitor.
arrTabIndex = new Array("butAddress", "movEmail", "txtCC", "txtTelephoneNumber", "txtMobileNumber", "txtSubject", "txtSubject", "txtRealName", "txtBody");
for (var Count = 0; Count < arrTabIndex.length; Count++) {
eval(arrTabIndex[Count]).tabIndex = Count;
//eval(arrTabIndex[Count]).tabEnabled = 1;
//eval(arrTabIndex[Count])._focusrect = 1;
}
my problem is, that if i include movie clips or buttons, the first in the series does focus and show the colored square but the tab key does not move the focus to the next object.
if i only include text fields, the tab key works as normal
is this a bug, or am i doing something wrong?
many thanks, in advance
clive
LoadMovie - Working In Debug Mode, Not Working Otherwise
Hello,
I have a main swf, which must load other 2 swfs (PHP data involved).
I made it work in debug mode, but in normal mode, a movie is not loading at all. What should I check to find the problem?
(the paths are OK)
I would be really thankfull if someone could help soon.
Thanks
Site Working Perfectly In A Server, Not Working In Other
Hi
I have a strange problem with a site I've done recently. It works perfectly in one server, but the same files don't work properly in some other server(both servers are Linux). The site loads correctly and all, and it runs fine for a while, but after you have clicked the buttons of the menu for 5 o 6 times the buttons doesn't load anything anymore. The rest of the movie runs fine, it's only the buttons that are supposed to load the sections (external swfs) that just do nothing.
See it for yourself:
Here the site works as it should:
http://www.avanzasoluciones.es/celeste
Here the buttons stop working after a while:
http://www.limpiezasceleste.com
I'll be glad to answer any question you may have regarding the coding of the site or anything that may lead to a solution.
Thanks for your time
Contact Form Not Working In IE But Working In Mozilla
got a problem that I just can't figure out.
I have a feedback that was working fine. Key word "was".
I added a frame in the form MC to include a Thank You screen. But then it stopped sending in IE, but works in Mozilla.
I tried taking the extra frame out but still doesn't work in IE anymore.
any suggestions?
button
Code:
on (release) {
form.loadVariables("email.php", "POST");
}
script on the php page
Code:
<?php
$sendTo = "alvin@diggy.com.au";
$subject = "Gisler contact";
$headers = "From: " . $_POST["name"] ." <" . $_POST["email"] .">
";
$headers .= "Reply-To: " . $_POST["email"] . "
";
$headers .= "Return-path: " . $_POST["email"];
$message = "Phone:" . $_POST["phone"] ."
Country: " . $_POST["country"] ."
Message: ".$_POST["message"]." ";
mail($sendTo, $subject, $message, $headers);
?>
Fading Text Only Half-working (so It's Not Working At All)
Here's one for ya...I'm making some fading text. I made a movie clip of the text and did the alpha tweening and all that, and when I play the clip on-stage, it works perfectily. However, when I run a movie test, the text does not fade in but rather just suddenly appears. This is also the condition when the graphic is loaded onto a webpage. Has anyone else seen this happen before and can tell me why this is happening? Thanks.
Full Screen Tiling Working, But Not Working Right?
am using bitmapdata to make me a nice lil' background image, and it works great...until it's resized. Whats happening is it's creating a new bgHolder clip on the resize, NOT resizing the current empty clip "bgHolder"
Here's the code(taken from various posts)
import flash.display.BitmapData;
#include "mc_tween2.as"
Stage.align = "TL";
Stage.scaleMode = "noScale";
var myListener:Object = new Object();
myListener.onResize = function() {
createBG();
};
Stage.addListener(myListener);
var bgHolder:MovieClip = _root.createEmptyMovieClip("bgHolder", _root.getNextHighestDepth());
var BG_LINKAGE:String = "bg";
function createBG():Void {
var tile:BitmapData = BitmapData.loadBitmap(BG_LINKAGE);
with (bgHolder) {
beginBitmapFill(tile);
moveTo(0,0);
lineTo(Stage.width,0);
lineTo(Stage.width,Stage.height);
lineTo(0,Stage.height);
lineTo(0,0);
endFill();
}
}
createBG();
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.
|