PDA

View Full Version : Server or Flash Issue? Please help.


jason_b
06-04-2007, 01:48 PM
I'm connecting to a database by logging in - and then trying to attach a number of movie clips(lockers), but sometimes it works and sometimes it doesn't.

Can someone look at the code and let me know if you see anything? I think it's a server issue (perhaps capitalization) but I'm not sure.

function populateLockers() {
//_global.dbc.returnlist gets the locker IDs
var lockersarray = _global.dbc.returnList[0];
trace("lockersarray:"+lockersarray);
for (i=0; i<lockersarray.length; i++) {
//for each lockernumber attach locker movie
lockergroup.attachMovie("locker","locker_"+i,i,{lockernum:lockersarray[i]});
//rename so it's easier to call
var locker_mc:MovieClip = lockergroup["locker_"+i];
//moves the lockers to the right place
locker_mc._x = 200+71.8*i;
locker_mc._y = 86;
}
//brings the last locker to the top and works backwards
for (i=11; i>=0; i--) {
var locker_mc:MovieClip = lockergroup["locker_"+i];
locker_mc.swapDepths(lockergroup.getNextHighestDep th());
}
}
_global.dbc = new DBCommunicator();
_global.dbc.addRequest(_global.dbc.dbi.getLockers, ["hallway08"]);
_global.dbc.setPostprocess(populateLockers, []);
_global.dbc.start();

jason_b
06-04-2007, 01:56 PM
It works on my system with remoting, but when I post it to the server it doesn't.