Welcome, Guest
  • Author Topic: Problem with ComboBox loading data from text file.  (Read 2087 times)

    Greg Ma

    • Server what's that
    • *
    • Posts: 4
      • View Profile
      • Email
    I'm using the ComboBox that loads data from a text file. For the project that I'm working on I am loading SWF's into another main movieclip depending on what the user selects.

    I can get the ComboBox to work no problem when it's running by itself and the data file is in the root where the HTML file is but as soon as I go to load the swf into the movieclip it can no longer find the data. I thought this would be a reference issue with the data file but I have changed the reference to the data file and it still cannot load the data. I've also noticed that if I put the data file in a folder and the swf file in another folder with the HTML file outside of both folders the swf file cannot load the data as well even when I change the reference to the data file.

    Thanks for the help.

    Flash-db

    • Administrator
    • Systems Administrator
    • *****
    • Posts: 1876
      • View Profile
      • Flash-db.com
    Re:Problem with ComboBox loading data from text file.
    « Reply #1 on: 07/16/02, 13:23 »
    Quote

    I put the data file in a folder and the swf file in another folder with the HTML file outside of both folders the swf file cannot load the data as well even when I change the reference to the data file


    This sounds a bit confusing - But just try an absolute Path (ie - http://www.yoursite.com/yourDataFile) - That should solve that.


    As far as:

    Quote

    I'm using the ComboBox that loads data from a text file. For the project that I'm working on I am loading SWF's into another main movieclip depending on what the user selects.


    I'm not sure how this would have anything to do with the combo box - data.  This would have to do with the Change Handler your working with when the user selects an item (some function to load the swf's) - and what path you specified in the text file.

    Anyways Path issue's are the most confusing - usually it's just a matter of playing around with them a bit.  If your still having trouble post some additional code here so work with that.  
    Flash-DB

    Greg Ma

    • Server what's that
    • *
    • Posts: 4
      • View Profile
      • Email
    Re:Problem with ComboBox loading data from text file.
    « Reply #2 on: 07/16/02, 18:10 »
    I have tried using an absolute path. It still will not load the data. I've played around with the target path to no avail. I'll keep trying.

    Greg Ma

    • Server what's that
    • *
    • Posts: 4
      • View Profile
      • Email
    Re:Problem with ComboBox loading data from text file.
    « Reply #3 on: 07/16/02, 18:13 »
    For some added info, if I run the swf file by itself (double clicking it) it finds the data and loads it in perfectly even if the data file is in a separate folder from the swf file. But as soon as I embed it into an HTML page it cannot find the data. I've tried using absolute paths and playing around with the path but still no luck.

    Flash-db

    • Administrator
    • Systems Administrator
    • *****
    • Posts: 1876
      • View Profile
      • Flash-db.com
    Re:Problem with ComboBox loading data from text file.
    « Reply #4 on: 07/16/02, 18:22 »
    Are both your SWF file and Data on the same server.  Their is a security restriction with the Flash Player that makes it impossible to load data into a SWF file from a file on a different server.

    You can get around this by a simple proxy script.  

    Was that the problem

    That is sort of what the problem sounds like - but It doesn't sound like that's what your doing?

    This technote goes over it a bit more:

    http://www.macromedia.com/support/flash/ts/documents/loadvars_security.htm
    Flash-DB

    Greg Ma

    • Server what's that
    • *
    • Posts: 4
      • View Profile
      • Email
    Re:Problem with ComboBox loading data from text file.
    « Reply #5 on: 07/16/02, 19:52 »
    Both the Flash file and the SWF file reside on the same server. I have exported out the example FLA file included in the zip and tried the same thing with it. I made two folders, one called Data and another called SWF. I moved the data.txt file into the Data folder and I moved the SWF file into the SWF file. The HTML file sits outside of both of these folders. I made an absolute path to the data file and when I load up the HTML it still cannot find and load the data file.

    If I have the data file and swf file in the root where the HTML file is it will work fine. I have racked my brain but for the life of me I cannot figure out what the problem may be.

    Thanks for the help.

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re:Problem with ComboBox loading data from text file.
    « Reply #6 on: 08/02/02, 07:00 »
    Hi,
    I think you are looking the wrong direction.
    After you put the form into clip, did you change the datafile to match the new variable path?
    I think there ist the problem.
    happy flashing
    8)
    Ronald

    duffi

    • Server what's that
    • *
    • Posts: 4
      • View Profile
      • Email
    Re:Problem with ComboBox loading data from text file.
    « Reply #7 on: 09/03/02, 11:28 »
    I'm having the same problem, and unfortunately i don't have the solution...after a long annoying day! macromedia do have a tech note on the issue but it is not very well explained...i still could'nt fix my problem, perhaps you will be able to.

    http://www.macromedia.com/support/flash_remoting/ts/documents/combobox.htm