A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: loadvarible is ok, but i cannot use that variables

  1. #1
    Junior Member
    Join Date
    Aug 2000
    Posts
    2
    Hello
    I use load variable targeting a php script
    so:
    loadVariable("http://xxxx.xxxx.xxxx/number.php","/");

    in number.php i do a
    echo "nt=10&na=20";

    but when i try to use nt or na in script, is not usable
    i allso like to mention that nt and na ar listed by menu->debug->list variables and there are ok.
    ( nt="10"
    na="20")
    maybe i do a bad targeting,( should i load them in anothere way? or should I try to address them in a different way ?)
    I DON'T KNOWWWWWWWWWWWWW !
    and i;m about to explode !
    so please help me if you can !!!
    many Thanks
    Bogdan

  2. #2
    If you're using Flash 5 (which I assume you are from this forum name) you can try using an include() instead of a LoadVariables. Then in your php file you don't have to worry about printing a URL-encoded query string, you can just have it print out:
    nt=10;
    na=20;

    ... as if it were just normal statements in an internal script.

    If for some reason you can't use an include like this, I would suggest putting in a trace statement in your script:
    trace("nt="+nt+" ; na="+na);
    just to see if the variables are actually getting loaded. It could be that they're being loaded fine but are being interpreted as the wrong type (ie. number vs. string) in your script. You could try using Number(na) or String(na) to force the type.

  3. #3
    Member
    Join Date
    Apr 2000
    Posts
    40
    Make sure you are not trying to use your variables until 2 frames after you load them. For some reason F5 needs extra time to register that they have been loaded.


  4. #4
    Junior Member
    Join Date
    Aug 2000
    Posts
    2
    the variables that i send from php are dynamic generated
    so i cannot includ them in a file
    am I wrong ?

  5. #5
    You can *not* use include like that. Include only works at compile time.

  6. #6
    Sorry, my mistake.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center