View Full Version : Search form in flash?
07-08-2002, 01:12 PM
Has anybody ever seen a flash search form tutorial or something?
here's what i want to do:
theres an empty text box
underneath it is a listbox (with scroller and all)
the listbox should contain upto 7000 entries (im worried if flash might hang or something )
now when u type something in the textbox ... say "New York" for example i want flash to do a search 4 that word throughout the 7000 entries and the list shrinks to show only the entries that have the word New York in them (so the listbox now acts as results box ....
is this possible? especially with this huge amount of entries? i can't link to a db or MySql or anything of the kind .. i need the swf to search inside itself (God it sounds like its gonna b a 5 meg swf or something !!)
07-08-2002, 01:25 PM
Hm... sounds interesting... :)
The only thing I can think of using for this project is the use of an array... I don't know how huge things the array will handle though...
Got any sample made already??? Is that just name field or is there something else??? Show me some examples of like 10 entries... How are you going to import that 7000 entries into the listbox??? You mean the text field with scroller when you said listbox, right??? Or is it MX thing??? If it is you are in the wrong forum, man... :p
Let me know...
07-08-2002, 01:31 PM
1. no i dont have any samples made thats why i'm here :(
2. i'll import it manually :(( all by myself
3. yes it's just a name field ... but i want it to b clickable (i.e. when u click it u load another swf.
4.yes i mean multi-lined text box with a scroller on the side / or the MX ready-to use listbox ... i have no problem using either of them
07-08-2002, 01:57 PM
> 1. no i dont have any samples made thats why i'm here <
Oh... It's okay... Start building one... and let me know when you have sample interface... :)
> 2. i'll import it manually ( all by myself <
Well... Isn't it copy and paste, as long as you have them typed somewhere... :p
> 3. yes it's just a name field ... but i want it to b clickable (i.e. when u click it u load another swf. <
So you want the HTML version serchable??? I think that's making is somewhat tough, eh??? :)
Good luck... and let us know the progress...
07-08-2002, 02:32 PM
Haven't gone through FMX yet... I'm just trying to move on to FMX myself...
Found this from the manual and it says 400 items are recommend maximum number in the listbox in FMX...
Thought I'd let you know...
07-09-2002, 09:18 AM
Geez... it took whole lot more than I thought... Moving to FMX isn't that easy... Many different things that confused me...
Anyways... Here is the sample that I made... Check it out at http://mywebpages.comcast.net/Cyan-Blue/Examples/listBoxXest.html
You better not ask me about the code... :p
I have about 400 lists in there to go over the example... and I don't know how you are going to do the job with 7000...
Good luck and let me know... :)
07-09-2002, 03:41 PM
hey Jason thats perfect
it's really great man
but i was wondering if it can b altered just 1 step further ...
could these items link to url's?
(actually i want to link them to another swf (load it - go to a specific frame inside it)
now i already have that code using LocalConnection ...
so is it possible that when i click on a name in the list it does that action or no?
Thank you so much 4 ur help and i'll understand if ur too busy 2 do all that
07-09-2002, 05:48 PM
Yeah... I remember that you said that needs to be buttons... and that is why I asked for the sample data... Without the proper database design, that's the best I was able to come out...
Anyway... You will see that the text field gets the value when any of the list gets clicked... You will have to reuse that value to call the file name... Good luck... :)
Would like to see the fla file for the array list shown if possible. Would be helpful for others.
07-09-2002, 07:39 PM
What do you mean by 'for the array list shown'???
Sorry. I guess I meant the example posted at
I am creating an extremely similar application and would like to see the behind the scenes. Thanks
07-09-2002, 09:38 PM
Um... So... you want my source file, right??? Okay... that will be five bucks... unless you find a magic key by yourself... :p Kidding... You see the disk icon right there??? That is the magic key to download... It's done in FMX... My first baby in FMX... :(
Thanks for the reduced rate and the magic key link. The source file is extremely helpful.
07-10-2002, 08:40 AM
could you please explain more ?
"Without the proper database design, that's the best I was able to come out...
Anyway... You will see that the text field gets the value when any of the list gets clicked... You will have to reuse that value to call the file name"
I don't understand that part ...
07-10-2002, 08:56 AM
Okay... Show me five entries that are going to be listed in the list box and corresponding filename you are going to open when clicked and I'll see what I can tell you with that example... :)
07-10-2002, 10:02 AM
say the listbox has 5 city names
each one opens a url by doubleclicking
or preferebly (which is my final goal) to make them open another adjacent swf and go to a specific frame inside it ... here's an swf that does that using local connection
so in the second case by doubleclicking they will go to
uscities.swf frame washington
uscities.swf frame new york
uscities.swf frame los angeles
africancities.swf frame cairo
uscities.swf frame atlanta
07-10-2002, 04:51 PM
First of all, the one that holds the name of the entry the user select is _root.lBox.getSelectedItem().label
All you need is to do the text manipulation with that value so that you can use that modified text into loadMoive() or getURL()...
For your first example... As soon as the user clicks on 'L', the listbox will show 'Los Angeles'... and as soon as the user clicks on that item, the actual text pops up within the text area, right???
Your problem right now is how to get rid of the space between two words... You will have to have that routine and your choice of function such as getURL() within the function retrieveValue(component) block...
For example,function retrieveValue(component)
_root.inputBox.text = _root.lBox.getSelectedItem().label;
//Have your space deleting routine right here... preferrably a function...
//Save that string without the space + ".com" to the variable called 'theURL'
}Not bad, huh??? :)
For your second example, it might be a bit harder to do because you will have one more item to deal with which would be the file name... I guess you will have something like uscities.swf, africancities.swf, asiancities.swf, europeancities.swf and so on, right???
First you will have to come up with a function that will actually find which file the selected entry belongs to... This might involve massive array checking routine because you've got like 7000 entries...
Once you've figured out the sequence, the basics will be the same as the previous one...
Good luck!!! :)
07-10-2002, 04:53 PM
Oh... forgot to mention another thing... I do not know how to do the double click within the listbox... I've skimmed through the manual and there isn't such method... (maybe I missed it...) So, you will need to come up with a custom handler to do the job...
And what is that localconnection thing you've sent to??? It wasn't doing anything... Did I miss something???
07-10-2002, 05:02 PM
the local connection file:
extract it all
u get 1 simple gray swf with 2 buttons
if u click on the 1st (upper) button it loads the other swf and jumps to frame 10 of it ... (the green swf)
btw: THIS FILE WAS TOTALLY MADE FROM A-Z BY BILLY T ... i didnt make it ..
as for everything else u mentioned its ... well very confusing to me :(
06-09-2003, 06:09 AM
Since the site is gone... :D
vBulletin® v3.8.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.