A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Flash doesn't parse PHP

  1. #1
    Angkor-What? Gekke_Hollander's Avatar
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    234

    Flash doesn't parse PHP

    Hi guys,

    The weirdest thing keeps on happening. I've tried various things but nothings seems to help. I've got a php script that should return a variable to flash. In short:

    PHP Code:
    <?php
    require "functions.inc.php";
    require 
    "config.inc.php";
    $i 1;
    $files CC_readDir($dir_commissions);
    echo 
    "&img=".$files[$i-1]."&";
    ?>
    When I run it in a browser it returns:

    &img=CIMG0778.JPG&

    When I run the swf it returns:

    ".$files[$i-1]."

    Looks like flash doesn't parse the php... What am I doing wrong?

    Thanx for the help!

    Cheers,
    Gekke_Hollander
    MX 2004 Pro - Oops I did it again!!!
    SWF, it's a journey... not a destination

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    any chance that "run the swf" means opening an swf file on your harddisk as a file, with the php file in the same folder?
    Try opening the swf file in browser (with a http url) in that case

    Musicman

  3. #3
    Angkor-What? Gekke_Hollander's Avatar
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    234

    true!

    Musicman,

    Thanx for the reply! Yep that was the deal, what I did is change the loadvars "file.php" to "http://localhost/file.php" and it worked. Later on I changed it back to "file.php" and tested it from my localhost instead of my HD and it still worked.

    Weird characteristic but kinda understandable. If it's not run from http it's not parsed. But also weird that it still checks the whole php file in search of a possible variable and returns it (unparsed).

    Oh well...

    Cheers,
    Gekke_Hollander
    MX 2004 Pro - Oops I did it again!!!
    SWF, it's a journey... not a destination

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