-
Flash Search Function
Hi
Am developing a Flash Directory that will hold many interactive company profiles.
I wanted to know whether its possible to have a search capability in the flash projector that can search its contents.
Any suggestions/links are welcome
Many thanks
Harrison Muya
-
Lifetime Friend of Site Staff
Create an index in an XML file that contains information about all the documents you want to search. Load the XML at startup and search the XML instead of all the files in your directory. When you find a document that meets your search criteria, allow the user to open that documen (or do whatever you like).
When your swf2exe tool just HAS to work
there's only one choice... SWF Studio
-
Registered User
Could you suggest a tutorial on setting up the search functionality ?
There is an old one which has been floating around for a while (on Models).
It's pretty good but it's AS1.
Is there a newer one utilising AS2 or 3 ?
thnx
-
Lifetime Friend of Site Staff
I doubt you'll find a lot of tutorials about doing this, but it's not that hard if you just break it down into simple steps.
Create an XML file that contains nodes that consist of file names and keywords, where the keywords describe the documents that you want to make searchable. Something as simple as this could work.
Code:
<files>
<file>
<filename>whatever.doc</filename>
<keywords>lorem ipsum dolor sit...</keywords>
</file>
<file>
<filename>document.pdf</filename>
<keywords>keywords extracted from the PDF or just entered manually</keywords>
</file>
</files>
Let the user type in some keywords.
Load the XML file and search for the best match between the keywords the user typed and the keywords in the XML.
Present the user with a list of files that matched their keywords and let them open that file.
The opening of the file can be done using one of the techniques described here over the years, whether that's a third party swf2exe tool or using something like my free proxy tool.
When your swf2exe tool just HAS to work
there's only one choice... SWF Studio
-
Registered User
Thnx Tim for your reply,
it's helpful and has given me an idea to get around the limitation of Flash's 'none cut and paste', by redirecting the link to open up in the default image viewer where the user can copy and paste, perhaps even crop or resize.
The project I'd like to build, is a ClipArt Dispenser. Where users can search, view and select pieces of art to use as clip art.
So I should have stated, 'Search Functionality with XML Database'.
Any tips for a novice on this one ?
-
Registered User
Ok - the XML file is the database which will have 100's of clipArt images in my clipArt project, defined by Artist & Category.
what I'd like to do is to..
:: have the user type into a single search input field,
:: then have Flash sift thru the XML by Artist & Category
:: then to load the image files within a grid like gallery.
There they'll be able to click on them for a larger view - if they want to use the image for clipArt then they click on the large image which will open the default image viewer for 'Cut & Paste' features, using FScommand.
I know there's a few elements to this but if you could help me sort out the search and loading then I think I should be able to get to the repeat load with a bit of research..
Thnx again
-
Lifetime Friend of Site Staff
Here is everything you need to get up to speed with loading and manipulating XML in Flash.
When your swf2exe tool just HAS to work
there's only one choice... SWF Studio
-
Registered User
Ok thnx - I'll get into his pages and hopefully come out the otherside wiser
Your assistance is appreciated!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|