Results 1 to 4 of 4

Thread: Filtering Data in Flash

  1. #1
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Lightbulb Filtering Data in Flash

    Hi

    I've been developing a small application in flash using AS2.0. Generally the application accepts user input for product type and sizes, calculate the costs and display output of those calculated costs. Then I used a php script (running on localhost) to store the calculated costs with other associated info, such as operator name, date of calculation, etc. into a flat text file. So each entry takes a line of calculated data in that text file. I used '&' as delimiter for fields of each record.

    Now I need to include a search feature in my application. User will search among the stored data using certain keywords and if matching record[s] are found, then it should retrieve and display on flash application screen.

    I'm not sure if flash can handle it internally (i.e. to use loadVariable() to load into flash app and then search text string[s], or should I search that text file using a PHP script. What would make more sense for this case? I've been stuck here for a while since I'm pretty new to AS and PHP.

    I appreciate all your advice.

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Hey Ayate,

    Welcome to Dynamic Drive .

    What you say can be accomplished through AS through loadVars(). But, as you say it might not be the best way to proceed in this case. That operation would be really resource intensive with AS 2.0. If you were using AS 3.0, this might be a different question.

    But, I definitely recommend using PHP here. It will give faster results. Depending on how much more complicated your application is going to get, you might consider using something like AMFPHP. But, it doesn't seem like you'll be making that many server-related operations. You might also consider moving over to a database, if that's available to you.

  3. The Following User Says Thank You to Medyman For This Useful Post:

    ayate (07-29-2008)

  4. #3
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks Medyman. Yea I think I'll just find a way to search through the text file using a simple php script. Things will be easier that way since I just want to perform the keyword search, and pass my search results back into the flash app, right? If I used a database, I have to change everything from the beginning.

  5. #4
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    If I used a database, I have to change everything from the beginning.
    Yes, but it's minimal effort really -- 3 or 4 lines of PHP.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •