I’m confused on as how arrays work… could someone help me?
Say I wanted to make an array for each employee, included are their names, last names, age, years of experience, and salary.
as far as my understanding goes, it would be like so:
myEmp = new Array ();
myEmp [0] = “George”, “Lakeston”, 36, 3, “$3,500.00”;
myEmp [1] = “Sally”, “Morganson”, 28, 1, “$2,000.00”;
myEmp [2] = “Trace”, “Brimer”, 20, 0, “$1,250.00”;
I’m imagining that if I had a mini search engine and wanted to find George Lakeston, I’d type in his name, make the submitted text in all lower case (how do I do that, btw?), then have it match with the appropriate array by using for command. at 0, it would try to match the modified submitted search, if 0 wasn’t it, it would do ++ until it finds a match.
ok so I can call the array by using myEmp [0] to return “George”, but what about the rest of the information on myEmp [0]?
At first I did:
myEmp [georgelakeston] = “George”, “Lakeston”, 36, 3, “$3,500.00”;
but that doesn’t work either…
btw, sorry if I’m using an older form of AS, I would be glad to learn the new or better ways. I am using flash 8.