flash data integration:
Not sure whats going on. Information sent back from database is correct so it
must be my for statement.
[h]
var nextY = 0;
var nextY2 = 18;
for (var count = 0; count < result_lv.typeCount; count++) {
var nextY2 = 18;
holder.attachMovie("header", "type" + count, count);
holder["type" + count]._y = nextY;
holder["type" + count].txTitle.text = result_lv["type" + count];
for (var counter = 0; counter < result_lv["type" + count + "clientCount"];
counter++) {
holder["type" + count].attachMovie("client", "cl" + counter, counter);
holder["type" + count]["cl" + counter]._y = nextY2;
holder["type" + count]["cl" + counter]._x = 200;
holder["type" + count]["cl" + counter].txTitle.text = result_lv["cl" +
counter + "projName"];
nextY2 += Math.ceil(holder["type" + count]["cl" + counter]._height + 2);
trace("project title=" + result_lv["cl" + counter + "projName"]);
}
nextY += Math.ceil(holder["type" + count]._height + 2);
}
[/h]
there are 3 sub categorys:
cd/dvd
www/html
www/flash
These load fine.
the problem starts in the second for(). For some strange reason every
category has the first 2 same projects.
The count for each category project count is correct.
But it would seem that each category want to load every project regardless of
the category that it should be in.
I have since discovered that flash is not outputting the correct information
being sent by the php file. This is a strange one :S
Here's what php outputs and sends back to flash
[q]
&spotID=19&typeCount=3&type0=CD/DVD&type0clientCount=2&cl0projName=CD
Presentation&cl1projName=Alison
Gollings&type1=www/Flash&type1clientCount=15&cl0projName=Scotlet
redesign&cl1projName=glasgow as i see
it&cl2projName=mxgb.info&cl3projName=Sensua. The
collection&cl4projName=Clifford white racing&cl5projName=Replenish line
count&cl6projName=scotlet.co.uk&cl7projName=Riki Christo&cl8projName=IT
Band&cl9projName=JamieDobb.com&cl10projName=Kunt Flash intro&cl11projName=R A
Sneddon -- Flash logo&cl12projName=Activefm&cl13projName=Flash test
area&cl14projName=Excel-Management&type2=www/html&type2clientCount=2&cl0projName
=vinyl revival&cl1projName=Photo Gallery&retval=1&
[/q]
This information is correct and should be what flash is recieving.
Below is what flash outputs via trace of flash input from php script.
[q]
retval=1&type2clientCount=2&type2=www/html&cl14projName=Excel-Management&cl13pro
jName=Flash test area&cl12projName=Activefm&cl11projName=R A Sneddon -- Flash
logo&cl10projName=Kunt Flash intro&cl9projName=JamieDobb.com&cl8projName=IT
Band&cl7projName=Riki Christo&cl6projName=scotlet.co.uk&cl5projName=Replenish
line count&cl4projName=Clifford white racing&cl3projName=Sensua. The
collection&cl2projName=mxgb.info&type1clientCount=15&type1=www/Flash&cl1projName
=Photo Gallery&cl0projName=vinyl
revival&type0clientCount=2&type0=CD/DVD&typeCount=3&spotID=19
[/q]
The type count is correct but the information for the project is wrong.
Can anyone see a typo??? it must be a typo.
THanks for any help