Hey, i’m making the online drag racing game: 2qRacing. I seem to have ran into a problem making the userList for the online chat community, im making the users PM’able, but there are several problems which are:
The clickable MC for the users dont add for each username online.
This problem I have I think is seemed to be caused by a array which is trapped inside the flash “FOR” loop. So if anyone knows how to pull this off, then heres my Action script code:
[Location: _root.userList]:
_global.users = new Array();
lv = new LoadVars();
lv.onLoad = function() {
fl = this.userList;
_global.users = fl.split(",");
c = users.length;
for (_global.i=0; i<c; ++i) {
duplicateMovieClip("pm", "pm"+i, 0);
setProperty ("pm"+i, _y, "30");
trace(users*);
}
};
lv.load("[http://68.102.62.109:8012/2qRacing/chat/testing.php](http://68.102.62.109:8012/2qRacing/chat/testing.php)");
Then heres the pm movie clips code:
[Location: _root.userList.pm]:
uname.text=_root.userList.bleh[1];
the things inside this movie clip is:
1 textbox (instance name: uname & and the variable: _root.userList.users[_root.userList.i])
… someone please help… if your wondering the code of the php to further help you then heres that also:
<?
require_once("db/db.php");
$userList = array();
$result = mysql_query('select * from c_users');
$numrows = mysql_num_rows($result);
while($row = mysql_fetch_array($result)) {
$name = $row['username'];
$room = $row['room'];
$userList["$name"] = "$name";
}
ksort($userList);
$list = implode(",", $userList);
echo "userList=";
echo "$list";
?>
And the SWF, and FLA are attached. Please help this is a very urgant situation.
CONTACT BY AIM IF YOU ALSO WISH TO HELP WITH MORE OF THE GAME!
AIM: w33dless