2 Replies Latest reply on Aug 22, 2006 2:28 PM by enginpost

    Load Data from Text File

    Non-profiteer
      Hi all,
      Briefly -- I'm using Flash 8 Professional and I need to load data From a .txt file INTO an action script object. I tried following the steps outlined here: http://www.visualxtreme.com/flash_tut1.html
      but failed to get results. Any ideas?

      More Detailed description: I have a map with 10 locations. when the user rolls over one of these locations, part of the map, which is a blank box to begin with, should be filled with information specific to that location, and should pull this information from a text file, hardcoding is not an option. So I think I need to use the onRollover function in conjunction with LoadVariables but don't know how.

      Thanks in Advance!
        • 1. Re: Load Data from Text File
          MotionMaker Level 1
          >> I tried following the steps outlined here: http://www.visualxtreme.com/flash_tut1.html
          Be sure you do not also give the TextField an instance name. I believe that negates using a variable.
          Be sure the capitalization of the variable textfield is matched in the properties window with the text file.
          The text file should have textfield=yadda the message blah blah without line breaks.

          Personally the variable name textfield is a bad name choice. I would just call it data or anything other than something that resembles a Flash keyword.

          >>More Detailed description: I have a map with 10 locations. when the user rolls over one of
          >> these locations, part of the map, which is a blank box to begin with,
          >> should be filled with

          This is a timing issue to have a rollover depend on data communication response; i.e., read a file from the internet and even the local drive.

          It would be better to preload the 10 pieces of data once and place them into the TextField when the mouse rolls over. This will require some Actionscript coding to accomplish.
          • 2. Re: Load Data from Text File
            enginpost Level 1
            try something like this under each button or movie clip you want to load some information:

            (actually the data retrieval should be fairly quick and asyncronous and the code I am showing would blank out the info box and say something like "Information Loading..." while the code is getting the data)