I am making an online game with AS2 and my method for storing the location of users is with a table with columns: name, x, y. The table has many rows.
I have a PHP script which makes a query in the DB for all x and y locations from -6x to +6x and -4y to +4y (Relative to the user).
If a user exists at that location, then they will be printed on a list that will end up looking something like this:
&username1=John&x1=16&y1=8&username2=Fred&x2=16&y2=9
I want to know how to make a loop which takes the information printed from the PHP script and use some sort of efficient loop to take username1, username2, username3, etc. and place them at the x and y positions listed. I will use the “loadVariables” function to get the variables from the PHP script.
The main thing that confuses me is how I am to make a loop which manipulates the variable name. I am thinking of using OO with which I can do username(1), username(2), etc. but I am not familiar with actionscript so it would be difficult.
What I am trying to do is complicated so it is difficult to explain. If you have any questions, please ask because I know what I am saying makes sense to me but possibly not to you. Thanks ahead of time for the help.
Edit:
With more research, I found out there is even more I need to know. If you can help me above or below please do.
I also need to be able to place an object from my library to the screen and when I did a search, I could not find how to do this. Can anybody link me to where I can learn this?
Thanks
-Matt (Taloton)