Best way to import external text in Flash
Posted on 2007-12-05
Currently, we are using 15 spreadsheets to edit the data. We are creating a new EXE to manipulate the data in arrays in Flash 8 Pro. We will eventually use Flash CS3/Flex to manipulate the text.
I think the best method of importing the current data is to export the spreadsheets to a .TXT file and save into a string and manipulate the data then. However, when I export the spreadsheet to a tab-deliminated file, it seems to miss the initial tabs on the first row and only sees the last tab on the second row.
The example of the file is as follows:
matID Benefit KPIs trueMatID KPICount KPI COUNTS
PFM_1 Test Text PFM_2 86 -
PFM_2 Test Text PFM_2 219 -
I have code that is the following:
tabPosition1 = textOnScreen.text.indexOf(Key.TAB);
Why does it not see the first tab location? Or what do I change so that it sees the first instance of a tab.
OR - is there a better way to import the spreadsheet data or a database solution for Flash? We are currently using Director and v12, but want to convert to Flash CS3/Flex soon.