Ask a Question related to Macromedia Flash Data Integration, Design and Development.
-
[djdomain] #1
php data correct on html ouput but output to flash isincorrect
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=Repl enish
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
[djdomain] Guest
-
Send data from html to flash action script
Hi, I would like my flash to act differently depending on what html page it is on. Can I send information from html code to action script? -
Flash HTML Data integration
I am planning on developing a web application which will run through flash and another which will run through html..... i want to centralise all the... -
Flash Text output in HTML
hello i made a newsletter application in flash mx2004 and to "translate" the flash to html (position of text, images) i use a cfc. its pretty... -
Data from HTML to Flash?
I'm trying to use the 'Browse' function button in HTML which allows the user to look for a file on their computer..... but how do I transfer this... -
How can I send data to a Flash file (swf), by clicking on a html link?
How can I send data to a Flash file (swf), by clicking on a html link? (my english is bad) I have a little Flash movie, inside my html document... -
Motion Maker #2
Re: php data correct on html ouput but output to flash is incorrect
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>";
--
Lon Hosford
[url]www.lonhosford.com[/url]
Flash, Actionscript and Flash Media Server examples:
[url]http://flashexamples.hosfordusa.com[/url]
May many happy bits flow your way!
"[djdomain]" <webforumsuser@macromedia.com> wrote in message
news:e7do1b$8lq$1@forums.macromedia.com...> 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=Repl enish
> 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 Guest



Reply With Quote

