Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member gazman's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    28
    Member #
    566
    Hiya,
    I'm having a bit of trouble passing variables from a php file into a flash file. I can do it the other way (Flash to PHP) fine using

    getURL("foo.php","","POST");

    but whenever I POST variables from foo.php to the swf file, the flash file doesn't seem to pick them up. In the flash file I initialise a variable called 'name' (which is also the name of the inputfield on the php page), and then call

    loadVariablesNum("foo.php", 0, "POST");

    which should load the POST variables to level 0 (AKA _root?) of the flash file, but whenever I try to display the variable (using a dynamic text box) it only displays the default value of the variable which was set when I initialised it....

    Anyone know what i'm doing wrong?
    ~GaZ~

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Make sure that your php file is only passing back a value... no HTML. The HTML will kill the loadVariablesNum function.

    To test it, load the page in your browser and view the source. That will tell you what it's returning.

  4. #3
    Junior Member gazman's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    28
    Member #
    566
    what exactly do you mean by 'only passing back a value'?

    I used loadVariablesNum("foo.php", 0, "GET");
    in phpinput.swf to see what variables were being passed, and the url was 'foo.php?name=test' yet name did not receive that value...

    PS i forgot to mention in the first post... i'm using FlashMX on Windows 2000

    ~GaZ~

  5. #4
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    umm.... i don't think that's how it works.

    I've never actually used that function, but i think it loads variables from the page, similarly to XML-RPC.

    So what you would do is call loadVariablesNum("foo.php", 0, "GET");

    Then, the page "foo.php" would return a value (e.g. "test") and you would set your parameter to that.

    This is all just guesswork. Try looking for tutorials on how it works.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:43 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com