4 Replies Latest reply on Jul 11, 2007 8:43 PM by Tony_CI

    Simple Lookup from Imported File

    Tony_CI
      Hi all,
      I've searched high and wide to find something about this, as I initially thought it was a 'simple' request. As a last resort I've decided to post a topic about it in the hope it can be achieved (I didn't know whether to post on here or on the Data Integration forum)...
      Basically, I have a data file (it is a CSV at the moment) with two/three fields - ID number, first name and surname.
      What I want to do is have an opening screen with an input field where they put in their ID and hit go, then once they've hit the go button, the next screen is another text box with their first name and surname on it. I thought that was pretty simple stuff, but its turning out to be more complicated than I first thought. All that we're doing is taking the number they input and matching it to their name and surname.
      Could someone please shed some light on how this would be achieved? Or point me in the direction of tutorials that may solve my problem. I'm using Flash MX Pro 2004 if it helps.

      Thanks in advance for your time and patience!!
      Regards,
      Tony
        • 1. Re: Simple Lookup from Imported File
          kglad Adobe Community Professional & MVP
          use the loadvars class and its load method to load your csv file and use the onData method of the loadvars class and the flash string methods to parse your csv file.
          • 2. Re: Simple Lookup from Imported File
            Tony_CI Level 1
            Thanks for your response.
            I have managed to load the CSV from a URL using loadvars and, without meaning to sound like a total rookie, still am having trouble getting a text box to display the data, let alone achieve a lookup function as detailed in the original post.
            Does anyone have any simple steps to achieve this?
            I am going to assume it involves firstly defining the columns (id, name, surname) first in some way.
            Thanks again in advance for your help

            Tony
            • 3. Re: Simple Lookup from Imported File
              kglad Adobe Community Professional & MVP
              assign your csv data to a variable, use the string methods to parse those data as you need and then display the parsed data in your textfield according to your needs.
              • 4. Re: Simple Lookup from Imported File
                Tony_CI Level 1
                Hi there, I don't mean to sound like a pain in the arse, but is it possible that you could explain it in 'baby steps' possibly with some examples of scripting?
                I have done something like this in Director about 4 years ago, and it is so frustrating I can't get it to work in Flash. Thanks very, very much

                Tony