Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / June 2006



Tip: Looking for answers? Try searching our database.

php data correct on html ouput but output to flash is incorrect

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
[djdomain] - 22 Jun 2006 10:31 GMT
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
Motion Maker - 25 Jun 2006 17:36 GMT
One possible issue is a browser caching problem.

Also consider trace statements for
trace ("results_lv.typeCount :" +results_lv.typeCount);
trace ("count:" +count);
trace ("result_lv[\"type\" + count + \"clientCount\"]:" + result_lv["type" +
count + "clientCount"]);

Your statements "here is what PHP sends back to Flash" and "what Flash
receives" is puzzling. Could you be saying here is what PHP returns to a web
browser page and here is what Flash sees? If that is the case, then it looks
like two different responses from the PHP program.

I generally have a test web page that sends the same data to the PHP script
as Flash would and have have a debug option in the PHP to return the return
values in a <pre> format so I can see them neatly in  a web page. This
allows testing the PHP program separately and verify what it returns outside
of Flash. Once that is clear, then you should see the exact same
information.

Example

echo $returnVals; // Contains all the url encoded variables.

in debug mode for web page

echo "<html><body><pre>" . $returnVals . </pre></body></html>";

Signature

Lon Hosford
www.lonhosford.com
Flash, Actionscript and Flash Media Server examples:
http://flashexamples.hosfordusa.com
May many happy bits flow your way!

> Not sure whats going on.  Information sent back from database is correct
> so it
[quoted text clipped - 71 lines]
>
> THanks for any help
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.