array from txt?
- Started
- Last post
- 5 Responses
- rizingdamp
hi, im having a go at something in flash that i havent done in ages and its not working right, i think i have forgotten something, im trying to import an array from a txt file:
&maincats=["location","concept"]
but flash isnt seeing it as such, when i list variables its showing:
Variable _level0.maincats = "[\"location\",\"concept\"]"
any ideas
- rabattski0
drop the ['s and ",s.
- rabattski0
and duh also the ]'s
- rizingdamp0
okay, done that, if i have a bit of dynamic txt with the var: _root.catsmain[0] it should show up the first bit of data in the array?... well its not, i dont think flash knows its an array - i thought that was what the [ ] were for, (I'm aware that ive changed the changed the name of the variables by the way so thats no the problem)
i had all this down in a folder of notes from years ago but ive gone and lost it damit
- JamesEngage0
TEXT FILE
&myVariables=1,2,3,4,5FLASH
myVariablesArray = myVariables.split(",")
- rizingdamp0
thats it... nice one guys