Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: RE: FLASH: PHP - returning vars to flash
From: TR Henigson
Date: Fri, 6 Oct 2000 17:57:15 +0100

Oh sorry. I forgot one very important feature. Each variable assignment
must be separated by an ampersand. There shouldn't be a space as you have.
The code should have been (note the ampersand tacked onto the variables
string and scriptFinished):

<?PHP

$number=7;
$string="hello carl";

$output="number=".$number;
$output.="&string=".urlencode($string);
$output.="&scriptFinished=1";
echo $output;

?>

Ted


> -----Original Message-----
> From: carl captieux [carl [dot] captieuxati-dmedia [dot] com (mailto:carl [dot] captieuxati-dmedia [dot] com)]
> Sent: Friday, October 06, 2000 5:44 AM
> To: tedat3bits [dot] com
> Subject: Re: FLASH: PHP - returning vars to flash
>
>
> Hi Ted,
>
> Thanks for your reply.
>
> I hope you don't mind me mailing you directly.
>
> I tried your code. I have defined the following variable fields in Flash:
>
> number
> string
> scriptFinished
>
> However, when I call 'loadVariablesNum ("get_vars.php3", 0,
> "POST");' from
> a button, the php returns the variables as a single string into the
> variable number field as:
>
> 7string=hello carlscriptFinished=1
>
> here's the php code:
>
> <?PHP
>
> $number=7;
> $string="hello carl";
>
> $output="number=".$number;
> $output.="string=".urlencode($string);
> $output.="scriptFinished=1";
> echo $output;
>
> ?>
>
> I did try as you suggested to implement a check using if( not
> scriptFinished) etc.. but it just seemed to hang.
>
> Please find attached fla and php file. If you wouldn't mind having at look
> I would be grateful.
>
> Kind regards,
>
> Carl
>
>
> TR Henigson wrote:
>
> > For example: let's return values for three variables with a PHP script.
> >
> > <?PHP
> >
> > $number=7;
> > $string="A short string";
> >
> > $output="number=".$number;
> > $output.="string=".urlencode($string);
> > $output.="scriptFinished=1";
> >
> > echo $output;
> >
> > ?>
> >
> > In your Flash movie, set up three frames.
> > Frame1: Set scriptFinished=0 and Load the vars from the PHP script
> > Frame2: blank keyframe
> > Frame3: If(not scriptFinished) then goto and play _currentframe-1
> > .
> > .
> > .
> > the rest of your movie
> >
> > It's important not to try and do anything with the variables returned
> > by the PHP script until they've all been loaded. That's what the
> > scriptFinished variable is for. This of course assumes you are calling
> > the PHP script from a frame action. You could do it from a button, in
> > which case you'd want to disable the button after it is pressed until
> > the PHP script returns so it doesn't get called twice.
> >
> > Ted Henigson
> >
> > > -----Original Message-----
> > > From: owneratchinwag [dot] com [owneratchinwag [dot] com]On">mailto:owneratchinwag [dot] com]On Behalf Of carl
> > > captieux
> > > Sent: Thursday, October 05, 2000 10:04 AM
> > > To: flasheratchinwag [dot] com
> > > Subject: FLASH: PHP - returning vars to flash
> > >
> > >
> > >
> > >
> > > Hi All,
> > >
> > > How do you return values to a Flash movie using PHP?
> > >
> > > for example using ' loadVariablesNum ("get_vars.php3", 0,
> > > "POST");' to run a PHP
> > > script and return a value to Flash.
> > >
> > > Thanks
> > >
> > > Carl
> > >
> > >
> > >
> > >
> > >
> > >
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > NudeGuru.com is proud to sponsor the Flasher list
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > IT'S THE ART OF MONEY, HONEY!
> > > Tips and Advice from some of the most popular Flash
> > > artists + industry power-brokers on how to hold onto
> > > your rights, negotiate contracts and get full value
> > > for your work.http://www.nudeguru.com from Franke James
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > To unsubscribe or change your list settings go to
> > > http://www.chinwag.com/flasher or email helpatchinwag [dot] com
> > >
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > NudeGuru.com is proud to sponsor the Flasher list
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > IT'S THE ART OF MONEY, HONEY!
> > Tips and Advice from some of the most popular Flash
> > artists + industry power-brokers on how to hold onto
> > your rights, negotiate contracts and get full value
> > for your work.http://www.nudeguru.com from Franke James
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > To unsubscribe or change your list settings go to
> > http://www.chinwag.com/flasher or email helpatchinwag [dot] com
>
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: PHP - returning vars to flash, carl captieux

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]