A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Flash and MX

  1. #1
    Member
    Join Date
    Nov 2000
    Posts
    62
    Hey everyone!

    I am trying to play with php and I am having this problem.

    I have a simple php script print out a string(in the browser this works
    great). But when I do :

    loadVariables("test.php",this);

    all i get in testing is the actual script (ie $link =
    "@mysql_connect(\"localhost\");\r\n\tif(!$link){\r \n\t\tprint(\"Fukd
    again!\");\r\n\t}else{\r\n\t\tprint(\"Success\") ;\r\n\t};\r\n\r\n\r\n?>")

    the php script doesn't get run....
    Like I said before if I try it in the browser it works ---> I get: "Success"

    What's going on?

    Thanks

  2. #2
    Moderator enpstudios's Avatar
    Join Date
    Jun 2001
    Location
    Tampa, Fl.
    Posts
    11,282
    Moved to Scripting & Backend !!

  3. #3
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    you are probably running this **** on a computer with windows, and you are using the flash app for testing. It is loading - technically speaking - from a file:/ url, und so your php in the same folder is loaded through a file:/ url as well.
    View your movie in the browser and specify a http://localhost addy to make it work

    Musicman

  4. #4
    Member
    Join Date
    Nov 2000
    Posts
    62

    Still problems...

    Ok, here is what I have tried thus far.
    I tried ---> http://localhost/testing.swf // no result

    I tried ---> changing the swf path in the plugin code on the php page from :<EMBED src="testing.swf" to--> <EMBED src="http://localhost/testing.swf" // no result

    I tried actually uploading the pages off my machine to the web server with the same results... ( I know PHP is running there, FOR SURE. and I am also sure that it is running on my machine here locally as well!)

    ANy more suggestions???

    thanks SUM

  5. #5
    Member
    Join Date
    Nov 2000
    Posts
    62

    More info on my problem..

    I modified the PHP script to this:
    //----------------------------------------------
    <?
    //connect to DB
    $link=@mysql_connect("localhost");
    if(!$link){
    $result="Still Bad!";
    print("&textOut=".urlencode($result));
    }else{
    $result="Success";
    print("&textOut=".urlencode($result));
    };


    ?>
    //-----------------------------------------------

    and in the fla I have:

    loadVariables("test.php",this)
    inputField.text=_root.textOut

    (locally I figured this would work without an onLoad event, am I right?)

  6. #6
    Member
    Join Date
    Nov 2000
    Posts
    62

    GOT IT!!!!!

    got it... I didn't understand what you meant about the path.... got it now though .. thanks!!!

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