Flash Search Function
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Flash Search Function

  1. #1
    Junior Member
    Join Date
    Oct 2003
    Location
    nairobi, kenya
    Posts
    1

    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

  2. #2
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,746
    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

  3. #3
    Registered User Jimmiddi's Avatar
    Join Date
    Mar 2012
    Posts
    4
    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

  4. #4
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,746
    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

  5. #5
    Registered User Jimmiddi's Avatar
    Join Date
    Mar 2012
    Posts
    4
    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 ?

  6. #6
    Registered User Jimmiddi's Avatar
    Join Date
    Mar 2012
    Posts
    4
    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

  7. #7
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,746
    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

  8. #8
    Registered User Jimmiddi's Avatar
    Join Date
    Mar 2012
    Posts
    4
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center

Poll by Flashkit.com