php data correct on html ouput but output to flash isincorrect

Ask a Question related to Macromedia Flash Data Integration, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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?
    2. 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...
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139